mozilla-libnotify.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Thu, 22 Mar 2012 14:37:12 +0100
changeset 414 88a71e903038
child 417 62102cc5132a
permissions -rw-r--r--
update to 12.0b2 added mozilla-libnotify.patch to fix xul fallback for system-alert-service

# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent 629ea8797e7393eb6e9add489db2c5636516b305
Bug 737646 - no biff notification if notification-daemon not running

diff --git a/toolkit/system/gnome/nsAlertsIconListener.cpp b/toolkit/system/gnome/nsAlertsIconListener.cpp
--- a/toolkit/system/gnome/nsAlertsIconListener.cpp
+++ b/toolkit/system/gnome/nsAlertsIconListener.cpp
@@ -346,16 +346,21 @@ nsAlertsIconListener::InitAlertAsync(con
       for (GList* cap = server_caps; cap != NULL; cap = cap->next) {
         if (!strcmp((char*) cap->data, "actions")) {
           gHasActions = true;
           break;
         }
       }
       g_list_foreach(server_caps, (GFunc)g_free, NULL);
       g_list_free(server_caps);
+    } else {
+      // notify_get_server_caps() is expected to return something
+      // otherwise we need to assume there is no notification-server
+      // to display anything
+      return NS_ERROR_FAILURE;
     }
   }
 
   if (!gHasActions && aAlertTextClickable)
     return NS_ERROR_FAILURE; // No good, fallback to XUL
 
   nsCOMPtr<nsIObserverService> obsServ =
       do_GetService("@mozilla.org/observer-service;1");