+#if wxUSE_LIBHILDON
+ else // Ok or Ok/Cancel dialog
+ {
+ gtk_dialog_add_button(dlg, GTK_STOCK_OK, GTK_RESPONSE_OK);
+ if ( m_dialogStyle & wxCANCEL )
+ gtk_dialog_add_button(dlg, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ }
+#endif // wxUSE_LIBHILDON
+
+ // VZ: isn't this done by GTK+ itself?
+ if (parent)
+ gtk_window_set_transient_for(GTK_WINDOW(m_widget), parent);
+}
+
+int wxMessageDialog::ShowModal()
+{
+ // break the mouse capture as it would interfere with modal dialog (see
+ // wxDialog::ShowModal)
+ wxWindow * const win = wxWindow::GetCapture();
+ if ( win )
+ win->GTKReleaseMouseAndNotify();
+
+ if ( !m_widget )
+ {
+ GTKCreateMsgDialog();
+ wxCHECK_MSG( m_widget, wxID_CANCEL,
+ _T("failed to create GtkMessageDialog") );
+ }
+
+ // This should be necessary, but otherwise the
+ // parent TLW will disappear..
+ if (m_parent)
+ gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
+
+ gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
+ gtk_widget_destroy(m_widget);
+ m_widget = NULL;