From efa22493824093113ca4dd8616f15b1ce4d5bb23 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 11 Feb 2016 08:04:05 +0100 Subject: Gtk+-3.20 window-menu: remove deprecated style properties taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=080b953 --- applets/wncklet/window-menu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'applets/wncklet') diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c index d56c77fc..e457eeeb 100644 --- a/applets/wncklet/window-menu.c +++ b/applets/wncklet/window-menu.c @@ -167,9 +167,10 @@ static gboolean window_menu_on_expose (GtkWidget* widget, } #endif +#if GTK_CHECK_VERSION (3, 0, 0) +#if !GTK_CHECK_VERSION (3, 19, 0) static inline void force_no_focus_padding(GtkWidget* widget) { -#if GTK_CHECK_VERSION (3, 0, 0) GtkCssProvider *provider; provider = gtk_css_provider_new (); @@ -183,7 +184,13 @@ static inline void force_no_focus_padding(GtkWidget* widget) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (provider); + + gtk_widget_set_name(widget, "PanelApplet-window-menu-applet-button"); +} +#endif #else +static inline void force_no_focus_padding(GtkWidget* widget) +{ gboolean first_time = TRUE; if (first_time) @@ -199,10 +206,10 @@ static inline void force_no_focus_padding(GtkWidget* widget) "\n"); first_time = FALSE; } -#endif gtk_widget_set_name(widget, "PanelApplet-window-menu-applet-button"); } +#endif static void window_menu_size_allocate(MatePanelApplet* applet, GtkAllocation* allocation, WindowMenu* window_menu) { @@ -294,7 +301,11 @@ gboolean window_menu_applet_fill(MatePanelApplet* applet) window_menu = g_new0(WindowMenu, 1); window_menu->applet = GTK_WIDGET(applet); +#if GTK_CHECK_VERSION (3, 19, 0) + gtk_widget_set_name (window_menu->applet, "window-menu-applet-button"); +#else force_no_focus_padding(window_menu->applet); +#endif gtk_widget_set_tooltip_text(window_menu->applet, _("Window Selector")); mate_panel_applet_set_flags(applet, MATE_PANEL_APPLET_EXPAND_MINOR); -- cgit v1.2.1