Commit 8b685016 authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: set GimpColorConfig on some color buttons, more to do...

parent d91487e6
......@@ -946,20 +946,21 @@ static void
create_selection_tab (GtkWidget *notebook,
gint32 image_ID)
{
GtkSizeGroup *group;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *hbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *frame;
GtkWidget *toggle;
GtkWidget *spinbutton;
GtkAdjustment *adj;
GtkWidget *button;
GtkWidget *font_button;
gint32 *image_id_list;
gint nimages, j;
GimpColorConfig *config;
GtkSizeGroup *group;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *hbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *frame;
GtkWidget *toggle;
GtkWidget *spinbutton;
GtkAdjustment *adj;
GtkWidget *button;
GtkWidget *font_button;
gint32 *image_id_list;
gint nimages, j;
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
......@@ -1038,6 +1039,9 @@ create_selection_tab (GtkWidget *notebook,
G_CALLBACK (gimp_color_button_get_color),
&filmvals.film_color);
config = gimp_get_color_configuration ();
gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (button), config);
/* Film numbering: Startindex/Font/color */
frame = gimp_frame_new (_("Numbering"));
gtk_box_pack_start (GTK_BOX (vbox2), frame, TRUE, TRUE, 0);
......@@ -1091,6 +1095,9 @@ create_selection_tab (GtkWidget *notebook,
G_CALLBACK (gimp_color_button_get_color),
&filmvals.number_color);
gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (button), config);
g_object_unref (config);
for (j = 0; j < 2; j++)
{
toggle = gtk_check_button_new_with_mnemonic (j ? _("At _bottom")
......
......@@ -618,22 +618,23 @@ static gint
dialog (gint32 image_ID,
GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkSizeGroup *group;
GtkWidget *label;
GtkWidget *preview;
GtkWidget *button;
GtkWidget *width;
GtkWidget *space;
GtkWidget *offset;
GtkWidget *chain_button;
GtkWidget *table;
GimpUnit unit;
gdouble xres;
gdouble yres;
gboolean run;
GimpColorConfig *config;
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkSizeGroup *group;
GtkWidget *label;
GtkWidget *preview;
GtkWidget *button;
GtkWidget *width;
GtkWidget *space;
GtkWidget *offset;
GtkWidget *chain_button;
GtkWidget *table;
GimpUnit unit;
gdouble xres;
gdouble yres;
gboolean run;
g_return_val_if_fail (main_dialog == NULL, FALSE);
......@@ -909,6 +910,10 @@ dialog (gint32 image_ID,
gtk_table_attach_defaults (GTK_TABLE (table), hcolor_button, 0, 1, 1, 2);
gtk_widget_show (hcolor_button);
config = gimp_get_color_configuration ();
gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (hcolor_button),
config);
g_signal_connect (hcolor_button, "color-changed",
G_CALLBACK (gimp_color_button_get_color),
&grid_cfg.hcolor);
......@@ -927,6 +932,9 @@ dialog (gint32 image_ID,
gtk_table_attach_defaults (GTK_TABLE (table), vcolor_button, 1, 2, 1, 2);
gtk_widget_show (vcolor_button);
gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (vcolor_button),
config);
g_signal_connect (vcolor_button, "color-changed",
G_CALLBACK (gimp_color_button_get_color),
&grid_cfg.vcolor);
......@@ -945,6 +953,10 @@ dialog (gint32 image_ID,
gtk_table_attach_defaults (GTK_TABLE (table), button, 2, 3, 1, 2);
gtk_widget_show (button);
gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (button),
config);
g_object_unref (config);
g_signal_connect (button, "color-changed",
G_CALLBACK (gimp_color_button_get_color),
&grid_cfg.icolor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment