This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Save and restore setup.exe window geometry attempt #2
Jonathon Merz wrote:
> Hi all,
>
> I've reworked the patch based on the advice I recieved from my last
> submission,
Thanks for persisting.
> My questions are:
> 1. In my current version, the GeometrySetting class just writes/reads
> a raw WINDOWPLACEMENT struct to/from the geometry settings file. This
> keeps the code nice and succinct, but is a departure from the way the
> other settings files are handled in that the resulting file is not
> human readable/editable. The question is: is it preferred to have the
> settings files be human readable at the expense of larger code (which
> would be entirely contained within the new GeometrySetting class's
> save() and load() functions) or is it acceptable as attached?
I'm afraid not, but it's a simple thing to fix. We do want the setting
files to be plain ascii text. Makes it a lot easier to debug people's setup
problems sometimes if we can get them to post the contents. Should be as easy
as reading the io_stream's contents into some sort of strsteambuf (but don't
quote me on that until I've had time to look up an STL reference) and using
the << or >> operators.
> 2. At this time, I've got the call to getWindowPlacement within the
> handling of the WM_SIZE message in the block in the same block as all
> of the existing resizing code, where it will deliberately not catch
> when the window is minimized, so setup will never restore in a
> minimized state. As far as I can tell, there is not any typical way
> to exit while minimized. You _can_ minimize the window then
> right-click and close it, but if you want to completely finish setup,
> you have to click the finish button to execute your choices on the
> last dialog. My original choice to arrange the code this way was
> fairly arbitrary, so if anyone thinks it would be useful in some way
> to catch minimization as well, or if you just think it should catch
> minimization, by all means let me know.
I think that not restoring minimisation is absolutely the correct thing to do.
> 3. And of course, let me know if you see any other problems, since I
> think the code is pretty close to complete pending any changes
> resulting from the answers to 1 and 2.
I'll apply your patch to my local tree and have a play with it.
cheers,
DaveK