X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cdc48273b49b0b90d9587a1ecc5935d38a160620..668e3f703e9e7e44d55b393cfc588ec39037042c:/src/gtk/colordlg.cpp diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index 0c606ca018..76dc32e935 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/colordlg.cpp +// Name: src/gtk/colordlg.cpp // Purpose: Native wxColourDialog for GTK+ // Author: Vaclav Slavik // Modified by: @@ -54,7 +54,7 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) #if wxUSE_LIBHILDON m_widget = hildon_color_selector_new(parentGTK); -#elif wxUSE_LIBHILDON2 // !wxUSE_LIBHILDON +#elif wxUSE_LIBHILDON2 // !wxUSE_LIBHILDON m_widget = hildon_color_chooser_dialog_new(); #else // !wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 wxString title(_("Choose colour")); @@ -69,8 +69,9 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) } #if !wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 - GtkColorSelection *sel = - GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel); + GtkColorSelection* sel = GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection( + GTK_COLOR_SELECTION_DIALOG(m_widget))); gtk_color_selection_set_has_palette(sel, true); #endif // !wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 @@ -104,7 +105,7 @@ int wxColourDialog::ShowModal() void wxColourDialog::ColourDataToDialog() { const GdkColor * const - col = m_data.GetColour().Ok() ? m_data.GetColour().GetColor() + col = m_data.GetColour().IsOk() ? m_data.GetColour().GetColor() : NULL; #if wxUSE_LIBHILDON @@ -123,8 +124,9 @@ void wxColourDialog::ColourDataToDialog() hildon_color_chooser_dialog_set_color((HildonColorChooserDialog *)m_widget, &clr); #else // !wxUSE_LIBHILDON2/!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 - GtkColorSelection *sel = - GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel); + GtkColorSelection* sel = GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection( + GTK_COLOR_SELECTION_DIALOG(m_widget))); if ( col ) gtk_color_selection_set_current_color(sel, col); @@ -136,7 +138,7 @@ void wxColourDialog::ColourDataToDialog() for (unsigned i = 0; i < 16; i++) { wxColour c = m_data.GetCustomColour(i); - if (c.Ok()) + if (c.IsOk()) { colors[n_colors] = *c.GetColor(); n_colors++; @@ -159,7 +161,7 @@ void wxColourDialog::DialogToColourData() m_data.SetColour(*clr); #elif wxUSE_LIBHILDON2 // !wxUSE_LIBHILDON const GdkColor * const - col = m_data.GetColour().Ok() ? m_data.GetColour().GetColor() : NULL; + col = m_data.GetColour().IsOk() ? m_data.GetColour().GetColor() : NULL; GdkColor clr; if (col) @@ -176,8 +178,9 @@ void wxColourDialog::DialogToColourData() m_data.SetColour(new_color); #else // !wxUSE_LIBHILDON2 - GtkColorSelection *sel = - GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel); + GtkColorSelection* sel = GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection( + GTK_COLOR_SELECTION_DIALOG(m_widget))); GdkColor clr; gtk_color_selection_get_current_color(sel, &clr);