diff options
author | infirit <[email protected]> | 2014-11-23 09:58:59 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-23 09:58:59 +0100 |
commit | aacf27bff567db88eea7ca965cb3cdaa2fde1397 (patch) | |
tree | fe404c38ff885341c1d8a8708d780c05863afd89 /applets | |
parent | 175d93f66a33ff26159de004c92d26b9e15e5c67 (diff) | |
download | mate-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')
-rw-r--r-- | applets/notification_area/main.c | 17 |
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"); } |