summaryrefslogtreecommitdiff
path: root/capplets/appearance/mate-wp-xml.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-xml.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-xml.c')
-rw-r--r--capplets/appearance/mate-wp-xml.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/capplets/appearance/mate-wp-xml.c b/capplets/appearance/mate-wp-xml.c
index 2ef58fa0..8a998630 100644
--- a/capplets/appearance/mate-wp-xml.c
+++ b/capplets/appearance/mate-wp-xml.c
@@ -124,13 +124,8 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename)
xmlNode* wpa;
xmlChar* nodelang;
const char* const* syslangs;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color1;
GdkRGBA color2;
-#else
- GdkColor color1;
- GdkColor color2;
-#endif
gint i;
wplist = xmlParseFile(filename);
@@ -275,11 +270,7 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename)
continue;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
/* Verify the colors and alloc some GdkRGBA here */
-#else
- /* Verify the colors and alloc some GdkColors here */
-#endif
if (!have_scale)
{
wp->options = g_settings_get_enum(data->wp_settings, WP_OPTIONS_KEY);
@@ -305,7 +296,6 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename)
wp->artist = g_strdup ("(none)");
}
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_rgba_parse(&color1, pcolor);
gdk_rgba_parse(&color2, scolor);
g_free(pcolor);
@@ -313,15 +303,6 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename)
wp->pcolor = gdk_rgba_copy(&color1);
wp->scolor = gdk_rgba_copy(&color2);
-#else
- gdk_color_parse(pcolor, &color1);
- gdk_color_parse(scolor, &color2);
- g_free(pcolor);
- g_free(scolor);
-
- wp->pcolor = gdk_color_copy(&color1);
- wp->scolor = gdk_color_copy(&color2);
-#endif
if ((wp->filename != NULL && g_file_test (wp->filename, G_FILE_TEST_EXISTS)) || !strcmp (wp->filename, "(none)"))
{
@@ -523,13 +504,9 @@ void mate_wp_xml_save_list(AppearanceData* data)
filename = g_filename_to_utf8(wpitem->filename, -1, NULL, NULL, NULL);
}
-#if GTK_CHECK_VERSION (3, 0, 0)
pcolor = gdk_rgba_to_string(wpitem->pcolor);
scolor = gdk_rgba_to_string(wpitem->scolor);
-#else
- pcolor = gdk_color_to_string(wpitem->pcolor);
- scolor = gdk_color_to_string(wpitem->scolor);
-#endif
+
scale = wp_item_option_to_string(wpitem->options);
shade = wp_item_shading_to_string(wpitem->shade_type);