diff options
Diffstat (limited to 'capplets/appearance')
-rw-r--r-- | capplets/appearance/appearance-desktop.c | 50 | ||||
-rw-r--r-- | capplets/appearance/appearance-font.c | 16 | ||||
-rw-r--r-- | capplets/appearance/appearance-main.c | 14 | ||||
-rw-r--r-- | capplets/appearance/appearance-style.c | 56 | ||||
-rw-r--r-- | capplets/appearance/appearance-themes.c | 23 | ||||
-rw-r--r-- | capplets/appearance/appearance-ui.c | 91 | ||||
-rw-r--r-- | capplets/appearance/mate-wp-item.c | 30 | ||||
-rw-r--r-- | capplets/appearance/mate-wp-item.h | 5 | ||||
-rw-r--r-- | capplets/appearance/mate-wp-xml.c | 25 | ||||
-rw-r--r-- | capplets/appearance/theme-installer.c | 7 |
10 files changed, 4 insertions, 313 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) { diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c index 26db940e..af2a1a41 100644 --- a/capplets/appearance/appearance-font.c +++ b/capplets/appearance/appearance-font.c @@ -46,11 +46,7 @@ static gboolean in_change = FALSE; -#if GTK_CHECK_VERSION (3, 0, 0) static void sample_draw(GtkWidget* darea, cairo_t* cr) -#else -static void sample_expose(GtkWidget* darea, GdkEventExpose* expose) -#endif { cairo_surface_t* surface = g_object_get_data(G_OBJECT(darea), "sample-surface"); GtkAllocation allocation; @@ -62,10 +58,6 @@ static void sample_expose(GtkWidget* darea, GdkEventExpose* expose) w = cairo_image_surface_get_width (surface); h = cairo_image_surface_get_height (surface); -#if !GTK_CHECK_VERSION (3, 0, 0) - cairo_t *cr = gdk_cairo_create (expose->window); -#endif - cairo_set_line_width (cr, 1); cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); @@ -78,10 +70,6 @@ static void sample_expose(GtkWidget* darea, GdkEventExpose* expose) cairo_set_source_surface (cr, surface, (x - w) / 2, (y - h) / 2); cairo_paint(cr); - -#if !GTK_CHECK_VERSION (3, 0, 0) - cairo_destroy (cr); -#endif } typedef enum { @@ -188,11 +176,7 @@ static void setup_font_sample(GtkWidget* darea, Antialiasing antialiasing, Hinti g_object_set_data_full(G_OBJECT(darea), "sample-surface", surface, (GDestroyNotify) cairo_surface_destroy); gtk_widget_set_size_request (GTK_WIDGET(darea), width + 2, height + 2); -#if GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(darea, "draw", G_CALLBACK(sample_draw), NULL); -#else - g_signal_connect(darea, "expose_event", G_CALLBACK(sample_expose), NULL); -#endif } /* diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c index 91040e62..b2b77353 100644 --- a/capplets/appearance/appearance-main.c +++ b/capplets/appearance/appearance-main.c @@ -40,11 +40,6 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context) GtkBuilder *ui; GError *err = NULL; -#if !GTK_CHECK_VERSION (3, 0, 0) - gdk_threads_init (); - gdk_threads_enter (); -#endif - theme_thumbnail_factory_init (*argc, *argv); capplet_init (context, argc, argv); activate_settings_daemon (); @@ -147,9 +142,7 @@ main (int argc, char **argv) { AppearanceData *data; GtkWidget *w; -#if GTK_CHECK_VERSION(3, 0, 0) GtkStyleContext *context; -#endif gchar *install_filename = NULL; gchar *start_page = NULL; @@ -202,10 +195,9 @@ main (int argc, char **argv) /* prepare the main window */ w = appearance_capplet_get_widget (data, "appearance_window"); -#if GTK_CHECK_VERSION(3, 0, 0) context = gtk_widget_get_style_context (GTK_WIDGET (w)); gtk_style_context_add_class (context, "appearance-window"); -#endif + capplet_set_icon (w, "preferences-desktop-theme"); gtk_widget_show_all (w); @@ -247,10 +239,6 @@ main (int argc, char **argv) /* start the mainloop */ gtk_main (); -#if !GTK_CHECK_VERSION (3, 0, 0) - gdk_threads_leave (); -#endif - /* free stuff */ g_free (data); diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c index a5ad6730..e71e4f83 100644 --- a/capplets/appearance/appearance-style.c +++ b/capplets/appearance/appearance-style.c @@ -240,18 +240,10 @@ static void update_message_area(AppearanceData* data) gtk_misc_set_alignment (GTK_MISC (data->style_message_label), 0.0, 0.5); #endif -#if GTK_CHECK_VERSION (3, 0, 0) hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9); -#else - hbox = gtk_hbox_new (FALSE, 9); -#endif icon = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (icon, GTK_ALIGN_CENTER); gtk_widget_set_valign (icon, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0); -#endif gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), data->style_message_label, TRUE, TRUE, 0); content = gtk_info_bar_get_content_area (GTK_INFO_BAR (data->style_message_area)); @@ -263,43 +255,13 @@ static void update_message_area(AppearanceData* data) gtk_box_pack_start (GTK_BOX (parent), data->style_message_area, FALSE, FALSE, 0); } -#if !GTK_CHECK_VERSION (3, 0, 0) - if (engine != NULL) - { - gchar* message = g_strdup_printf(_("This theme will not look as intended because the required GTK+ theme engine '%s' is not installed."), engine); - gtk_label_set_text(GTK_LABEL(data->style_message_label), message); - g_free(message); - g_free(engine); - - if (packagekit_available()) - { - gtk_widget_show(data->style_install_button); - } - else - { - gtk_widget_hide(data->style_install_button); - } - - gtk_widget_show(data->style_message_area); - gtk_widget_queue_draw(data->style_message_area); - } - else - { - gtk_widget_hide(data->style_message_area); - } -#else gtk_widget_hide(data->style_message_area); -#endif } static void update_color_buttons_from_string (const gchar *color_scheme, AppearanceData *data) { -#if GTK_CHECK_VERSION (3, 0, 0) GdkRGBA colors[NUM_SYMBOLIC_COLORS]; -#else - GdkColor colors[NUM_SYMBOLIC_COLORS]; -#endif GtkWidget *widget; gint i; @@ -309,11 +271,7 @@ update_color_buttons_from_string (const gchar *color_scheme, AppearanceData *dat /* now set all the buttons to the correct settings */ for (i = 0; i < NUM_SYMBOLIC_COLORS; ++i) { widget = appearance_capplet_get_widget (data, symbolic_names[i]); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (widget), &colors[i]); -#else - gtk_color_button_set_color (GTK_COLOR_BUTTON (widget), &colors[i]); -#endif } } @@ -384,11 +342,7 @@ static void color_button_clicked_cb (GtkWidget *colorbutton, AppearanceData *data) { GtkWidget *widget; -#if GTK_CHECK_VERSION (3, 0, 0) GdkRGBA color; -#else - GdkColor color; -#endif GString *scheme = g_string_new (NULL); gchar *colstr; gchar *old_scheme = NULL; @@ -396,17 +350,9 @@ color_button_clicked_cb (GtkWidget *colorbutton, AppearanceData *data) for (i = 0; i < NUM_SYMBOLIC_COLORS; ++i) { widget = appearance_capplet_get_widget (data, symbolic_names[i]); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &color); -#else - gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &color); -#endif -#if GTK_CHECK_VERSION (3, 0, 0) colstr = gdk_rgba_to_string (&color); -#else - colstr = gdk_color_to_string (&color); -#endif g_string_append_printf (scheme, "%s:%s\n", symbolic_names[i], colstr); g_free (colstr); } @@ -1070,10 +1016,8 @@ style_init (AppearanceData *data) icon_theme_changed (data->interface_settings, ICON_THEME_KEY, data); cursor_theme_changed (data->mouse_settings, CURSOR_THEME_KEY, data); -#if GTK_CHECK_VERSION (3, 0, 0) GtkNotebook *style_nb = GTK_NOTEBOOK (appearance_capplet_get_widget (data, "notebook2")); gtk_notebook_remove_page (style_nb, 1); -#endif w = appearance_capplet_get_widget (data, "color_scheme_message_hbox"); gtk_widget_set_no_show_all (w, TRUE); diff --git a/capplets/appearance/appearance-themes.c b/capplets/appearance/appearance-themes.c index 6669e822..0025e90e 100644 --- a/capplets/appearance/appearance-themes.c +++ b/capplets/appearance/appearance-themes.c @@ -667,23 +667,14 @@ theme_message_area_update (AppearanceData *data) gtk_misc_set_alignment (GTK_MISC (data->theme_message_label), 0.0, 0.5); #endif -#if GTK_CHECK_VERSION (3, 0, 0) hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9); -#else - hbox = gtk_hbox_new (FALSE, 9); -#endif gtk_widget_show (hbox); data->theme_info_icon = gtk_image_new_from_icon_name ("dialog-information", GTK_ICON_SIZE_DIALOG); data->theme_error_icon = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (data->theme_info_icon, GTK_ALIGN_CENTER); gtk_widget_set_valign (data->theme_info_icon, GTK_ALIGN_START); gtk_widget_set_halign (data->theme_error_icon, GTK_ALIGN_CENTER); gtk_widget_set_valign (data->theme_error_icon, GTK_ALIGN_START); -#else - gtk_misc_set_alignment (GTK_MISC (data->theme_info_icon), 0.5, 0.0); - gtk_misc_set_alignment (GTK_MISC (data->theme_error_icon), 0.5, 0.0); -#endif gtk_box_pack_start (GTK_BOX (hbox), data->theme_info_icon, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), data->theme_error_icon, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), data->theme_message_label, TRUE, TRUE, 0); @@ -1072,20 +1063,8 @@ void themes_init(AppearanceData* data) "wrap-mode", PANGO_WRAP_WORD_CHAR, "wrap-width", gtk_icon_view_get_item_width (icon_view), "width", gtk_icon_view_get_item_width (icon_view), -#if GTK_CHECK_VERSION (3, 0, 0) - /* The xalign property should be 0.5 here, but due to a bug - * which was never fixed in GTK+2, it was set to 0.0. - * In GTK+3 the bug is fixed, so this workaround causes - * theme name to be left-aligned instead of being centered. - * So set it to 0.5 for GTK+3. - * - * The fix was applied in - * https://git.gnome.org/browse/gtk+/commit?id=09bf05b - */ "xalign", 0.5, "yalign", 0.0, NULL); -#else - "xalign", 0.0, "yalign", 0.0, NULL); -#endif + gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (icon_view), renderer, FALSE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (icon_view), renderer, "markup", COL_LABEL, NULL); diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c index 04b8a49e..00427e96 100644 --- a/capplets/appearance/appearance-ui.c +++ b/capplets/appearance/appearance-ui.c @@ -50,21 +50,6 @@ show_handlebar (AppearanceData *data, gboolean show) g_object_unref (toolbar); } -#if !GTK_CHECK_VERSION (3, 10, 0) -static void -set_toolbar_style (AppearanceData *data, const char *value) -{ - static const GtkToolbarStyle gtk_toolbar_styles[] = - { GTK_TOOLBAR_BOTH, GTK_TOOLBAR_BOTH_HORIZ, GTK_TOOLBAR_ICONS, GTK_TOOLBAR_TEXT }; - - int enum_val = gtk_combo_box_get_active((GtkComboBox *) - appearance_capplet_get_widget (data, "toolbar_style_select")); - - gtk_toolbar_set_style (GTK_TOOLBAR (appearance_capplet_get_widget (data, "toolbar_toolbar")), - gtk_toolbar_styles[enum_val]); -} -#endif - static void set_have_icons (AppearanceData *data, gboolean value) { @@ -101,48 +86,6 @@ set_have_icons (AppearanceData *data, gboolean value) } } -/** GConf Callbacks and Conversions **/ - -#if !GTK_CHECK_VERSION (3, 10, 0) -static gboolean -toolbar_to_widget (GValue *value, GVariant *variant, gpointer user_data) -{ - const gchar *val = g_variant_get_string(variant, NULL); - gint i = 0; - - if (g_strcmp0(val, "both-horiz") == 0 || g_strcmp0(val, "both_horiz") == 0) - i = 1; - else if (g_strcmp0(val, "icons") == 0) - i = 2; - else if (g_strcmp0(val, "text") == 0) - i = 3; - - g_value_set_int(value, i); - - return TRUE; -} - -static GVariant * -toolbar_from_widget (const GValue *value, - const GVariantType *expected_type, - gpointer user_data) -{ - static const char *gtk_toolbar_styles_str[] = { - "both", "both-horiz", "icons", "text" }; - - gint index = g_value_get_int(value); - return g_variant_new_string(gtk_toolbar_styles_str[index]); -} - -static void -toolbar_style_cb (GSettings *settings, - gchar *key, - AppearanceData *data) -{ - set_toolbar_style (data, g_settings_get_string (settings, key)); -} -#endif - static void menus_have_icons_cb (GSettings *settings, gchar *key, @@ -176,7 +119,7 @@ ui_init (AppearanceData *data) { GtkWidget* widget; -#if GTK_CHECK_VERSION (3, 10, 0) + /* FIXME maybe just remove that stuff from .ui file */ GtkWidget* container = appearance_capplet_get_widget(data, "vbox24"); // Remove menu accels and toolbar style toggles for new GTK versions @@ -184,7 +127,6 @@ ui_init (AppearanceData *data) appearance_capplet_get_widget(data, "menu_accel_toggle")); gtk_container_remove((GtkContainer *) container, appearance_capplet_get_widget(data, "hbox11")); -#endif widget = appearance_capplet_get_widget(data, "menu_icons_toggle"); g_settings_bind (data->interface_settings, @@ -199,37 +141,6 @@ ui_init (AppearanceData *data) g_settings_get_boolean (data->interface_settings, MENU_ICONS_KEY)); -#if !GTK_CHECK_VERSION (3, 10, 0) - widget = appearance_capplet_get_widget(data, "menu_accel_toggle"); - g_settings_bind (data->interface_settings, - ACCEL_CHANGE_KEY, - G_OBJECT (widget), - "active", - G_SETTINGS_BIND_DEFAULT); - - widget = appearance_capplet_get_widget(data, "toolbar_style_select"); - g_settings_bind_with_mapping (data->interface_settings, - TOOLBAR_STYLE_KEY, - G_OBJECT (widget), - "active", - G_SETTINGS_BIND_DEFAULT, - toolbar_to_widget, - toolbar_from_widget, - data, - NULL); - - g_signal_connect (data->interface_settings, "changed::" TOOLBAR_STYLE_KEY, - (GCallback) toolbar_style_cb, data); - - char* toolbar_style; - - toolbar_style = g_settings_get_string - (data->interface_settings, - TOOLBAR_STYLE_KEY); - set_toolbar_style (data, toolbar_style); - g_free (toolbar_style); -#endif - g_signal_connect (appearance_capplet_get_widget (data, "toolbar_handlebox"), "button_press_event", (GCallback) button_press_block_cb, NULL); 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) diff --git a/capplets/appearance/mate-wp-item.h b/capplets/appearance/mate-wp-item.h index f75b8474..0f04081b 100644 --- a/capplets/appearance/mate-wp-item.h +++ b/capplets/appearance/mate-wp-item.h @@ -45,13 +45,8 @@ struct _MateWPItem { GtkTreeRowReference * rowref; /* Real colors */ -#if GTK_CHECK_VERSION (3, 0, 0) GdkRGBA * pcolor; GdkRGBA * scolor; -#else - GdkColor * pcolor; - GdkColor * scolor; -#endif MateWPInfo * fileinfo; 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); diff --git a/capplets/appearance/theme-installer.c b/capplets/appearance/theme-installer.c index 20b89e59..2ffb1158 100644 --- a/capplets/appearance/theme-installer.c +++ b/capplets/appearance/theme-installer.c @@ -628,9 +628,6 @@ static void transfer_done_cb (GtkWidget *dialog, TransferData *tdata) { -#if !GTK_CHECK_VERSION (3, 0, 0) - gdk_threads_enter (); -#endif /* XXX: path should be on the local filesystem by now? */ if (dialog != NULL) { @@ -641,10 +638,6 @@ transfer_done_cb (GtkWidget *dialog, g_free (tdata->path); g_free (tdata); - -#if !GTK_CHECK_VERSION (3, 0, 0) - gdk_threads_leave (); -#endif } void |