geeqie icon indicating copy to clipboard operation
geeqie copied to clipboard

opening multiple geeqies causes the Files&Folders settings to be forgotten/ignored

Open calestyo opened this issue 2 months ago • 6 comments

Setup (please complete the following information):

  • Distribution: Debian
  • Distribution release: unstable
  • Geeqie version [geeqie --version]: Geeqie 2.4 GTK3

Describe the bug I always have these settings in View / Files and Folders:

  • Toggle Folder View: checked
  • Images as Icons: selected

and then I move the slider below: Screenshot from 2024-04-08 14-45-29 to the left: Screenshot from 2024-04-08 14-45-39

As long as I open only once instance of geeqie this works fine and every subsequent instance will have the same settings.

But If I open multiple instances, the settings get reset to:

  • Toggle Folder View: unchecked
  • Images as List: selected

and the slider also moves back.

Depending on which instance I then close last, the wrong settings also get stored respectively my actual ones forgotte

Expected behavior Every instance should open with the same settings.

Thanks, Chris.

calestyo avatar Apr 08 '24 12:04 calestyo

Please try:

Open Geeqie and set your preferences for the layout, then go to Edit/Preferences/Windows and click on Use Current Layout For Default.

When you open a new instance do you get your expected behavior?

[Also note the Geeqie man page wrt new instances and the XDG environment variables]

caclark avatar Apr 08 '24 17:04 caclark

Open Geeqie and set your preferences for the layout, then go to Edit/Preferences/Windows and click on Use Current Layout For Default.

Ah thanks, that does indeed work.

I'd guess that for some it may be a bit unexpected, that it does seem to automatically store the settings of the last closed instance and re-use them for the only the next started instance.
But if that's desired behaviour, we can close this issue :-)

calestyo avatar Apr 08 '24 18:04 calestyo

I'd guess that for some it may be a bit unexpected, that it does seem to automatically store the settings of the last closed instance and re-use them for the only the next started instance.

I am unsure about this. You can open several Geeqie layout windows, but they will all be running the same instance of the executable (the Layout Window ID will show the ID if that option is enabled).

But if you use the --new-instance option to really open another instance, you will run into the problem that there is only one geeqierc.xml file - and whichever instance is closed last will store its configuration there.

If you want to use multiple instances, you can avoid that problem by using the XDG_* environment variables.

caclark avatar Apr 10 '24 09:04 caclark

I am unsure about this. You can open several Geeqie layout windows, but they will all be running the same instance of the executable (the Layout Window ID will show the ID if that option is enabled).

Ah I hadn't even noticed that they were all running the same process.

So that is, where only the first picked up my "current" settings, which were seemingly somehow stored (but not via the preferences menu), because they were re-used when I closed all windows and started a new geeqie - but not were not re-used when I started a 2nd window.

calestyo avatar Apr 10 '24 21:04 calestyo

If you start Geeqie from scratch, the layout settings will be from hard-coded defaults. When you exit, the current layout will be saved (depending on certain Preferences that you may have selected). Next start will use those settings.

Opening an additional new layout window (not a new executable instance), the hard-coded defaults will be used unless you have already set a default layout via Edit/Preferences.

You may also use the command line options: geeqie --remote --action::NewWindowDefault geeqie --remote --action::NewWindowFromCurrent

Using an alias will make life easier.

You may also use the above command line actions in a plugin, and place an icon on a status bar.

The relevant menu items, under Windows, can be given keyboard shortcuts.

caclark avatar Apr 12 '24 08:04 caclark

Opening an additional new layout window (not a new executable instance), the hard-coded defaults will be used unless you have already set a default layout via Edit/Preferences.

I guess that's the culprit here... why not also use the "current layout" for that new window? That would IMO be less surprising.

But anyway... there already is a working solution (save it via the menu) so from my PoV we can also just close the issue. :-)

calestyo avatar Apr 16 '24 21:04 calestyo