Page MenuHome GnuPG

gpgpass: Restore last window location on next start
Open, NormalPublic

Description

As this now works for Kleopatra, gpgpass should remember the location, too.

See T7554: Kleopatra: Restore last window location on next start

Details

Version
Gpg4win-5.0.0-beta145

Event Timeline

Note: Restoring the last window location is a built-in feature of KMainWindow/KXmlGuiWindow. It should work out-of-the-box if one makes sure that KMainWindow::closeEvent() is called even if it's overwritten. (Instead of overwriting KMainWindow::closeEvent() the better approach is to overwrite KMainWindow::queryClose() which is what I changed in Kleopatra.)

It seems to work here on Windows and Linux

The versioninfo.txt line of 5.0Beta-145 for gpgpass is:

5356ce04fdd4d45c16e6cae53b0ecb0ab7614598 gpgpass-202503070927.tar.xz 5135e42b4a2388019db68a655e078b213e18fd11

Maybe your version is more up to date?

@ebo: What does the MainWindow section in gpgpasstaterc contain?

Window is open:

[MainWindow]
1920x988 screen: Height=349
1920x988 screen: Width=769
1920x988 screen: XPosition=559
1920x988 screen: YPosition=232
RestorePositionForNextInstance=false
State=AAAA/wAAAAD9AAAAAAAAAwEAAAETAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA
\\\\.\\DISPLAY1=\\\\.\\DISPLAY1

(The state line is one line there, of course, don't know how to make phabricator not interpret the slashes)
After Window was closed, it looked still the same.

werner triaged this task as Normal priority.Wed, Mar 12, 3:29 PM
werner added a project: Feature Request.

If RestorePositionForNextInstance=false is still there after gpgpass has been quit then either KMainWindow::closeEvent() didn't run or the dirty state config wasn't sync'd to disk. When reading the code in KMainWindow I was wondering if a sync() was missing, but in Kleopatra it worked without this.