summarylogtreecommitdiffstats
path: root/palette-color.patch
blob: f5924094e62adb38efc87db1954d01796101bd19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 2a10e0ed7d6210b0522ffc2faf8483c64f1d183d Mon Sep 17 00:00:00 2001
From: Egmont Koblinger <egmont@gmail.com>
Date: Fri, 22 Jul 2016 16:42:14 +0200
Subject: profile: editor: Properly initialize the first palette color

https://bugzilla.gnome.org/show_bug.cgi?id=768850
(cherry picked from commit 6447aded26416e49bf5fdce8a8fd13c16c0ebb44)
---
 src/profile-editor.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/profile-editor.c b/src/profile-editor.c
index ff26df6..82cc7a9 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -405,18 +405,13 @@ profile_palette_notify_colorpickers_cb (GSettings *profile,
   for (i = 0; i < n_colors; i++)
     {
       char name[32];
-      GdkRGBA old_color;
 
       g_snprintf (name, sizeof (name), "palette-colorpicker-%" G_GSIZE_FORMAT, i + 1);
       w = (GtkWidget *) gtk_builder_get_object  (builder, name);
 
-      gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (w), &old_color);
-      if (!rgba_equal (&old_color, &colors[i]))
-        {
-          g_signal_handlers_block_by_func (w, G_CALLBACK (palette_color_notify_cb), profile);
-          gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (w), &colors[i]);
-          g_signal_handlers_unblock_by_func (w, G_CALLBACK (palette_color_notify_cb), profile);
-        }
+      g_signal_handlers_block_by_func (w, G_CALLBACK (palette_color_notify_cb), profile);
+      gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (w), &colors[i]);
+      g_signal_handlers_unblock_by_func (w, G_CALLBACK (palette_color_notify_cb), profile);
     }
 }
 
-- 
cgit v0.12