summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-06-26 10:15:44 +0200
committerStefano Karapetsas <[email protected]>2014-06-26 10:15:44 +0200
commit2f746fd147e67581db21421ff22d8ea68f13d4d2 (patch)
treeb62df0ed21b252872e00841c7c1c7cc9be441273
parentc5cd7ee4a663d862a5893fb48cbfb087540978cc (diff)
downloadmate-panel-2f746fd147e67581db21421ff22d8ea68f13d4d2.tar.bz2
mate-panel-2f746fd147e67581db21421ff22d8ea68f13d4d2.tar.xz
Use MateColorButton in panel properties dialog
-rw-r--r--mate-panel/panel-properties-dialog.c22
-rw-r--r--mate-panel/panel-properties-dialog.ui2
2 files changed, 13 insertions, 11 deletions
diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c
index c1bb735f..412371de 100644
--- a/mate-panel/panel-properties-dialog.c
+++ b/mate-panel/panel-properties-dialog.c
@@ -36,6 +36,8 @@
#include <libpanel-util/panel-icon-chooser.h>
#include <libpanel-util/panel-show.h>
+#include <libmate-desktop/mate-colorbutton.h>
+
#include "nothing.h"
#include "panel-profile.h"
#include "panel-schemas.h"
@@ -327,7 +329,7 @@ SETUP_TOGGLE_BUTTON ("arrows_toggle", arrows_toggle, enable_arrows,
static void
panel_properties_dialog_color_changed (PanelPropertiesDialog *dialog,
- GtkColorButton *color_button)
+ MateColorButton *color_button)
{
#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color;
@@ -338,11 +340,11 @@ 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);
+ mate_color_button_get_rgba (color_button, &color);
panel_profile_set_background_gdk_rgba_color (dialog->toplevel, &color);
panel_properties_dialog_opacity_changed(dialog);
#else
- gtk_color_button_get_color (color_button, &color);
+ mate_color_button_get_color (color_button, &color);
panel_profile_set_background_gdk_color (dialog->toplevel, &color);
#endif
}
@@ -365,11 +367,11 @@ 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),
+ mate_color_button_set_rgba (MATE_COLOR_BUTTON (dialog->color_button),
&color);
#else
- gtk_color_button_set_color (GTK_COLOR_BUTTON (dialog->color_button),
- &(color.gdk));
+ mate_color_button_set_color (MATE_COLOR_BUTTON (dialog->color_button),
+ &(color.gdk));
#endif
g_signal_connect_swapped (dialog->color_button, "color_set",
@@ -730,9 +732,9 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog,
return;
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_color_button_get_rgba (GTK_COLOR_BUTTON (dialog->color_button),
+ mate_color_button_get_rgba (MATE_COLOR_BUTTON (dialog->color_button),
#else
- gtk_color_button_get_color (GTK_COLOR_BUTTON (dialog->color_button),
+ mate_color_button_get_color (MATE_COLOR_BUTTON (dialog->color_button),
#endif
&old_color);
@@ -740,9 +742,9 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog,
old_color.green != new_color.green ||
old_color.blue != new_color.blue)
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_color_button_set_rgba (GTK_COLOR_BUTTON (dialog->color_button),
+ mate_color_button_set_rgba (MATE_COLOR_BUTTON (dialog->color_button),
#else
- gtk_color_button_set_color (GTK_COLOR_BUTTON (dialog->color_button),
+ mate_color_button_set_color (MATE_COLOR_BUTTON (dialog->color_button),
#endif
&new_color);
}
diff --git a/mate-panel/panel-properties-dialog.ui b/mate-panel/panel-properties-dialog.ui
index 30bb2ce0..e57969d8 100644
--- a/mate-panel/panel-properties-dialog.ui
+++ b/mate-panel/panel-properties-dialog.ui
@@ -369,7 +369,7 @@
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkColorButton" id="color_button">
+ <object class="MateColorButton" id="color_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>