make it possible to use stock ids for custom message box labels

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-05 18:02:49 +00:00
parent 9276358892
commit e08931c05a
6 changed files with 107 additions and 36 deletions

View File

@@ -66,9 +66,18 @@ wxString wxMessageDialog::GetDefaultCancelLabel() const
return GTK_STOCK_CANCEL;
}
void wxMessageDialog::DoSetCustomLabel(wxString& var, const wxString& value)
void wxMessageDialog::DoSetCustomLabel(wxString& var, const ButtonLabel& label)
{
var = wxConvertMnemonicsToGTK(value);
int stockId = label.GetStockId();
if ( stockId == wxID_NONE )
{
wxMessageDialogWithCustomLabels::DoSetCustomLabel(var, label);
var = wxConvertMnemonicsToGTK(var);
}
else // stock label
{
var = wxGetStockGtkID(stockId);
}
}
void wxMessageDialog::GTKCreateMsgDialog()