diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-02-04 01:45:55 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-02-14 16:36:56 -0500 |
commit | 8f201d62d9ed32c1e33e6130d5af4a325eda0d03 (patch) | |
tree | 6cec52581986daf17a88d83f865043720309fce1 /gtk/gtkcolorbutton.c | |
parent | d7cff0797ee2f2955a5515314c6e477cd885f92c (diff) | |
download | gtk+-8f201d62d9ed32c1e33e6130d5af4a325eda0d03.tar.gz |
Add API to set palettes
I'm not really convinced by this; the API is a little complicated.
May need more thought.
Diffstat (limited to 'gtk/gtkcolorbutton.c')
-rw-r--r-- | gtk/gtkcolorbutton.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index ecc808864a..334805a81f 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -990,6 +990,20 @@ gtk_color_button_get_property (GObject *object, } } +static void +gtk_color_button_add_palette (GtkColorChooser *chooser, + gboolean horizontal, + gint colors_per_line, + gint n_colors, + GdkRGBA *colors) +{ + GtkColorButton *button = GTK_COLOR_BUTTON (chooser); + + if (button->priv->cs_dialog) + gtk_color_chooser_add_palette (GTK_COLOR_CHOOSER (button->priv->cs_dialog), + horizontal, colors_per_line, n_colors, colors); +} + typedef void (* get_rgba) (GtkColorChooser *, GdkRGBA *); typedef void (* set_rgba) (GtkColorChooser *, const GdkRGBA *); @@ -998,5 +1012,6 @@ gtk_color_button_iface_init (GtkColorChooserInterface *iface) { iface->get_rgba = (get_rgba)gtk_color_button_get_rgba; iface->set_rgba = (set_rgba)gtk_color_button_set_rgba; + iface->add_palette = gtk_color_button_add_palette; } |