summaryrefslogtreecommitdiff
path: root/capplets/appearance/mate-wp-item.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/mate-wp-item.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/mate-wp-item.c')
-rw-r--r--capplets/appearance/mate-wp-item.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/capplets/appearance/mate-wp-item.c b/capplets/appearance/mate-wp-item.c
index 9daef0d0..766f1b7a 100644
--- a/capplets/appearance/mate-wp-item.c
+++ b/capplets/appearance/mate-wp-item.c
@@ -118,11 +118,7 @@ void mate_wp_item_ensure_mate_bg (MateWPItem *item)
void mate_wp_item_update (MateWPItem *item) {
GSettings *settings;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color1 = { 0, 0, 0, 1.0 }, color2 = { 0, 0, 0, 1.0 };
-#else
- GdkColor color1 = { 0, 0, 0, 0 }, color2 = { 0, 0, 0, 0 };
-#endif
gchar *s;
settings = g_settings_new (WP_SCHEMA);
@@ -133,45 +129,26 @@ void mate_wp_item_update (MateWPItem *item) {
s = g_settings_get_string (settings, WP_PCOLOR_KEY);
if (s != NULL) {
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_parse (&color1, s);
-#else
- gdk_color_parse (s, &color1);
-#endif
g_free (s);
}
s = g_settings_get_string (settings, WP_SCOLOR_KEY);
if (s != NULL) {
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_parse (&color2, s);
-#else
- gdk_color_parse (s, &color2);
-#endif
g_free (s);
}
g_object_unref (settings);
if (item->pcolor != NULL)
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_free (item->pcolor);
-#else
- gdk_color_free (item->pcolor);
-#endif
if (item->scolor != NULL)
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_free (item->scolor);
item->pcolor = gdk_rgba_copy (&color1);
item->scolor = gdk_rgba_copy (&color2);
-#else
- gdk_color_free (item->scolor);
-
- item->pcolor = gdk_color_copy (&color1);
- item->scolor = gdk_color_copy (&color2);
-#endif
}
MateWPItem * mate_wp_item_new (const gchar * filename,
@@ -215,17 +192,10 @@ void mate_wp_item_free (MateWPItem * item) {
g_free (item->description);
if (item->pcolor != NULL)
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_free (item->pcolor);
if (item->scolor != NULL)
gdk_rgba_free (item->scolor);
-#else
- gdk_color_free (item->pcolor);
-
- if (item->scolor != NULL)
- gdk_color_free (item->scolor);
-#endif
mate_wp_info_free (item->fileinfo);
if (item->bg)