1 From 58b73a9e3129eb25f030f8d02bcd15303b300814 Mon Sep 17 00:00:00 2001
2 From: Daniel Drake <dsd@laptop.org>
3 Date: Mon, 17 Dec 2012 14:58:20 +0000
4 Subject: [PATCH] na: apply style after realize
6 Under Fedora 18 (GTK-3.6.2), notification icons such as the battery/power
7 icon from gnome-settings-daemon are appearing all-black on top of a black
10 This is because style_updated is being called before the tray applet
11 is realized, meaning that the following code in
12 na_tray_applet_style_updated() causes a bail-out:
14 if (!applet->priv->tray)
17 and the style is never applied.
19 Fix this by updating the style explicitly after realizing the widget.
21 applets/notification_area/main.c | 3 +++
22 1 file changed, 3 insertions(+)
24 diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
25 index 5fc4d1d..5dad715 100644
26 --- a/applets/notification_area/main.c
27 +++ b/applets/notification_area/main.c
30 #define NOTIFICATION_AREA_ICON "gnome-panel-notification-area"
32 +static void na_tray_applet_style_updated (GtkWidget *widget);
34 struct _NaTrayAppletPrivate
37 @@ -78,6 +80,7 @@ na_tray_applet_realize (GtkWidget *widget)
38 get_gtk_orientation_from_applet_orient (orient));
40 gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (applet->priv->tray));
41 + na_tray_applet_style_updated (widget);
42 gtk_widget_show (GTK_WIDGET (applet->priv->tray));