equal
deleted
inserted
replaced
|
1 # HG changeset patch |
|
2 # User Wolfgang Rosenauer <wr@rosenauer.org> |
|
3 # Parent 629ea8797e7393eb6e9add489db2c5636516b305 |
|
4 Bug 737646 - no biff notification if notification-daemon not running |
|
5 |
|
6 diff --git a/toolkit/system/gnome/nsAlertsIconListener.cpp b/toolkit/system/gnome/nsAlertsIconListener.cpp |
|
7 --- a/toolkit/system/gnome/nsAlertsIconListener.cpp |
|
8 +++ b/toolkit/system/gnome/nsAlertsIconListener.cpp |
|
9 @@ -346,16 +346,21 @@ nsAlertsIconListener::InitAlertAsync(con |
|
10 for (GList* cap = server_caps; cap != NULL; cap = cap->next) { |
|
11 if (!strcmp((char*) cap->data, "actions")) { |
|
12 gHasActions = true; |
|
13 break; |
|
14 } |
|
15 } |
|
16 g_list_foreach(server_caps, (GFunc)g_free, NULL); |
|
17 g_list_free(server_caps); |
|
18 + } else { |
|
19 + // notify_get_server_caps() is expected to return something |
|
20 + // otherwise we need to assume there is no notification-server |
|
21 + // to display anything |
|
22 + return NS_ERROR_FAILURE; |
|
23 } |
|
24 } |
|
25 |
|
26 if (!gHasActions && aAlertTextClickable) |
|
27 return NS_ERROR_FAILURE; // No good, fallback to XUL |
|
28 |
|
29 nsCOMPtr<nsIObserverService> obsServ = |
|
30 do_GetService("@mozilla.org/observer-service;1"); |