X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b91fd70410ea5a408d292651704885c789b02c4f..c96d7bec67801a380d029990ad1df5e2c9fc207b:/src/gtk/colordlg.cpp diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index 34e9c118fe..ccb80aadc1 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -16,7 +16,7 @@ #pragma hdrstop #endif -#if wxUSE_COLOURDLG && defined(__WXGTK20__) +#if wxUSE_COLOURDLG #include "wx/colordlg.h" @@ -41,9 +41,10 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) wxString title(_("Choose colour")); m_widget = gtk_color_selection_dialog_new(wxGTK_CONV(title)); - if (parent) + m_parent = GetParentForModalDialog(parent); + if ( m_parent ) { - GtkWindow* gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) ); + GtkWindow* gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(m_parent->m_widget) ); gtk_window_set_transient_for(GTK_WINDOW(m_widget), gtk_parent); } @@ -139,5 +140,5 @@ void wxColourDialog::DialogToColourData() g_free(pal); } -#endif // wxUSE_COLOURDLG && defined(__WXGTK20__) +#endif // wxUSE_COLOURDLG