static gint
gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win )
{
- if (g_isIdle) wxapp_install_idle_handler();
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ /* I haven''t been able to set the position of
+ the dialog before it is shown, so I set the
+ position in "realize" and "map" */
+ gtk_widget_set_uposition( widget, win->m_x, win->m_y );
/* reset the icon */
if (win->m_icon != wxNullIcon)
static gint
gtk_dialog_map_callback( GtkWidget *widget, wxDialog *win )
{
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
/* I haven''t been able to set the position of
- the dialog before it is shown, so I do it here */
+ the dialog before it is shown, so I set the
+ position in "realize" and "map" */
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
/* all this is for Motif Window Manager "hints" and is supposed to be
wxDialog::~wxDialog()
{
+ m_isBeingDeleted = TRUE;
+
wxTopLevelWindows.DeleteObject( this );
if (wxTheApp->GetTopWindow() == this)
else
{
SetReturnCode(wxID_CANCEL);
- this->Show(FALSE);
+ Show(FALSE);
}
}
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
- printf( "OnOK 1.\n" );
if (Validate() && TransferDataFromWindow())
{
- printf( "OnOK 2.\n" );
if (IsModal())
{
- printf( "OnOK: modal.\n" );
EndModal(wxID_OK);
}
else
{
- printf( "OnOK: non-modal.\n" );
SetReturnCode(wxID_OK);
this->Show(FALSE);
}
GtkOnSize( m_x, m_y, m_width, m_height );
}
- if (show != m_isShown)
- {
- if (show)
- {
- gtk_widget_show( m_widget );
- }
- else
- gtk_widget_hide( m_widget );
-
- m_isShown = show;
- }
+ bool ret = wxWindow::Show( show );
if (show) InitDialog();
- return TRUE;
+ return ret;
}
bool wxDialog::IsModal() const
m_icon = icon;
if (!icon.Ok()) return;
+ if (!m_widget->window) return;
+
wxMask *mask = icon.GetMask();
GdkBitmap *bm = (GdkBitmap *) NULL;
if (mask) bm = mask->GetBitmap();