summaryrefslogtreecommitdiff
path: root/capplets/appearance/appearance-desktop.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-12-02 00:45:36 +0300
committermonsta <[email protected]>2016-12-02 00:50:14 +0300
commit0c27d18ab5efb721a2f02549767016c81fc6ce2c (patch)
tree76b7b89cface072e011a3757a833e9090bab44f2 /capplets/appearance/appearance-desktop.c
parent1aa83d45ebf9599c6d4d3f47211c3961282e98f0 (diff)
downloadmate-control-center-0c27d18ab5efb721a2f02549767016c81fc6ce2c.tar.bz2
mate-control-center-0c27d18ab5efb721a2f02549767016c81fc6ce2c.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require libmatekbd, libmate-desktop, marco, m-s-d >= 1.17
Diffstat (limited to 'capplets/appearance/appearance-desktop.c')
-rw-r--r--capplets/appearance/appearance-desktop.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c
index a79e3c5c..e13a54d9 100644
--- a/capplets/appearance/appearance-desktop.c
+++ b/capplets/appearance/appearance-desktop.c
@@ -214,11 +214,7 @@ wp_add_images (AppearanceData *data,
cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
GDK_WATCH);
gdk_window_set_cursor (window, cursor);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
while (images != NULL)
{
@@ -368,25 +364,15 @@ wp_color_changed (AppearanceData *data,
if (item == NULL)
return;
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (data->wp_pcpicker), item->pcolor);
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (data->wp_scpicker), item->scolor);
-#else
- gtk_color_button_get_color (GTK_COLOR_BUTTON (data->wp_pcpicker), item->pcolor);
- gtk_color_button_get_color (GTK_COLOR_BUTTON (data->wp_scpicker), item->scolor);
-#endif
if (update)
{
gchar *pcolor, *scolor;
-#if GTK_CHECK_VERSION (3, 0, 0)
pcolor = gdk_rgba_to_string (item->pcolor);
scolor = gdk_rgba_to_string (item->scolor);
-#else
- pcolor = gdk_color_to_string (item->pcolor);
- scolor = gdk_color_to_string (item->scolor);
-#endif
g_settings_delay (data->wp_settings);
g_settings_set_string (data->wp_settings, WP_PCOLOR_KEY, pcolor);
g_settings_set_string (data->wp_settings, WP_SCOLOR_KEY, scolor);
@@ -509,24 +495,14 @@ wp_color1_changed (GSettings *settings,
gchar *key,
AppearanceData *data)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color;
-#else
- GdkColor color;
-#endif
gchar *colorhex;
colorhex = g_settings_get_string (settings, key);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_parse (&color, colorhex);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (data->wp_pcpicker), &color);
-#else
- gdk_color_parse (colorhex, &color);
-
- gtk_color_button_set_color (GTK_COLOR_BUTTON (data->wp_pcpicker), &color);
-#endif
wp_color_changed (data, FALSE);
@@ -538,26 +514,16 @@ wp_color2_changed (GSettings *settings,
gchar *key,
AppearanceData *data)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color;
-#else
- GdkColor color;
-#endif
gchar *colorhex;
wp_set_sensitivities (data);
colorhex = g_settings_get_string (settings, key);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_parse (&color, colorhex);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (data->wp_scpicker), &color);
-#else
- gdk_color_parse (colorhex, &color);
-
- gtk_color_button_set_color (GTK_COLOR_BUTTON (data->wp_scpicker), &color);
-#endif
wp_color_changed (data, FALSE);
@@ -597,13 +563,8 @@ wp_props_wp_set (AppearanceData *data, MateWPItem *item)
g_settings_set_enum (data->wp_settings, WP_SHADING_KEY, item->shade_type);
-#if GTK_CHECK_VERSION (3, 0, 0)
pcolor = gdk_rgba_to_string (item->pcolor);
scolor = gdk_rgba_to_string (item->scolor);
-#else
- pcolor = gdk_color_to_string (item->pcolor);
- scolor = gdk_color_to_string (item->scolor);
-#endif
g_settings_set_string (data->wp_settings, WP_PCOLOR_KEY, pcolor);
g_settings_set_string (data->wp_settings, WP_SCOLOR_KEY, scolor);
g_free (pcolor);
@@ -631,17 +592,10 @@ wp_props_wp_selected (GtkTreeSelection *selection,
wp_option_menu_set (data, item->shade_type, TRUE);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (data->wp_pcpicker),
item->pcolor);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (data->wp_scpicker),
item->scolor);
-#else
- gtk_color_button_set_color (GTK_COLOR_BUTTON (data->wp_pcpicker),
- item->pcolor);
- gtk_color_button_set_color (GTK_COLOR_BUTTON (data->wp_scpicker),
- item->scolor);
-#endif
wp_props_wp_set (data, item);
}
@@ -755,11 +709,7 @@ wp_drag_received (GtkWidget *widget,
cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
GDK_WATCH);
gdk_window_set_cursor (window, cursor);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
for (uri = uris; *uri; ++uri)
{