#130 another ext update wipes settings

closed-fixed
5
2011-08-18
2011-07-28
ncbyylba
No

When I manually update (i.e. firefox.exe example.xpi) an extension (e.g. Status-4-Evar 2011.07.20.21) VSW alerts:

"ViewSourceWith can be easier to use from a toolbar button, do you want to add it?"

And resets the viewSource.xml file (i.e. wipes settings) in the profile directory.

The bug does not occur with every extension I manually update.

ViewSourceWith 0.8
Firefox 5.0
Windows XP SP3

Discussion

  • al_9x

    al_9x - 2011-08-05

    reliable repro directions:

    xp sp3, Fx 6.0b5, VSW 0.8.0

    1. start with a new profile
    2. install VSW, restart
    3. change at least one VSW setting
    4. uninstall the preinstalled Feedback extension, restart
    5. on startup VSW pops up: "ViewSourceWith can be easier to use from a toolbar button, do you want to add it?" and the settings are reset

     
  • al_9x

    al_9x - 2011-08-05

    it looks like you're reacting to the uninstall of any addon:

    AddonManager.addAddonListener({
    onEnabling: function(addon, needsRestart) {},
    onEnabled: function(addon) {},
    onDisabling: function(addon, needsRestart) {},
    onDisabled: function(addon) {},
    onInstalling: function(addon, needsRestart) {},
    onInstalled: function(addon) {},
    onUninstalling: function(addon, needsRestart) {
    ViewSourceWithCommon.prefBranch.setBoolPref("uninstall", true);
    },
    onUninstalled: function(addon) {
    },
    onOperationCancelled: function(addon) {
    if (ViewSourceWithCommon.prefBranch.prefHasUserValue("uninstall")) {
    ViewSourceWithCommon.prefBranch.clearUserPref("uninstall");
    }
    },
    onPropertyChanged: function(addon, properties) {}
    });

     
  • Davide Ficano

    Davide Ficano - 2011-08-06
    • status: open --> open-fixed
     
  • Davide Ficano

    Davide Ficano - 2011-08-06

    Thanks al_9x you are right!!!

    Now I check for my own extension before setting uninstall flag.

    I simply refine the test case for my own use, because I always add toolbar button and the popup isn't show.

    1. start with a new profile
    2. install VSW, restart
    3. VSW prompts to install toolbar button, SAY NO
    4. change at least one VSW setting
    5. uninstall the preinstalled Feedback extension, restart
    6. on startup VSW pops up: "ViewSourceWith can be easier to use from a
    toolbar button, do you want to add it?" and the settings are reset

     
  • al_9x

    al_9x - 2011-08-06

    You probably want to also check in onOperationCancelled?

     
  • Davide Ficano

    Davide Ficano - 2011-08-06

    > You probably want to also check in onOperationCancelled?

    The flag is set only on onUninstalling(), so checking its value sounds sufficient for me

     
  • al_9x

    al_9x - 2011-08-06

    Here' the scenario:

    You uninstall VSW and another extension. Then you cancel the uninstall of the other extension, your code will clear the uninstall pref even though VSW remains scheduled for uninstall.

     
  • Davide Ficano

    Davide Ficano - 2011-08-06

    yep, you are right

     
  • Davide Ficano

    Davide Ficano - 2011-08-18
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks