tree model

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

tree model

Ryan Lortie
are there any 3ish plans for GtkTreeModel -> GTreeModel?

cheers
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Szilárd Pfeiffer
What do you want to do with that? What about GNode? Isn't it good for you?


regards,

Szilárd


Ryan Lortie wrote:

> are there any 3ish plans for GtkTreeModel -> GTreeModel?
>
> cheers
> _______________________________________________
> gtk-devel-list mailing list
> [hidden email]
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Jamie McCracken-2
I would hope iterators and models will be part of glib 3.0 to avoid 3rd
party duplication as well as all other Libgee functionality

this would also make it more vala friendly

jamie

On Mon, 2009-05-11 at 19:16 +0200, Szilárd Pfeiffer wrote:

> What do you want to do with that? What about GNode? Isn't it good for you?
>
>
> regards,
>
> Szilárd
>
>
> Ryan Lortie wrote:
>
> > are there any 3ish plans for GtkTreeModel -> GTreeModel?
> >
> > cheers
> > _______________________________________________
> > gtk-devel-list mailing list
> > [hidden email]
> > http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
> _______________________________________________
> gtk-devel-list mailing list
> [hidden email]
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Szilárd Pfeiffer
I see. In this case unfortunately I am the person who can help you.


Jamie McCracken wrote:

> I would hope iterators and models will be part of glib 3.0 to avoid 3rd
> party duplication as well as all other Libgee functionality
>
> this would also make it more vala friendly
>
> jamie
>
> On Mon, 2009-05-11 at 19:16 +0200, Szilárd Pfeiffer wrote:
>  
>> What do you want to do with that? What about GNode? Isn't it good for you?
>>
>>
>> regards,
>>
>> Szilárd
>>
>>
>> Ryan Lortie wrote:
>>
>>    
>>> are there any 3ish plans for GtkTreeModel -> GTreeModel?
>>>
>>> cheers
>>> _______________________________________________
>>> gtk-devel-list mailing list
>>> [hidden email]
>>> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>>>      
>> _______________________________________________
>> gtk-devel-list mailing list
>> [hidden email]
>> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>>    
>
>  

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Ryan Lortie
In reply to this post by Szilárd Pfeiffer
Szilárd Pfeiffer wrote:
> What do you want to do with that? What about GNode? Isn't it good for you?

I should have been slightly more clear:  I am interested in being able
to provide a GtkTreeModel for those people who wish to use it without
having to link to libgtk myself.

So the problem with using GNode: GtkTreeView doesn't use it.

Cheers
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Matthias Clasen-2
>
> I should have been slightly more clear:  I am interested in being able to
> provide a GtkTreeModel for those people who wish to use it without having to
> link to libgtk myself.
>
> So the problem with using GNode: GtkTreeView doesn't use it.

I don't see why this is something we should be eager to support. Since
tree models are only useful with GTK+ widgets, it doesn't seem like a
big burden to link against gtk when you are providing tree models. The
consumer of your model will already link against gtk anyway.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Mikkel Kamstrup Erlandsen-2
2009/5/12 Matthias Clasen <[hidden email]>:

>>
>> I should have been slightly more clear:  I am interested in being able to
>> provide a GtkTreeModel for those people who wish to use it without having to
>> link to libgtk myself.
>>
>> So the problem with using GNode: GtkTreeView doesn't use it.
>
> I don't see why this is something we should be eager to support. Since
> tree models are only useful with GTK+ widgets, it doesn't seem like a
> big burden to link against gtk when you are providing tree models. The
> consumer of your model will already link against gtk anyway.

I recall having issues with this... But my memory serves me badly...

Is it that gtk_init() requires a connection to X? That way if I am
writing mydaemon based on mylib.so then mydaemon will require X to
run. Maybe gtk_init_check() can work around this, or maybe the library
does not need gtk_init_* in the first place... I  am hoping that I can
use the same data model in the daemon and in the GUI app so that I
don't have to wrap it in a GtkTreeModel when using it in the GUI app.

Anyway, I just want to back Ryan up on this one. I've been wanting a
GTreeModel for the exact same purpose as Ryan on more than one
occasion.

--
Cheers,
Mikkel
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Christian Dywan-2
Am Tue, 12 May 2009 08:10:11 +0200
schrieb Mikkel Kamstrup Erlandsen <[hidden email]>:

> 2009/5/12 Matthias Clasen <[hidden email]>:
> >>
> >> I should have been slightly more clear:  I am interested in being
> >> able to provide a GtkTreeModel for those people who wish to use it
> >> without having to link to libgtk myself.
> >>
> >> So the problem with using GNode: GtkTreeView doesn't use it.
> >
> > I don't see why this is something we should be eager to support.
> > Since tree models are only useful with GTK+ widgets, it doesn't
> > seem like a big burden to link against gtk when you are providing
> > tree models. The consumer of your model will already link against
> > gtk anyway.
>
> I recall having issues with this... But my memory serves me badly...
>
> Is it that gtk_init() requires a connection to X? That way if I am
> writing mydaemon based on mylib.so then mydaemon will require X to
> run. Maybe gtk_init_check() can work around this, or maybe the library
> does not need gtk_init_* in the first place... I  am hoping that I can
> use the same data model in the daemon and in the GUI app so that I
> don't have to wrap it in a GtkTreeModel when using it in the GUI app.
>
> Anyway, I just want to back Ryan up on this one. I've been wanting a
> GTreeModel for the exact same purpose as Ryan on more than one
> occasion.

Hey,

if the main issue is, as you describe, not having to run X11, then
gtk_init_check is all you need. There is no practical problem using a
GtkTreeModel without a display. It's simply that gtk_init errors out if
there is no display, which is reasonable default behaviour. See the API
reference for details :)

Yours,
    Christian
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Thomas Wood-2
In reply to this post by Matthias Clasen-2
On Mon, 2009-05-11 at 21:10 -0400, Matthias Clasen wrote:

> >
> > I should have been slightly more clear:  I am interested in being able to
> > provide a GtkTreeModel for those people who wish to use it without having to
> > link to libgtk myself.
> >
> > So the problem with using GNode: GtkTreeView doesn't use it.
>
> I don't see why this is something we should be eager to support. Since
> tree models are only useful with GTK+ widgets, it doesn't seem like a
> big burden to link against gtk when you are providing tree models. The
> consumer of your model will already link against gtk anyway.

I think the Clutter project has it's own model implementation only
because there isn't one in glib. There isn't actually a consumer in
Clutter for ClutterModel, but other libraries built on top of Clutter
use it.

Regards,

Thomas

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Alexander Larsson
In reply to this post by Christian Dywan-2
On Tue, 2009-05-12 at 10:47 +0200, Christian Dywan wrote:

> Am Tue, 12 May 2009 08:10:11 +0200
> schrieb Mikkel Kamstrup Erlandsen <[hidden email]>:
>
> > 2009/5/12 Matthias Clasen <[hidden email]>:
> > >>
> > >> I should have been slightly more clear:  I am interested in being
> > >> able to provide a GtkTreeModel for those people who wish to use it
> > >> without having to link to libgtk myself.
> > >>
> > >> So the problem with using GNode: GtkTreeView doesn't use it.
> > >
> > > I don't see why this is something we should be eager to support.
> > > Since tree models are only useful with GTK+ widgets, it doesn't
> > > seem like a big burden to link against gtk when you are providing
> > > tree models. The consumer of your model will already link against
> > > gtk anyway.
> >
> > I recall having issues with this... But my memory serves me badly...
> >
> > Is it that gtk_init() requires a connection to X? That way if I am
> > writing mydaemon based on mylib.so then mydaemon will require X to
> > run. Maybe gtk_init_check() can work around this, or maybe the library
> > does not need gtk_init_* in the first place... I  am hoping that I can
> > use the same data model in the daemon and in the GUI app so that I
> > don't have to wrap it in a GtkTreeModel when using it in the GUI app.
> >
> > Anyway, I just want to back Ryan up on this one. I've been wanting a
> > GTreeModel for the exact same purpose as Ryan on more than one
> > occasion.
>
> Hey,
>
> if the main issue is, as you describe, not having to run X11, then
> gtk_init_check is all you need. There is no practical problem using a
> GtkTreeModel without a display. It's simply that gtk_init errors out if
> there is no display, which is reasonable default behaviour. See the API
> reference for details :)

The issue comes up when you have an object in a non-gui library that you
would like to use as a source for a GtkTreeView, for instance, in ryans
case I believe its about some object that would end up in libgio.


_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Claudio Saavedra-8
On Tue, 2009-05-12 at 12:50 +0200, Alexander Larsson wrote:

> On Tue, 2009-05-12 at 10:47 +0200, Christian Dywan wrote:
> > Am Tue, 12 May 2009 08:10:11 +0200
> > schrieb Mikkel Kamstrup Erlandsen <[hidden email]>:
> >
> > > 2009/5/12 Matthias Clasen <[hidden email]>:
> > > >>
> > > >> I should have been slightly more clear:  I am interested in being
> > > >> able to provide a GtkTreeModel for those people who wish to use it
> > > >> without having to link to libgtk myself.
> > > >>
> > > >> So the problem with using GNode: GtkTreeView doesn't use it.
> > > >
> > > > I don't see why this is something we should be eager to support.
> > > > Since tree models are only useful with GTK+ widgets, it doesn't
> > > > seem like a big burden to link against gtk when you are providing
> > > > tree models. The consumer of your model will already link against
> > > > gtk anyway.
> > >
> > > I recall having issues with this... But my memory serves me badly...
> > >
> > > Is it that gtk_init() requires a connection to X? That way if I am
> > > writing mydaemon based on mylib.so then mydaemon will require X to
> > > run. Maybe gtk_init_check() can work around this, or maybe the library
> > > does not need gtk_init_* in the first place... I  am hoping that I can
> > > use the same data model in the daemon and in the GUI app so that I
> > > don't have to wrap it in a GtkTreeModel when using it in the GUI app.
> > >
> > > Anyway, I just want to back Ryan up on this one. I've been wanting a
> > > GTreeModel for the exact same purpose as Ryan on more than one
> > > occasion.
> >
> > Hey,
> >
> > if the main issue is, as you describe, not having to run X11, then
> > gtk_init_check is all you need. There is no practical problem using a
> > GtkTreeModel without a display. It's simply that gtk_init errors out if
> > there is no display, which is reasonable default behaviour. See the API
> > reference for details :)
>
> The issue comes up when you have an object in a non-gui library that you
> would like to use as a source for a GtkTreeView, for instance, in ryans
> case I believe its about some object that would end up in libgio.
>

totem-pl-parser is using GtkTreeModel as well. IIRC, tracker uses
totem-pl-parser to parse playlists, but I guess they are not interested
on GtkTreeView.

Claudio

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Ryan Lortie
In reply to this post by Thomas Wood-2
Thomas Wood wrote:
> I think the Clutter project has it's own model implementation only
> because there isn't one in glib. There isn't actually a consumer in
> Clutter for ClutterModel, but other libraries built on top of Clutter
> use it.

Yes.  It's exactly about libraries.

I have a similar situation with GSettings -- I want to allow people to
place GSettingsList objects inside of GtkTreeView if they want, but
GSettings itself has no other reason to depend on GTK.  Since
GtkTreeModel also has no reason to depend on (the rest of) GTK, it seems
logical to move it into glib.

Cheers
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Matthias Clasen-2
On Tue, May 12, 2009 at 9:50 AM, Ryan Lortie <[hidden email]> wrote:

> Since GtkTreeModel also has no
> reason to depend on (the rest of) GTK, it seems logical to move it into
> glib.

It is not that GtkTreeModel depends on the rest of GTK+, it is more
that GtkTreeModel is designed for being the model part of
GtkTreeModel, not as a generic tree container.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Ryan Lortie
Matthias Clasen wrote:

> On Tue, May 12, 2009 at 9:50 AM, Ryan Lortie <[hidden email]> wrote:
>
>> Since GtkTreeModel also has no
>> reason to depend on (the rest of) GTK, it seems logical to move it into
>> glib.
>
> It is not that GtkTreeModel depends on the rest of GTK+, it is more
> that GtkTreeModel is designed for being the model part of
> GtkTreeModel, not as a generic tree container.
>

You could make the same argument about GtkBuilder, I suppose.  I'm of
the mind that that should also have been a generic GObject thing: GBuilder.

Cheers
_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Bastien Nocera
In reply to this post by Claudio Saavedra-8
On Tue, 2009-05-12 at 14:05 +0300, Claudio Saavedra wrote:
<snip>
> totem-pl-parser is using GtkTreeModel as well. IIRC, tracker uses
> totem-pl-parser to parse playlists, but I guess they are not interested
> on GtkTreeView.

It uses a GtkTreeModel, not a GtkTreeView, and only for the saving bits.

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: tree model

Philip Van Hoof
In reply to this post by Jamie McCracken-2

Here's a GLib with a collection API

http://git.codethink.co.uk/?p=glib;a=shortlog;h=collections


On Mon, 2009-05-11 at 13:27 -0400, Jamie McCracken wrote:

> I would hope iterators and models will be part of glib 3.0 to avoid 3rd
> party duplication as well as all other Libgee functionality
>
> this would also make it more vala friendly
>
> jamie
>
> On Mon, 2009-05-11 at 19:16 +0200, Szilárd Pfeiffer wrote:
> > What do you want to do with that? What about GNode? Isn't it good for you?
> >
> >
> > regards,
> >
> > Szilárd
> >
> >
> > Ryan Lortie wrote:
> >
> > > are there any 3ish plans for GtkTreeModel -> GTreeModel?
> > >
> > > cheers
> > > _______________________________________________
> > > gtk-devel-list mailing list
> > > [hidden email]
> > > http://mail.gnome.org/mailman/listinfo/gtk-devel-list
> >
> > _______________________________________________
> > gtk-devel-list mailing list
> > [hidden email]
> > http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
> _______________________________________________
> gtk-devel-list mailing list
> [hidden email]
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

_______________________________________________
gtk-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list