- if (m_dialogStyle & wxCANCEL)
- gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL);
- if (m_dialogStyle & wxNO_DEFAULT)
- gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO);
- else
- gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_YES);
+ if ( m_dialogStyle & wxHELP )
+ {
+ gtk_dialog_add_button(dlg, wxGTK_CONV(GetHelpLabel()),
+ GTK_RESPONSE_HELP);
+ }
+
+ if ( m_dialogStyle & wxYES_NO ) // Yes/No or Yes/No/Cancel dialog
+ {
+ // Add the buttons in the correct order which is, according to
+ // http://library.gnome.org/devel/hig-book/stable/windows-alert.html.en
+ // the following one:
+ //
+ // [Help] [Alternative] [Cancel] [Affirmative]
+
+ gtk_dialog_add_button(dlg, wxGTK_CONV(GetNoLabel()),
+ GTK_RESPONSE_NO);
+
+ if ( m_dialogStyle & wxCANCEL )
+ {
+ gtk_dialog_add_button(dlg, wxGTK_CONV(GetCancelLabel()),
+ GTK_RESPONSE_CANCEL);
+ }
+
+ gtk_dialog_add_button(dlg, wxGTK_CONV(GetYesLabel()),
+ GTK_RESPONSE_YES);
+ }
+ else // Ok or Ok/Cancel dialog
+ {
+ gtk_dialog_add_button(dlg, wxGTK_CONV(GetOKLabel()), GTK_RESPONSE_OK);
+ if ( m_dialogStyle & wxCANCEL )
+ {
+ gtk_dialog_add_button(dlg, wxGTK_CONV(GetCancelLabel()),
+ GTK_RESPONSE_CANCEL);
+ }
+ }