summaryrefslogtreecommitdiff
path: root/applets/notification_area
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-23 09:58:59 +0100
committerinfirit <[email protected]>2014-11-23 09:58:59 +0100
commitaacf27bff567db88eea7ca965cb3cdaa2fde1397 (patch)
treefe404c38ff885341c1d8a8708d780c05863afd89 /applets/notification_area
parent175d93f66a33ff26159de004c92d26b9e15e5c67 (diff)
downloadmate-panel-aacf27bff567db88eea7ca965cb3cdaa2fde1397.tar.bz2
mate-panel-aacf27bff567db88eea7ca965cb3cdaa2fde1397.tar.xz
Gtk3: notification_area: Port to GtkStyleContext
Based on gnome-panel commit: 6d390be628ce8fccbfee5c5cca4e240fa391cdda From: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'applets/notification_area')
-rw-r--r--applets/notification_area/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 71b9b2e5..e5728174 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -210,6 +210,21 @@ static void on_applet_realized(GtkWidget* widget, gpointer user_data)
static inline void force_no_focus_padding(GtkWidget* widget)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkCssProvider *provider;
+
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider,
+ "#na-tray {\n"
+ " -GtkWidget-focus-line-width: 0px;\n"
+ " -GtkWidget-focus-padding: 0px; }",
+ -1, NULL);
+
+ gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+#else
static gboolean first_time = TRUE;
if (first_time)
@@ -231,6 +246,8 @@ static inline void force_no_focus_padding(GtkWidget* widget)
*
* Issue #27
*/
+#endif
+
gtk_widget_set_name(widget, "PanelAppletNaTray");
}