/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/colordlg.cpp
+// Name: src/gtk/colordlg.cpp
// Purpose: Native wxColourDialog for GTK+
// Author: Vaclav Slavik
// Modified by:
if (data)
m_data = *data;
- m_parent = GetParentForModalDialog(parent);
+ m_parent = GetParentForModalDialog(parent, 0);
GtkWindow * const parentGTK = m_parent ? GTK_WINDOW(m_parent->m_widget)
: NULL;
#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"));
}
#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
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
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);
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++;
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)
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);