Merge lp:~chrisccoulson/messagingmenu-extension/libunity5 into lp:messagingmenu-extension

Proposed by Chris Coulson
Status: Merged
Merged at revision: 67
Proposed branch: lp:~chrisccoulson/messagingmenu-extension/libunity5
Merge into: lp:messagingmenu-extension
Diff against target: 60 lines (+17/-9)
2 files modified
modules/LibUnity.jsm (+7/-1)
modules/MessagingMenu.jsm (+10/-8)
To merge this branch: bzr merge lp:~chrisccoulson/messagingmenu-extension/libunity5
Reviewer Review Type Date Requested Status
Mike Conley Pending
Review via email: mp+74126@code.launchpad.net

Description of the change

Adds support for the libunity5 ABI, fixes a warning and fixes bug 826447

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/LibUnity.jsm'
2--- modules/LibUnity.jsm 2011-07-08 19:25:23 +0000
3+++ modules/LibUnity.jsm 2011-09-05 17:51:24 +0000
4@@ -49,7 +49,13 @@
5 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
6
7 XPCOMUtils.defineLazyGetter(this, "libunity", function() {
8- var libunity = ctypes.open("libunity.so.4");
9+ var libunity;
10+ try {
11+ libunity = ctypes.open("libunity.so.5");
12+ } catch(e) {
13+ libunity = ctypes.open("libunity.so.4");
14+ }
15+
16 if (!libunity)
17 throw "libunity is unavailable";
18
19
20=== modified file 'modules/MessagingMenu.jsm'
21--- modules/MessagingMenu.jsm 2011-08-08 14:44:29 +0000
22+++ modules/MessagingMenu.jsm 2011-09-05 17:51:24 +0000
23@@ -225,7 +225,7 @@
24 function LauncherEntryFinder(aDir, aDesktopFile, aListener, aMethod) {
25 LOG("Searching for launcher entry for " + aDesktopFile + " in " + aDir.path);
26 if (!aDir.exists() || !aDir.isDirectory()) {
27- WARN(aDir.path + " does not exist or is not a directory");
28+ LOG(aDir.path + " does not exist or is not a directory");
29 aListener[aMethod](aDir, null);
30 return;
31 }
32@@ -1066,11 +1066,12 @@
33 * on an Indicator that was clicked.
34 */
35 OnItemAdded: function MM_OnItemAdded(parentItem, item) {
36- let header = item.QueryInterface(Ci.nsIMsgDBHdr);
37- let self = this;
38- MMIndicatorMessageCheck(header, function(aShouldRequestAtt) {
39- self.doIndication(header, aShouldRequestAtt);
40- });
41+ if (item instanceof Ci.nsIMsgDBHdr) {
42+ let self = this;
43+ MMIndicatorMessageCheck(item, function(aShouldRequestAtt) {
44+ self.doIndication(item, aShouldRequestAtt);
45+ });
46+ }
47 },
48
49 OnItemPropertyFlagChanged: function MM_OnItemPropertyFlagChanged(item,
50@@ -1079,8 +1080,9 @@
51 newFlag) {
52 if((oldFlag & Ci.nsMsgMessageFlags.New)
53 && !(newFlag & Ci.nsMsgMessageFlags.New)) {
54- let header = item.QueryInterface(Ci.nsIMsgDBHdr);
55- this.stopIndication(header);
56+ if (item instanceof Ci.nsIMsgDBHdr) {
57+ this.stopIndication(item);
58+ }
59 }
60 },
61

Subscribers

People subscribed via source and target branches

to all changes: