X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de8113d9a3b19159fe06e1f3321c799085c8d47d..7491d644e6103afc2a69b750ca255218181b63a3:/src/gtk1/dialog.cpp?ds=sidebyside diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 2c7594587c..822015862d 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -96,9 +96,8 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel) -wxDialog::wxDialog() +void wxDialog::Init() { - m_title = ""; m_sizeSet = FALSE; m_modalShowing = FALSE; } @@ -108,8 +107,8 @@ wxDialog::wxDialog( wxWindow *parent, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - m_modalShowing = FALSE; - m_sizeSet = FALSE; + Init(); + Create( parent, id, title, pos, size, style, name ); } @@ -143,7 +142,7 @@ bool wxDialog::Create( wxWindow *parent, if (m_parent) m_parent->AddChild( this ); PostCreation(); - + gtk_widget_realize( m_widget ); gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate", @@ -290,7 +289,7 @@ void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) ) } } -void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags ) +void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { wxASSERT_MSG( (m_widget != NULL), "invalid dialog" ); wxASSERT_MSG( (m_wxwindow != NULL), "invalid dialog" ); @@ -338,7 +337,7 @@ void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags ) if ((m_x != old_x) || (m_y != old_y)) { /* m_sizeSet = FALSE; */ - gtk_widget_set_uposition( m_widget, m_x, m_y ); + gtk_widget_set_uposition( m_widget, m_x, m_y ); } } @@ -350,11 +349,6 @@ void wxDialog::SetSize( int x, int y, int width, int height, int sizeFlags ) m_resizing = FALSE; } -void wxDialog::SetSize( int width, int height ) -{ - SetSize( -1, -1, width, height, wxSIZE_USE_EXISTING ); -} - void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height ) { // due to a bug in gtk, x,y are always 0 @@ -419,7 +413,7 @@ bool wxDialog::Show( bool show ) } wxWindow::Show( show ); - + if (show) InitDialog(); return TRUE; @@ -448,7 +442,7 @@ int wxDialog::ShowModal() wxFAIL_MSG( "wxDialog:ShowModal called twice" ); return GetReturnCode(); } - + Show( TRUE ); m_modalShowing = TRUE;