summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-01-09 23:04:46 -0500
committermonsta <[email protected]>2017-01-27 16:23:56 +0300
commit259556826d99300aa67b33a2af2cdd6155b9f704 (patch)
treebea1c9fd5117457619f463135b735e630b6c52db
parent7c01782f529d0e55fbce6a3bbbd23318b6cc969e (diff)
downloadmate-panel-259556826d99300aa67b33a2af2cdd6155b9f704.tar.bz2
mate-panel-259556826d99300aa67b33a2af2cdd6155b9f704.tar.xz
GTK 3.20/22: fix warnings from tasklist buttons
Force padding and margins to zero. Borders don't seem to throw warnings here
-rw-r--r--applets/wncklet/window-list.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index b9db7e3c..b91e3a05 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -394,11 +394,30 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
TasklistData* tasklist;
GtkActionGroup* action_group;
gchar* ui_path;
+#if GTK_CHECK_VERSION (3, 20, 0)
+ GtkCssProvider *provider;
+ GdkScreen *screen;
+#endif
tasklist = g_new0(TasklistData, 1);
tasklist->applet = GTK_WIDGET(applet);
+#if GTK_CHECK_VERSION (3, 20, 0)
+ provider = gtk_css_provider_new ();
+ screen = gdk_screen_get_default ();
+ gtk_css_provider_load_from_data (provider,
+ ".mate-panel-menu-bar button,\n"
+ " #tasklist-button {\n"
+ " padding: 0px;\n"
+ " margin: 0px;\n }",
+ -1, NULL);
+ gtk_style_context_add_provider_for_screen (screen,
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+#endif
+
mate_panel_applet_set_flags(MATE_PANEL_APPLET(tasklist->applet), MATE_PANEL_APPLET_EXPAND_MAJOR | MATE_PANEL_APPLET_EXPAND_MINOR | MATE_PANEL_APPLET_HAS_HANDLE);
setup_gsettings(tasklist);