This is just some static backup of the original site, don't expect every link to work!

Changeset 573656


Ignore:
Timestamp:
Aug 17, 2012, 7:02:31 PM (10 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
0dcd77
Parents:
03d29f
Message:

adaptions for missing 3pane window (if called by mailto:)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/vI_rdfDatasource.js

    r03d29f r573656  
    3232Components.utils.import("resource://gre/modules/Services.jsm");
    3333
     34// if no 3pane-window found, return current window
    3435function get3PaneWindow() {
    35   return Components.classes['@mozilla.org/appshell/window-mediator;1']
    36     .getService(Components.interfaces.nsIWindowMediator)
    37     .getMostRecentWindow("mail:3pane");
     36  var windowMediator = Components.classes['@mozilla.org/appshell/window-mediator;1']
     37    .getService(Components.interfaces.nsIWindowMediator);
     38  var mail3paneWindow = windowMediator.getMostRecentWindow("mail:3pane");
     39  if (!mail3paneWindow) return windowMediator.getMostRecentWindow(null);
     40  return mail3paneWindow;
    3841};
    3942
     
    4245    if (this._rdfFileName) this.init();
    4346    if (!dontRegisterObserver) this.AccountManagerObserver.register();
    44     this._extVersion = get3PaneWindow().virtualIdentityExtension.extensionVersion;
     47    try {
     48      this._extVersion = get3PaneWindow().virtualIdentityExtension.extensionVersion;
     49    } catch (e) { }
    4550}
    4651
     
    165170    // **************    RDF UPGRADE CODE    ****************************************************
    166171    extUpgradeRequired: function() {
     172        if (!this._extVersion) return false;
    167173        var oldExtVersion = this.getCurrentExtFileVersion()
    168174        var versionChecker = Components.classes["@mozilla.org/xpcom/version-comparator;1"]
Note: See TracChangeset for help on using the changeset viewer.