]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dirdlg.cpp
don't readd items in SetImageList() after changing the control mode, they are suppose...
[wxWidgets.git] / src / gtk / dirdlg.cpp
index 8613388d29cc6bd18ee215de6b391b48624e314f..08e4a0af44558238d0f61238993209588ff81103 100644 (file)
@@ -49,7 +49,7 @@ static void gtk_dirdialog_ok_callback(GtkWidget *widget, wxDirDialog *dialog)
 
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
     event.SetEventObject(dialog);
-    dialog->GetEventHandler()->ProcessEvent(event);
+    dialog->HandleWindowEvent(event);
 }
 }
 
@@ -63,7 +63,7 @@ static void gtk_dirdialog_cancel_callback(GtkWidget *WXUNUSED(w),
 {
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
     event.SetEventObject(dialog);
-    dialog->GetEventHandler()->ProcessEvent(event);
+    dialog->HandleWindowEvent(event);
 }
 }
 
@@ -120,6 +120,7 @@ wxDirDialog::wxDirDialog(wxWindow* parent,
                    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                    GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
                    NULL);
+    g_object_ref(m_widget);
 
     gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_ACCEPT);