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
=== modified file 'modules/LibUnity.jsm'
--- modules/LibUnity.jsm 2011-07-08 19:25:23 +0000
+++ modules/LibUnity.jsm 2011-09-05 17:51:24 +0000
@@ -49,7 +49,13 @@
49Cu.import("resource://gre/modules/XPCOMUtils.jsm");49Cu.import("resource://gre/modules/XPCOMUtils.jsm");
5050
51XPCOMUtils.defineLazyGetter(this, "libunity", function() {51XPCOMUtils.defineLazyGetter(this, "libunity", function() {
52 var libunity = ctypes.open("libunity.so.4");52 var libunity;
53 try {
54 libunity = ctypes.open("libunity.so.5");
55 } catch(e) {
56 libunity = ctypes.open("libunity.so.4");
57 }
58
53 if (!libunity)59 if (!libunity)
54 throw "libunity is unavailable";60 throw "libunity is unavailable";
5561
5662
=== modified file 'modules/MessagingMenu.jsm'
--- modules/MessagingMenu.jsm 2011-08-08 14:44:29 +0000
+++ modules/MessagingMenu.jsm 2011-09-05 17:51:24 +0000
@@ -225,7 +225,7 @@
225function LauncherEntryFinder(aDir, aDesktopFile, aListener, aMethod) {225function LauncherEntryFinder(aDir, aDesktopFile, aListener, aMethod) {
226 LOG("Searching for launcher entry for " + aDesktopFile + " in " + aDir.path);226 LOG("Searching for launcher entry for " + aDesktopFile + " in " + aDir.path);
227 if (!aDir.exists() || !aDir.isDirectory()) {227 if (!aDir.exists() || !aDir.isDirectory()) {
228 WARN(aDir.path + " does not exist or is not a directory");228 LOG(aDir.path + " does not exist or is not a directory");
229 aListener[aMethod](aDir, null);229 aListener[aMethod](aDir, null);
230 return;230 return;
231 }231 }
@@ -1066,11 +1066,12 @@
1066 * on an Indicator that was clicked.1066 * on an Indicator that was clicked.
1067 */1067 */
1068 OnItemAdded: function MM_OnItemAdded(parentItem, item) {1068 OnItemAdded: function MM_OnItemAdded(parentItem, item) {
1069 let header = item.QueryInterface(Ci.nsIMsgDBHdr);1069 if (item instanceof Ci.nsIMsgDBHdr) {
1070 let self = this;1070 let self = this;
1071 MMIndicatorMessageCheck(header, function(aShouldRequestAtt) {1071 MMIndicatorMessageCheck(item, function(aShouldRequestAtt) {
1072 self.doIndication(header, aShouldRequestAtt);1072 self.doIndication(item, aShouldRequestAtt);
1073 });1073 });
1074 }
1074 },1075 },
10751076
1076 OnItemPropertyFlagChanged: function MM_OnItemPropertyFlagChanged(item,1077 OnItemPropertyFlagChanged: function MM_OnItemPropertyFlagChanged(item,
@@ -1079,8 +1080,9 @@
1079 newFlag) {1080 newFlag) {
1080 if((oldFlag & Ci.nsMsgMessageFlags.New)1081 if((oldFlag & Ci.nsMsgMessageFlags.New)
1081 && !(newFlag & Ci.nsMsgMessageFlags.New)) {1082 && !(newFlag & Ci.nsMsgMessageFlags.New)) {
1082 let header = item.QueryInterface(Ci.nsIMsgDBHdr);1083 if (item instanceof Ci.nsIMsgDBHdr) {
1083 this.stopIndication(header);1084 this.stopIndication(item);
1085 }
1084 }1086 }
1085 },1087 },
10861088

Subscribers

People subscribed via source and target branches

to all changes: