X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b011451bd5444fd5aea14811ef7a172a249c4ef..520e470fdd0daef09c77938db642e4583933c90d:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index dda9d0a2c2..73ae00a02b 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -22,7 +22,8 @@ extern wxList wxPendingDelete; //----------------------------------------------------------------------------- -// delete +// "delete_event" +//----------------------------------------------------------------------------- bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win ) { @@ -42,14 +43,14 @@ bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED // wxDialog //----------------------------------------------------------------------------- -BEGIN_EVENT_TABLE(wxDialog,wxWindow) +BEGIN_EVENT_TABLE(wxDialog,wxPanel) EVT_BUTTON (wxID_OK, wxDialog::OnOK) EVT_BUTTON (wxID_CANCEL, wxDialog::OnCancel) EVT_BUTTON (wxID_APPLY, wxDialog::OnApply) EVT_CLOSE (wxDialog::OnCloseWindow) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxWindow) +IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel) wxDialog::wxDialog(void) { @@ -207,7 +208,7 @@ void wxDialog::Centre( int direction ) bool wxDialog::Show( bool show ) { - if (!show && IsModal() && m_modalShowing) + if (!show && IsModal()) { EndModal( wxID_CANCEL ); } @@ -219,19 +220,25 @@ bool wxDialog::Show( bool show ) return TRUE; } -void wxDialog::SetModal(bool flag) +bool wxDialog::IsModal(void) const +{ + return m_modalShowing; +} + +void wxDialog::SetModal( bool WXUNUSED(flag) ) { +/* if (flag) m_windowStyle |= wxDIALOG_MODAL; else if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL; +*/ + wxFAIL_MSG( "wxDialog:SetModal obsolete now" ); } int wxDialog::ShowModal(void) { - SetModal(TRUE); - - if (m_modalShowing) + if (IsModal()) { wxFAIL_MSG( "wxDialog:ShowModal called twice" ); return GetReturnCode(); @@ -252,7 +259,7 @@ void wxDialog::EndModal( int retCode ) { SetReturnCode( retCode ); - if (!m_modalShowing) + if (!IsModal()) { wxFAIL_MSG( "wxDialog:EndModal called twice" ); return; @@ -270,12 +277,6 @@ void wxDialog::InitDialog(void) wxWindow::InitDialog(); } -void wxDialog::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW) ) -{ - gdk_window_set_hints( m_widget->window, -1, -1, - minW, minH, maxW, maxH, GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE ); -} - void wxDialog::SetIcon( const wxIcon &icon ) { m_icon = icon;