Re: Finding a widget in a Glade interface

2008-08-10 Thread Chris Vine
On Sat, 09 Aug 2008 18:18:40 + dhk [EMAIL PROTECTED] wrote: Referencing the widgets is what I'm trying to do. So, are you saying, the function is ok without any freeing? Also, am I decrementing the reference count? I don't see it. You will need to free the list: your mistake was in

Re: Finding a widget in a Glade interface

2008-08-10 Thread dhk
Chris Vine wrote: On Sat, 09 Aug 2008 18:18:40 + dhk [EMAIL PROTECTED] wrote: Referencing the widgets is what I'm trying to do. So, are you saying, the function is ok without any freeing? Also, am I decrementing the reference count? I don't see it. You will need to free the list: your

Re: Finding a widget in a Glade interface

2008-08-09 Thread dhk
dhk wrote: Nicola Fontana wrote: On Sun, 03 Aug 2008 19:10:37 + dhk [EMAIL PROTECTED] wrote: Is gtk_container_get_children() suppose to return a list of all children including children of children down to the last leaf or just the immediate children? I only seem to get the immediate

Re: Finding a widget in a Glade interface

2008-08-09 Thread Chris Vine
On Sat, 09 Aug 2008 10:06:57 + dhk [EMAIL PROTECTED] wrote: [snip] Does anyone have any ideas on how to free the memory correctly? g_list_foreach() operates on the data held by the list element, not on the element itself, so your freeGList() function is wrong, even if freeing the data is

Re: Finding a widget in a Glade interface

2008-08-09 Thread dhk
Chris Vine wrote: On Sat, 09 Aug 2008 10:06:57 + dhk [EMAIL PROTECTED] wrote: [snip] Does anyone have any ideas on how to free the memory correctly? g_list_foreach() operates on the data held by the list element, not on the element itself, so your freeGList() function is wrong, even if

Re: Finding a widget in a Glade interface

2008-08-07 Thread dhk
Nicola Fontana wrote: On Sun, 03 Aug 2008 19:10:37 + dhk [EMAIL PROTECTED] wrote: Is gtk_container_get_children() suppose to return a list of all children including children of children down to the last leaf or just the immediate children? I only seem to get the immediate children. Will

Re: Finding a widget in a Glade interface

2008-08-03 Thread dhk
Nicola Fontana wrote: On Thu, 31 Jul 2008 11:07:34 + dhk [EMAIL PROTECTED] wrote: Jim George wrote: I wasn't a fan of keeping the GladeXml object around due to the resources it used. Even though it's not as efficient as storing pointer, I wish I could just traverse up and down the the

Re: Finding a widget in a Glade interface

2008-08-03 Thread Nicola Fontana
On Sun, 03 Aug 2008 19:10:37 + dhk [EMAIL PROTECTED] wrote: Is gtk_container_get_children() suppose to return a list of all children including children of children down to the last leaf or just the immediate children? I only seem to get the immediate children. Will

Re: Finding a widget in a Glade interface

2008-07-31 Thread Tomas Carnecky
dhk wrote: Tristan Van Berkom wrote: On Wed, Jul 30, 2008 at 3:40 PM, Tristan Van Berkom [EMAIL PROTECTED] wrote: for future reference, this could easily have been pulled out of the docs/header files: glade_xml_get_widget() type libglade and feel lucky its right there. oops, I obviously

Re: Finding a widget in a Glade interface

2008-07-31 Thread Jim George
I should have mentioned that by time I want to call glade_xml_get_widget() the GladeXML *xml created by xml = glade_xml_new(filename.glade, NULL, NULL); is out of scope. If I call open the file again to get the widget it has no affect on the running window. I need to get the widget from

Re: Finding a widget in a Glade interface

2008-07-31 Thread dhk
Jim George wrote: I should have mentioned that by time I want to call glade_xml_get_widget() the GladeXML *xml created by xml = glade_xml_new(filename.glade, NULL, NULL); is out of scope. If I call open the file again to get the widget it has no affect on the running window. I need to get

Re: Finding a widget in a Glade interface

2008-07-31 Thread Eduardo M KALINOWSKI
dhk wrote: I should have mentioned that by time I want to call glade_xml_get_widget() the GladeXML *xml created by xml = glade_xml_new(filename.glade, NULL, NULL); is out of scope. If I call open the file again to get the widget it has no affect on the running window. I need to get the

Re: Finding a widget in a Glade interface

2008-07-31 Thread Nicola Fontana
On Thu, 31 Jul 2008 11:07:34 + dhk [EMAIL PROTECTED] wrote: Jim George wrote: I wasn't a fan of keeping the GladeXml object around due to the resources it used. Even though it's not as efficient as storing pointer, I wish I could just traverse up and down the the object tree for my

Re: Finding a widget in a Glade interface

2008-07-31 Thread Michael Torrie
dhk wrote: I should have mentioned that by time I want to call glade_xml_get_widget() the GladeXML *xml created by xml = glade_xml_new(filename.glade, NULL, NULL); is out of scope. If I call open the file again to get the widget it has no affect on the running window. I need to get the

Finding a widget in a Glade interface

2008-07-30 Thread dhk
How do you look up a widget when the interface is created with glade_xml_new()? There use to be a lookup_widget() function that worked if you called one of the two glade macros: GLADE_HOOKUP_OBJECT() or GLADE_HOOKUP_OBJECT_NO_REF(). Now unless you build the interface yourself and hook up

Re: Finding a widget in a Glade interface

2008-07-30 Thread Tristan Van Berkom
for future reference, this could easily have been pulled out of the docs/header files: glade_xml_get_widget() type libglade and feel lucky its right there. -Tristan note, remember to unref your GladeXML object early (unlike shown in said example). On Wed, Jul 30, 2008 at 7:10 AM, dhk [EMAIL

Re: Finding a widget in a Glade interface

2008-07-30 Thread Tristan Van Berkom
On Wed, Jul 30, 2008 at 3:40 PM, Tristan Van Berkom [EMAIL PROTECTED] wrote: for future reference, this could easily have been pulled out of the docs/header files: glade_xml_get_widget() type libglade and feel lucky its right there. oops, I obviously meant in google here...

Re: Finding a widget in a Glade interface

2008-07-30 Thread dhk
Tristan Van Berkom wrote: On Wed, Jul 30, 2008 at 3:40 PM, Tristan Van Berkom [EMAIL PROTECTED] wrote: for future reference, this could easily have been pulled out of the docs/header files: glade_xml_get_widget() type libglade and feel lucky its right there. oops, I obviously meant in google