From 3a0f5c2fb9a270c7f987626f2973d12794dfe89c Mon Sep 17 00:00:00 2001 From: raveit65 Date: Thu, 4 Aug 2016 13:54:48 +0200 Subject: Gtk+-2 properties-dialog: use Mate-ColorButton for gtk2 build --- mate-panel/panel-properties-dialog.c | 14 +++++++++----- mate-panel/panel-properties-dialog.ui | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c index ee7922c3..b45c0188 100644 --- a/mate-panel/panel-properties-dialog.c +++ b/mate-panel/panel-properties-dialog.c @@ -36,6 +36,10 @@ #include #include +#if !GTK_CHECK_VERSION (3, 0, 0) +#include +#endif + #include "nothing.h" #include "panel-profile.h" #include "panel-schemas.h" @@ -330,7 +334,7 @@ panel_properties_dialog_color_changed (PanelPropertiesDialog *dialog, #if GTK_CHECK_VERSION (3, 0, 0) GtkColorChooser *color_button) #else - GtkColorButton *color_button) + MateColorButton *color_button) #endif { #if GTK_CHECK_VERSION (3, 0, 0) @@ -346,7 +350,7 @@ panel_properties_dialog_color_changed (PanelPropertiesDialog *dialog, panel_profile_set_background_gdk_rgba (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 } @@ -372,7 +376,7 @@ panel_properties_dialog_setup_color_button (PanelPropertiesDialog *dialog, gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog->color_button), &color); #else - gtk_color_button_set_color (GTK_COLOR_BUTTON (dialog->color_button), + mate_color_button_set_color (MATE_COLOR_BUTTON (dialog->color_button), &(color.gdk)); #endif @@ -738,11 +742,11 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog, if (!gdk_color_parse (str_color, &new_color)) return; - gtk_color_button_get_color (GTK_COLOR_BUTTON (dialog->color_button), + mate_color_button_get_color (MATE_COLOR_BUTTON (dialog->color_button), &old_color); if (!gdk_color_equal (&old_color, &new_color)) - gtk_color_button_set_color (GTK_COLOR_BUTTON (dialog->color_button), + mate_color_button_set_color (MATE_COLOR_BUTTON (dialog->color_button), &new_color); #endif } 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 @@ 12 6 - + True True False -- cgit v1.2.1