Any hints as to which files I should look at for adding the ability to save Inkscape's window position between runs?
-------------------------- Proposal: The basic idea would be to add another preference under Windows which is "Restore last window geometry" right before "Save window geometry"
The the logic would be to try saved geometry in the doc first, then use the user preference.
onStartup: if (startupDoc && startupDoc.hasSavedWindowLayout) { setWindowGeometryFromStartupDoc(startupDoc); } else if (userPrefs.restoreLastWindowGeometry && userPrefs.hasStoredWindowGeometry) { setWindowGeometryFromUserPrefs(userPrefs); }
onShutdown: saveLastWindowGeometryToUserPrefs(getCurrentWindowGeometry)
This would also save/restore the maximized state as is common for MS Windows apps. ---------
Actually my preference would be to reverse the order and always use the userPrefs first if restoreLastWindowGeometry is set, but I'm thinking the other way around would be more politically acceptable with current developers. And I don't think the difference is worth making yet another preference.
Suggestions appreciated. This one just really frustrates me. I started looking over the startup code today but didn't immediately find where prefs or window geometry are handled.
--bb
participants (1)
-
Bill Baxter