diff options
author | monsta <[email protected]> | 2016-11-21 21:14:26 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-21 21:14:26 +0300 |
commit | d0ddaedffa7d417a699cafce73c1e418515c4a28 (patch) | |
tree | 645b7a86e32b21113e1ce14f563bfb8d8900fa53 /applets/wncklet/showdesktop.c | |
parent | 7dfeb78328039cf92a9f45d64c9b3662d967a1fe (diff) | |
download | mate-panel-d0ddaedffa7d417a699cafce73c1e418515c4a28.tar.bz2 mate-panel-d0ddaedffa7d417a699cafce73c1e418515c4a28.tar.xz |
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require libmate-desktop >= 1.17
WARNING: use GTK+3 build of libmateweather for this build.
that lib is not migrated to GTK+3 only as we will possibly
use libgweather instead of it.
Diffstat (limited to 'applets/wncklet/showdesktop.c')
-rw-r--r-- | applets/wncklet/showdesktop.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c index a205d9b0..e23ea361 100644 --- a/applets/wncklet/showdesktop.c +++ b/applets/wncklet/showdesktop.c @@ -130,13 +130,9 @@ static void button_size_allocated(GtkWidget* button, GtkAllocation* allocation, static void update_icon(ShowDesktopData* sdd) { -#if GTK_CHECK_VERSION (3, 0, 0) GtkStyleContext *context; GtkStateFlags state; GtkBorder padding; -#else - GtkStyle* style; -#endif int width, height; GdkPixbuf* icon; GdkPixbuf* scaled; @@ -151,7 +147,6 @@ static void update_icon(ShowDesktopData* sdd) if (!sdd->icon_theme) return; -#if GTK_CHECK_VERSION (3, 0, 0) state = gtk_widget_get_state_flags (sdd->button); context = gtk_widget_get_style_context (sdd->button); gtk_style_context_get_padding (context, state, &padding); @@ -175,23 +170,6 @@ static void update_icon(ShowDesktopData* sdd) #else icon_size = sdd->size - 2 * (focus_width + focus_pad) - thickness; #endif -#else - gtk_widget_style_get (sdd->button, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL); - - style = gtk_widget_get_style(sdd->button); - - switch (sdd->orient) - { - case GTK_ORIENTATION_HORIZONTAL: - thickness = style->ythickness; - break; - case GTK_ORIENTATION_VERTICAL: - thickness = style->xthickness; - break; - } - - icon_size = sdd->size - 2 * (focus_width + focus_pad) - thickness; -#endif if (icon_size < 22) icon_size = 16; @@ -409,11 +387,9 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet) GtkActionGroup* action_group; gchar* ui_path; AtkObject* atk_obj; -#if GTK_CHECK_VERSION (3, 0, 0) #if !GTK_CHECK_VERSION (3, 20, 0) GtkCssProvider *provider; #endif -#endif mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR); @@ -443,7 +419,6 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet) sdd->button = gtk_toggle_button_new (); gtk_widget_set_name (sdd->button, "showdesktop-button"); -#if GTK_CHECK_VERSION (3, 0, 0) #if !GTK_CHECK_VERSION (3, 20, 0) provider = gtk_css_provider_new (); gtk_css_provider_load_from_data (provider, @@ -457,17 +432,6 @@ gboolean show_desktop_applet_fill(MatePanelApplet* applet) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (provider); #endif -#else - gtk_rc_parse_string ("\n" - " style \"showdesktop-button-style\"\n" - " {\n" - " GtkWidget::focus-line-width=0\n" - " GtkWidget::focus-padding=0\n" - " }\n" - "\n" - " widget \"*.showdesktop-button\" style \"showdesktop-button-style\"\n" - "\n"); -#endif atk_obj = gtk_widget_get_accessible(sdd->button); atk_object_set_name (atk_obj, _("Show Desktop Button")); |