Re: Make GCancellable subclassable?

2009-06-24 Thread Alexander Larsson
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

Re: Make GCancellable subclassable?

2009-06-24 Thread Alexander Larsson
On Fri, 2009-06-19 at 22:02 +0200, Sven Neumann wrote: Hi, On Fri, 2009-06-19 at 10:29 +0100, Richard Hughes wrote: 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

Re: Make GCancellable subclassable?

2009-06-24 Thread Richard Hughes
On Wed, Jun 24, 2009 at 9:34 AM, Alexander Larssonal...@redhat.com wrote: On Fri, 2009-06-19 at 10:29 +0100, Richard Hughes wrote: I've attached a patch to make it public, and use a _GCancellablePrivate struct, which solves my problem nicely. Commited to master. Legend, thanks. Richard.

Re: Make GCancellable subclassable?

2009-06-24 Thread Alexander Larsson
On Wed, 2009-06-24 at 20:30 +0200, Sven Neumann wrote: Hi, On Wed, 2009-06-24 at 10:36 +0200, Alexander Larsson wrote: I'd also welcome if GCancellable and GInitable could be moved to GObject. They are potentially useful outside GIO. Why can't you not use them from GIO? GIO is a

Make GCancellable subclassable?

2009-06-19 Thread Richard Hughes
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

Re: Make GCancellable subclassable?

2009-06-19 Thread Sven Neumann
Hi, On Fri, 2009-06-19 at 10:29 +0100, Richard Hughes wrote: 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