Changeset dd80c8


Ignore:
Timestamp:
Oct 3, 2013, 4:05:57 PM (8 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
6170a7
Parents:
7c37c9
Message:

fix for https://bugzilla.mozilla.org/show_bug.cgi?id=889022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/prefDialog/vI_prefDialog_FolderPicker.js

    r7c37c9 rdd80c8  
    6060var tmplFolderPickerId = "msgStationeryFolderPicker";
    6161
     62
     63// patch for https://bugzilla.mozilla.org/show_bug.cgi?id=889022, see there
     64if (Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo).ID != "postbox@postbox-inc.com")
     65{
     66  Components.utils.import("resource:///modules/MailUtils.js");
     67}
     68
     69if (typeof(GetMsgFolderFromUri) != "function") {
     70    function GetMsgFolderFromUri(uri, checkFolderAttributes)
     71    {
     72        let msgfolder = null;
     73        if (typeof MailUtils != 'undefined') {
     74        return MailUtils.getFolderForURI(uri, checkFolderAttributes);
     75        }
     76        try { // Postbox
     77        let resource = GetResourceFromUri(uri);
     78        msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
     79        if (checkFolderAttributes) {
     80            if (!(msgfolder && (msgfolder.parent || msgfolder.isServer))) {
     81            msgfolder = null;
     82            }
     83        }
     84        }
     85        catch (ex) {
     86        //dump("failed to get the folder resource\n");
     87        }
     88        return msgfolder;
     89    }
     90}
     91 
    6292function setDefaultCopiesAndFoldersPrefs(identity, server, accountData)
    6393{
Note: See TracChangeset for help on using the changeset viewer.