gnome-settings-daemon r677 - in trunk: . plugins/xrandr



Author: federico
Date: Tue Jan 27 21:34:29 2009
New Revision: 677
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=677&view=rev

Log:
bgo545115 (RANDR) - Handle showing notifications when the status_icon is not created yet

	Fix error reporting at startup:

	* plugins/xrandr/gsd-xrandr-manager.c (error_message): Handle the
	case where the status_icon is not created yet; this happens during
	startup or when the status_icon is disabled by the user.

Signed-off-by: Federico Mena Quintero <federico novell com>

Modified:
   trunk/ChangeLog
   trunk/plugins/xrandr/gsd-xrandr-manager.c

Modified: trunk/plugins/xrandr/gsd-xrandr-manager.c
==============================================================================
--- trunk/plugins/xrandr/gsd-xrandr-manager.c	(original)
+++ trunk/plugins/xrandr/gsd-xrandr-manager.c	Tue Jan 27 21:34:29 2009
@@ -648,10 +648,17 @@
 
         g_assert (error_to_display == NULL || secondary_text == NULL);
 
-        notification = notify_notification_new_with_status_icon (primary_text,
-                                                                 error_to_display ? error_to_display->message : secondary_text,
-                                                                 GSD_XRANDR_ICON_NAME,
-                                                                 priv->status_icon);
+        if (priv->status_icon)
+                notification = notify_notification_new_with_status_icon (primary_text,
+                                                                         error_to_display ? error_to_display->message : secondary_text,
+                                                                         GSD_XRANDR_ICON_NAME,
+                                                                         priv->status_icon);
+        else
+                notification = notify_notification_new (primary_text,
+                                                        error_to_display ? error_to_display->message : secondary_text,
+                                                        GSD_XRANDR_ICON_NAME,
+                                                        NULL);
+
         notify_notification_show (notification, NULL); /* NULL-GError */
 #else
         GtkWidget *dialog;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]