Re: Make GCancellable subclassable?
- From: Alexander Larsson <alexl redhat com>
- To: Richard Hughes <hughsient gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Make GCancellable subclassable?
- Date: Wed, 24 Jun 2009 10:34:19 +0200
On Fri, 2009-06-19 at 10:29 +0100, Richard Hughes wrote:
> In PackageKit, the packaging backend is able to control what part of
> each transaction is cancellable so we can do things like set the
> cancel GUI button sensitive or insensitive at appropriate times. For
> instance loading the rpmdb is not cancellable, but downloading a file
> is. In converting some of the server code to use GCancellable, I've
> found it's missing this 'hinting' functionality.
>
> It would be really great to wrap GCancellable in another object, in my
> case PkCancellable and add the extra functionality there.
> Unfortunately _GCancellable is private and not public, and thus can't
> be subclassed. I've attached a patch to make it public, and use a
> _GCancellablePrivate struct, which solves my problem nicely.
Commited to master.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]