[Preliminary Patch] setup.exe size/position restore on startup

Jonathon Merz jonathon.merz@gmail.com
Thu May 14 01:59:00 GMT 2009


Hello,

Per Dave Korn's suggestion in:
   http://cygwin.com/ml/cygwin/2009-05/msg00208.html

I've put together a preliminary patch to make setup.exe restore it's
last used size and position when it starts.  What I've got so far is:
   - setup.exe reads it's last used size, position, and
maximized/normal state from the settings file "last-wingeometry".

   - If the "last-wingeometry" file does not exist or is empty, the
default window geometry is used.

   - If setup.exe exits while in a maximized state, it will be
maximized on next startup, and recall it's last non-maximized size and
position for restoration to normal state.

   - Added the -g/--reset-geometry command line options to handle
cases in which setup.exe may be restored off-screen, such as running
setup.exe with saved geometry on a screen with much lower resolution
than for it's last run.  If this option is used, setup.exe will start
up with the default geometry and clear the last-wingeometry file if
the geometry is not subsequently changed, or record new geometry if it
is.

   - Modified Makefile.am to account for newly added files.  Have to
run bootstrap.sh to populate changes into Makefile.in before running
configure.


The attached patch is currently based on the current sources from CVS.
 I do also have it working with setup-2.573.2.3.

I don't necessarily intend this as a final patch, as I still want to
add the ability to save the column widths on "Select Packages" dialog,
but I wanted to toss this out there to see what people think and see
if anyone has any comments or criticisms with my direction so far.

I am also toying with alternatives to the way I treat the
-g/--reset-geometry option.  The other option I've got in mind is to
make it -g/--geometry and have it accept a geometry string or an empty
string (which would make setup revert to default geometry).  Please
let me know if you have an opinion or a different idea.

The patch (saveSetupGeometry.diff) is attached, as is the ChangeLog
for what's in the patch.


Looking forward to the comments,

Jonathon Merz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog
Type: application/octet-stream
Size: 525 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20090514/a66f223f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saveSetupGeometry.diff
Type: application/octet-stream
Size: 11841 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20090514/a66f223f/attachment-0001.obj>


More information about the Cygwin-apps mailing list