X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff654490b7cb185631a1dc4621094d88643ccf41..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/gtk/dirdlg.cpp diff --git a/src/gtk/dirdlg.cpp b/src/gtk/dirdlg.cpp index 8613388d29..c6655fdaef 100644 --- a/src/gtk/dirdlg.cpp +++ b/src/gtk/dirdlg.cpp @@ -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); } } @@ -99,7 +99,7 @@ wxDirDialog::wxDirDialog(wxWindow* parent, { m_message = title; - parent = GetParentForModalDialog(parent); + parent = GetParentForModalDialog(parent, style); if (!PreCreation(parent, pos, wxDefaultSize) || !CreateBase(parent, wxID_ANY, pos, wxDefaultSize, style, @@ -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); @@ -134,7 +135,7 @@ wxDirDialog::wxDirDialog(wxWindow* parent, // local-only property could be set to false to allow non-local files to be loaded. // In that case get/set_uri(s) should be used instead of get/set_filename(s) everywhere // and the GtkFileChooserDialog should probably also be created with a backend, - // e.g "gnome-vfs", "default", ... (gtk_file_chooser_dialog_new_with_backend). + // e.g. "gnome-vfs", "default", ... (gtk_file_chooser_dialog_new_with_backend). // Currently local-only is kept as the default - true: // gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(m_widget), true); @@ -171,7 +172,7 @@ void wxDirDialog::SetPath(const wxString& dir) wxString wxDirDialog::GetPath() const { wxGtkString str(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(m_widget))); - return wxString(str, *wxConvFileName); + return wxString::FromUTF8(str); } #endif // wxUSE_DIRDLG