~didrocks/messagingmenu-extension/add-french-translation

« back to all changes in this revision

Viewing changes to modules/MessagingMenu.jsm

Now looking for both libunity4 and libunity5.  Patch by Chris Coulson.

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
function LauncherEntryFinder(aDir, aDesktopFile, aListener, aMethod) {
226
226
  LOG("Searching for launcher entry for " + aDesktopFile + " in " + aDir.path);
227
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
229
    aListener[aMethod](aDir, null);
230
230
    return;
231
231
  }
1066
1066
   * on an Indicator that was clicked.
1067
1067
   */
1068
1068
  OnItemAdded: function MM_OnItemAdded(parentItem, item) {
1069
 
    let header = item.QueryInterface(Ci.nsIMsgDBHdr);
1070
 
    let self = this;
1071
 
    MMIndicatorMessageCheck(header, function(aShouldRequestAtt) {
1072
 
      self.doIndication(header, aShouldRequestAtt);
1073
 
    });
 
1069
    if (item instanceof Ci.nsIMsgDBHdr) {
 
1070
      let self = this;
 
1071
      MMIndicatorMessageCheck(item, function(aShouldRequestAtt) {
 
1072
        self.doIndication(item, aShouldRequestAtt);
 
1073
      });
 
1074
    }
1074
1075
  },
1075
1076
 
1076
1077
  OnItemPropertyFlagChanged: function MM_OnItemPropertyFlagChanged(item,
1079
1080
                                                                   newFlag) {
1080
1081
    if((oldFlag & Ci.nsMsgMessageFlags.New)
1081
1082
        && !(newFlag & Ci.nsMsgMessageFlags.New)) {
1082
 
      let header = item.QueryInterface(Ci.nsIMsgDBHdr);
1083
 
      this.stopIndication(header);
 
1083
      if (item instanceof Ci.nsIMsgDBHdr) {
 
1084
        this.stopIndication(item);
 
1085
      }
1084
1086
    }
1085
1087
  },
1086
1088