summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-12-27 14:03:29 +0300
committermonsta <[email protected]>2018-01-11 12:04:41 +0300
commit0cc9461b02b82702994c6b81f433251f4cfdb28b (patch)
treeeb6b35c0f2c7fe8fd60e4f3e267ad9d6f4afda65
parent324758a6b4493942191c898af589c414b629e228 (diff)
downloadmate-terminal-0cc9461b02b82702994c6b81f433251f4cfdb28b.tar.bz2
mate-terminal-0cc9461b02b82702994c6b81f433251f4cfdb28b.tar.xz
profile-editor: properly initialize the first palette color
taken from: https://git.gnome.org/browse/gnome-terminal/commit/?id=6447aded26416e49bf5fdce8a8fd13c16c0ebb44
-rw-r--r--src/profile-editor.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 48b3632..d06e499 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -451,18 +451,13 @@ profile_palette_notify_colorpickers_cb (TerminalProfile *profile,
for (i = 0; i < n_colors; i++)
{
char name[32];
- GdkRGBA old_color;
g_snprintf (name, sizeof (name), "palette-colorpicker-%d", i + 1);
w = profile_editor_get_widget (editor, name);
- gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (w), &old_color);
- if (!gdk_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);
}
}