summaryrefslogtreecommitdiff
path: root/src/terminal-util.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-10 16:00:39 +0200
committerraveit65 <[email protected]>2016-06-11 13:03:09 +0200
commitd85c96ad64439b97ece44f7da927338c85cf6d19 (patch)
treeb70b4d38a355fd40fb4a3f822e58457e055f2181 /src/terminal-util.c
parent40a42eb82a124ba4ded557cdb7d0b8a9076af8eb (diff)
downloadmate-terminal-d85c96ad64439b97ece44f7da927338c85cf6d19.tar.bz2
mate-terminal-d85c96ad64439b97ece44f7da927338c85cf6d19.tar.xz
port GdkColors to GdkRGBA and GtkColorButton to GtkColorChooser
with help from Alexei Sorokin inspired from: https://git.gnome.org/browse/gnome-terminal/commit/?id=84099c3
Diffstat (limited to 'src/terminal-util.c')
-rw-r--r--src/terminal-util.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/terminal-util.c b/src/terminal-util.c
index 6797c8b..c8b367c 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -816,18 +816,18 @@ object_change_notify_cb (PropertyChange *change)
g_object_get (object, object_prop, &value, NULL);
gtk_range_set_value (GTK_RANGE (widget), value);
}
- else if (GTK_IS_COLOR_BUTTON (widget))
+ else if (GTK_IS_COLOR_CHOOSER (widget))
{
- GdkColor *color;
- GdkColor old_color;
+ GdkRGBA *color;
+ GdkRGBA old_color;
g_object_get (object, object_prop, &color, NULL);
- gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &old_color);
+ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &old_color);
- if (color && !gdk_color_equal (color, &old_color))
- gtk_color_button_set_color (GTK_COLOR_BUTTON (widget), color);
+ if (color && !gdk_rgba_equal (color, &old_color))
+ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (widget), color);
if (color)
- gdk_color_free (color);
+ gdk_rgba_free (color);
}
else if (GTK_IS_FONT_BUTTON (widget))
{
@@ -912,11 +912,11 @@ widget_change_notify_cb (PropertyChange *change)
value = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
g_object_set (object, object_prop, value, NULL);
}
- else if (GTK_IS_COLOR_BUTTON (widget))
+ else if (GTK_IS_COLOR_CHOOSER (widget))
{
- GdkColor color;
+ GdkRGBA color;
- gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &color);
+ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &color);
g_object_set (object, object_prop, &color, NULL);
}
else if (GTK_IS_FONT_BUTTON (widget))
@@ -977,7 +977,7 @@ terminal_util_bind_object_property_to_widget (GObject *object,
signal_name = "notify::text";
else if (GTK_IS_COMBO_BOX (widget))
signal_name = "notify::active";
- else if (GTK_IS_COLOR_BUTTON (widget))
+ else if (GTK_IS_COLOR_CHOOSER (widget))
signal_name = "notify::color";
else if (GTK_IS_FONT_BUTTON (widget))
signal_name = "notify::font-name";