About XfconfChannel Object (Brian J. Tarricone)

ali abdallah ali.slackware at gmail.com
Sat Sep 20 23:07:11 CEST 2008


> Message: 5
> Date: Sat, 20 Sep 2008 12:45:04 -0700
> From: "Brian J. Tarricone" <bjt23 at cornell.edu>
> Subject: Re: About XfconfChannel Object
> To: xfce4-dev at xfce.org
> Message-ID: <20080920124504.48f5ef35 at kepler>
> Content-Type: text/plain; charset=US-ASCII
>
> Ok, TRIM YOUR REPLIES.  I really don't appreciate having to dig through
> huge unrelated quoted portions of the digest to find your reply.
>

Yes sure, i'm not used how the digest works.

>
> On Sat, 20 Sep 2008 13:42:12 +0200 ali abdallah wrote:
>
> > On Sat, Sep 20, 2008 at 12:32 PM, Brian Tarricone wrote:
> > > ali abdallah wrote:
> > > > Hi,
> > > >
> > > > Why the XfconfChannel and XfconfChannelClass are defined in the
> > > > xfconf-channel.c, i'm asking this question since i couldn't
> > > > derive an object
> > > > from the XfconfChannel object!
> > >
> > > Er, why do you want to?  I assumed no one would.
> > >
> > > Not saying you don't have a valid use-case, but I'd rather not go
> > > and change things without a reason.
> > >
> > I wanted to have an object wish is derived from XfconfChannel object
> > and contains more data and functions to be used in my application,
> > then i can call the *channel_get* and *channel_set* functions by
> > casting the object to XfconfChannel type, just like a GtkWidget and
> > GtkButton for example.
>
> So are you actually *extending* the XfconfChannel type?  I mean, are
> you actually adding settings-related functionality to it, or are you
> just using subclassing as a quick-and-dirty shortcut to avoid having to
> carry around an extra pointer?
>
> If you're actually extending the object, I'd consider making the class
> struct public, but otherwise you should just be using
> g_object_set_data() to carry around a pointer to the XfconfChannel, or
> stuffing it in a struct that has other data you're passing around.
>

Yes actually i'm extending the object and i want to add some functions to
it, it's not really
mandatory since the second solution that you are proposing is always valid,
but well having to work
with the GObject system for a long time now, i thought it is kind of
standard the
declaration of the GObjects.


>
> > I'm not asking any change, if this will stay like that i'll respect
> > the API of xfconf ( but i rarely see the object struct and class
> > struct defined in the .c source), but it's not a big issue, anyway
> > xfconf is alreay a perfect application to use.
>
> Haha, thanks, but I'm well aware it's far from perfect!


Anyway, i really like the idea of having something like gconf in Xfce.


> > Note: xfconf-query gives segmentation fault if the daemon is not
> > running.
>
> Hmm, thanks for the catch -- it's pretty harmless but of course
> shouldn't do that.  Of course, if you have dbus set up properly,
> barring any bugs, xfconfd should get launched on demand, so "not
> running" isn't really a valid state.
>
>        -brian
>

Thanks,
Ali.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20080920/28a0e5c7/attachment.html>


More information about the Xfce4-dev mailing list