[PATCH] Setup.exe: Nicer local package dir browser.

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Wed Nov 4 17:50:00 GMT 2009


On Wed, Nov 04, 2009 at 05:47:48PM +0000, Dave Korn wrote:
>
>    Are we having fun yet?
>
>  This patch makes the local package dir browsing experience nicer.  (It also
>rolls up the previous patch about fixing the localdir option, sorry for being
>lazy; just ignore that very first hunk for the moment.  I could have manually
>chopped it out but then the line numbers would have been off-by-two and I
>could have manually fixed the line numbers but basically I don't like
>falsifying patches because nasty surprises can result!  Chopping off the top
>hunk - or several - of a patch on its own, as I did to generate the other
>patch, is as far as I'm comfortable with post-editing diffs.)
>
>  To do this, it adds a couple of style flags that cause the common controls
>directory browser dialog to adopt the newer styles available on all 2k and
>later OSs, and a browser callback hook in support.  I believe on NT it will
>just harmlessly fall back to the old-style dialog, but hope someone can check
>for me.
>
>  It also resolves the what-to-do-when-the-directory-doesn't-exist problem
>slightly differently.  I didn't want to just automatically create the
>directory, because I think one of the very common reasons for a directory that
>someone has typed into a textbox not to exist is that they typed it wrong, so
>I wanted to implement a dialog to offer them the choice of creating it or not.
> This dialog can also be conveniently reused from within the browser, where
>there's also an editbox to type directory names.
>
>	* localdir.cc (offer_to_create): New function.
>	(browse_cb): Use it to optionally create a directory if the name
>	entered in the textbox fails validation.
>	(browse): Add new dialog style flags and validated editbox.
>	(LocalDirPage::OnNext): Don't automatically create local package
>	dir if it doesn't already exist; offer to instead.
>	* resource.h (IDS_MAYBE_MKDIR): Define new string resource ID.
>	* res.rc (IDS_MAYBE_MKDIR): Define new string resource text.
>
>
>  Overall I think this is a much more friendly user experience.  OK for head?

I think so but maybe Corinna should ok this since I assume that it changes her
recently checked in change.

cgf



More information about the Cygwin-apps mailing list