summaryrefslogtreecommitdiff
path: root/applets/wncklet
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-02-11 08:04:05 +0100
committerWolfgang Ulbrich <[email protected]>2016-02-12 07:04:31 +0100
commitefa22493824093113ca4dd8616f15b1ce4d5bb23 (patch)
tree107169973c40224892f81419be5c7d7996b6d367 /applets/wncklet
parent0aa05dc52ee3c1988c6a33b529bdee3275693e2d (diff)
downloadmate-panel-efa22493824093113ca4dd8616f15b1ce4d5bb23.tar.bz2
mate-panel-efa22493824093113ca4dd8616f15b1ce4d5bb23.tar.xz
Gtk+-3.20 window-menu: remove deprecated style properties
taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=080b953
Diffstat (limited to 'applets/wncklet')
-rw-r--r--applets/wncklet/window-menu.c15
1 files changed, 13 insertions, 2 deletions
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);