Changeset fdd549


Ignore:
Timestamp:
Oct 15, 2014, 11:01:03 PM (6 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
998c9e
Parents:
162a67
Message:

second init-stage was called twice on window reopening, fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/v_identity.js

    r162a67 rfdd549  
    3434
    3535var main = {
     36    _window_first_use : true,
     37   
    3638    headerParser : Components.classes["@mozilla.org/messenger/headerparser;1"]
    3739                .getService(Components.interfaces.nsIMsgHeaderParser),
     
    6870        NotifyComposeBodyReady: function() {
    6971            Log.debug("NotifyComposeBodyReady");
    70             main.initSystemStage2();
     72            // only call initSystemStage2 if window is not reopened
     73            if (main._window_first_use) {
     74                main._window_first_use = false;
     75                main.initSystemStage2();
     76            }
    7177        },
    7278        NotifyComposeFieldsReady: function() {
     
    301307        vI.vIprefs.dropLocalChanges();
    302308
    303         // stateListener sometimes does not work at all - just trying to call stage2 directly
    304 //      // stateListener only works in reply-cases
    305 //      // so activate stage2 in reply-cases trough StateListener
    306 //      // in other cases directly
    307 //         // (but StateListener is required for Cleanup, so register)
    308 //      var msgComposeType = Components.interfaces.nsIMsgCompType;
    309 //      switch (gMsgCompose.type) {
    310 //          case msgComposeType.New:
    311 //          case msgComposeType.NewsPost:
    312 //          case msgComposeType.MailToUrl:
    313 //          case msgComposeType.Draft:
    314 //          case msgComposeType.Template:
    315 //          case msgComposeType.ForwardAsAttachment:
    316 //          case msgComposeType.ForwardInline:
    317 //              main.initSystemStage2();
    318 //          case msgComposeType.Reply:
    319 //          case msgComposeType.ReplyAll:
    320 //          case msgComposeType.ReplyToGroup:
    321 //          case msgComposeType.ReplyToSender:
    322 //          case msgComposeType.ReplyToSenderAndGroup:
    323 //          case msgComposeType.ReplyWithTemplate:
    324 //          case msgComposeType.ReplyToList:
    325 //              gMsgCompose.RegisterStateListener(main.ComposeStateListener);
    326 //      }
    327309        main.initSystemStage2();
    328310        Log.debug("reopen done.")
Note: See TracChangeset for help on using the changeset viewer.