Close multiple instances loses settings

Found a bug or something that needs fixing?
Post Reply
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Close multiple instances loses settings

Post by twinsen »

With all Explorer++ settings, you have to be careful when you use multiple instances, since only settings from the last one you close gets saved! It would be good if there was a way to share persistent settings changes between all instances, so you don't lose data reguardless of the order you close them.

Example (how to reproduce):
* Open one instance of Explorer++.
* Open a second instance of Explorer++.
* Bookmark a tab in the second instance.
* Close the second instance.
* Close the first instance.
* Open Explorer++.
* Your bookmark has been deleted!

It happens with both normal and portable mode.

Maybe we could use shared memory or some other IPC mechanism like messages. When you change settings in one instance, it can send that change to all other instances. It would be good if the mechanism is bidirectional, since it would be easier to get information from all windows (eg for session saving).

Another way could be to make it so in multiple instance mode, there is still only 1 exe process, but multiple windows. That way the settings can easily be shared and they wont overwrite eachother when they close. One disadvantage with that is if one window crashes, they all come down. It might also be much harder to make that kind of change if the code assumes there is only 1 main window.

twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Close multiple instances loses settings

Post by twinsen »

I found a work around to help prevent data loss in portable mode.
At any time you can go to tools/options/window, change the "Allow multiple instances" setting, then click apply. This forces Explorer++ to save all its current data, without quiting.

You can then open the xml file in a text editor, do the same with another instance, and manually merge the settings (eg bookmarks section).
If you only quit when you are sure you have got the data you wanted, you wont lose data.
This technique is also useful when you are developing features, as there is no save button.

Of course we still need a proper fix, as we shouldn't have to resort to workarounds and manually backing up xml files.

David Erceg
Site Admin
Posts: 910
Joined: Sat Apr 18, 2009 1:46 am

Re: Close multiple instances loses settings

Post by David Erceg »

I agree its a good idea, and something that really should be fixed. Unfortunately, it would also require architecture changes, as well as a well defined set of variables that need to be shared (i.e. bookmarks should propagate, tabs should not), among other things.

Its another one of those changes that's very nice in theory, but may be killed by the implementation time (I don't know how long this feature would actually take to code, but I assume it would be significant).

twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Close multiple instances loses settings

Post by twinsen »

I would at least like a "save" menu item, which saves the current settings. That would stop me modifying settings that I know cause a save (eg creating a bookmark does not save). So if you have 1 instance running for a long time, you don't have to exit just to save the settings (and current tabs).

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Close multiple instances loses settings

Post by ajs »

hi twinsen,
at the moment you have two possibilities:
1) export the settings from the registry
2) from E++ choose "portable mode". This will save your settings to an xml file. copy the file, then disable "portable mode" to go back to your registry.
Anyhow I think your idea of a "save" button is good.
I have added that to my list of things to do.

David Erceg
Site Admin
Posts: 910
Joined: Sat Apr 18, 2009 1:46 am

Re: Close multiple instances loses settings

Post by David Erceg »

I don't like the idea of a save settings button (as it just works around the actual issue), but I think an export settings feature could work.

Post Reply