summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-08-03 01:18:44 +0200
committerraveit65 <[email protected]>2016-08-31 15:10:57 +0200
commit70e2fc7377121a7b905bb444634f9226a79e649b (patch)
tree37aec56108cb8d358db72d704b1c3a1b62d1280a
parentd45dd88c9028fa69e543ded6909cd1da1a7ae842 (diff)
downloadmate-panel-70e2fc7377121a7b905bb444634f9226a79e649b.tar.bz2
mate-panel-70e2fc7377121a7b905bb444634f9226a79e649b.tar.xz
GTK+-3 properties-dialog: port to GtkColorChooser
-rw-r--r--mate-panel/panel-properties-dialog-gtk3.ui2
-rw-r--r--mate-panel/panel-properties-dialog.c14
2 files changed, 10 insertions, 6 deletions
diff --git a/mate-panel/panel-properties-dialog-gtk3.ui b/mate-panel/panel-properties-dialog-gtk3.ui
index 886d29cd..46cd00c3 100644
--- a/mate-panel/panel-properties-dialog-gtk3.ui
+++ b/mate-panel/panel-properties-dialog-gtk3.ui
@@ -477,7 +477,7 @@ Author: Wolfgang Ulbrich
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="MateColorButton" id="color_button">
+ <object class="GtkColorButton" id="color_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c
index 490940a5..ee7922c3 100644
--- a/mate-panel/panel-properties-dialog.c
+++ b/mate-panel/panel-properties-dialog.c
@@ -327,7 +327,11 @@ SETUP_TOGGLE_BUTTON ("arrows_toggle", arrows_toggle, enable_arrows,
static void
panel_properties_dialog_color_changed (PanelPropertiesDialog *dialog,
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkColorChooser *color_button)
+#else
GtkColorButton *color_button)
+#endif
{
#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color;
@@ -338,7 +342,7 @@ panel_properties_dialog_color_changed (PanelPropertiesDialog *dialog,
g_assert (dialog->color_button == GTK_WIDGET (color_button));
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_color_button_get_rgba (color_button, &color);
+ gtk_color_chooser_get_rgba (color_button, &color);
panel_profile_set_background_gdk_rgba (dialog->toplevel, &color);
panel_properties_dialog_opacity_changed (dialog);
#else
@@ -365,8 +369,8 @@ panel_properties_dialog_setup_color_button (PanelPropertiesDialog *dialog,
panel_profile_get_background_color (dialog->toplevel, &color);
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_color_button_set_rgba (GTK_COLOR_BUTTON (dialog->color_button),
- &color);
+ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog->color_button),
+ &color);
#else
gtk_color_button_set_color (GTK_COLOR_BUTTON (dialog->color_button),
&(color.gdk));
@@ -721,11 +725,11 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog,
if (!gdk_rgba_parse (&new_color, str_color))
return;
- gtk_color_button_get_rgba (GTK_COLOR_BUTTON (dialog->color_button),
+ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (dialog->color_button),
&old_color);
if (!gdk_rgba_equal (&old_color, &new_color))
- gtk_color_button_set_rgba (GTK_COLOR_BUTTON (dialog->color_button),
+ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog->color_button),
&new_color);
#else
GdkColor new_color = { 0, };