From aacf27bff567db88eea7ca965cb3cdaa2fde1397 Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 23 Nov 2014 09:58:59 +0100 Subject: Gtk3: notification_area: Port to GtkStyleContext Based on gnome-panel commit: 6d390be628ce8fccbfee5c5cca4e240fa391cdda From: Carlos Garcia Campos --- applets/notification_area/main.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'applets') 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"); } -- cgit v1.2.1