Re: Make GCancellable subclassable?



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]