This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] Incidental setup.exe patches #1: Add busy cursor.
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 13 Apr 2010 09:53:37 +0200
- Subject: Re: [PATCH] Incidental setup.exe patches #1: Add busy cursor.
- References: <4BC390EF.4080708@gmail.com>
- Reply-to: cygwin-apps at cygwin dot com
On Apr 12 22:30, Dave Korn wrote:
>
>
> While working on setup I've ended up fixing a few uncontroversial bits and
> pieces along the way, so I'd like to separate those patches out and send them
> first. Here's one that adds support in the Window class for enabling the
> busy/hourglass cursor, and invokes it in a couple of places where we have long
> operations. It's not comprehensive but it's a start and makes it trivial for
> us to fix for any other long-running operation we want the user not to worry
> has crashed.
>
> There's also one unrelated change in there which I considered too close to
> an obvious fix to think worth separating out. In all windows applications,
> there is one HINSTANCE handle to the singleton application instance, and as is
> traditional setup.exe keeps a global static copy of that handle for use when
> needed by the Windows GUI APIs. It's a singleton, it's pointed to by a static
> class member, and the setter method is a static member method (hence can be
> called without a this-pointer); I'm sure it's just a trivial oversight that
> the getter method is in fact non-static and thus requires a this-pointer only
> in order to ignore the object instance it points to and return a global.
> (This has made no difference yet because all existing calls to GetInstance
> just happen to be inside non-static member functions of the various dialog
> page classes derived from Window, and so have suitable this-pointers available
> to invoke it with, but that's by good fortune rather than necessity, and
> anyway, let's save ourselves some register pressure by not passing an unused
> parameter....)
>
> * window.cc (Window::Window): Initialise BusyCount and BusyCursor.
> (Window::SetBusy): Set hourglass cursor, counting nested activations.
> (Window::ClearBusy): Cancel one call to SetBusy and restore original
> cursor if no longer busy.
> * window.h (Window::BusyCount): New data member.
> (Window::OldCursor): Likewise.
> (Window::BusyCursor): Likewise.
> (Window::SetBusy): Prototype.
> (Window::ClearBusy): Likewise.
> * choose.cc (ChooserPage::createListview): Invoke busy cursor
> around long-running operation.
> (ChooserPage::OnInit): Likewise.
> (ChooserPage::changeTrust): Likewise.
> * PickCategoryLine.cc (PickCategoryLine::set_action): Likewise.
>
> OK?
Sure, looks good to me.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat