GKeyFile memory leak on Windows ?

2010-06-09 Thread BianShaoLei
try this little prog on Windows xp: #include int main() { while(1) { GKeyFile *key = g_key_file_new(); g_key_file_free(key); } } It will eat up all memory. I can't find why. Could someone help me ? I think this maybe a memory leak.

How to make GtkLabel fills like GtkTextView?

2010-06-09 Thread Tao Wang
Hi, Some of the code I'm working on is using 'GtkTextView' to display text, which is just few sentences, rather than GtkLabel. I don't know why, Can anyone tell me what is the case to use 'GtkTextView' instead of 'GtkLabel' to display a text with several sentences(< 100 words) in not editable way?

GTK Widget assertion problem

2010-06-09 Thread Michael T .
Hi, I have a problem, when I try to access the GTK progress bar out of the function it was created in. I have a global variable GtkWidget *progressBar; so that I can access the progress bar from all the functions and different files in the project. When I initilize the bar and call functions to

Re: How to get a widget from its parent of parent(...) by name?

2010-06-09 Thread Tao Wang
Thank you very much, I got the ideas. Both of them works for me. I prefer the 'g_object_set_data(G_OBJECT(assistant), "builder", builder);' way, which is convenient for my code. On Thu, Jun 10, 2010 at 12:08 AM, Nicola Fontana wrote: > Il giorno Wed, 9 Jun 2010 14:54:07 +0200 > Tadej Borovšak h

Re: How to get a widget from its parent of parent(...) by name?

2010-06-09 Thread Nicola Fontana
Il giorno Wed, 9 Jun 2010 14:54:07 +0200 Tadej Borovšak ha scritto: > Hello. > > > Thank you, I'm sorry for that I didn't explain the problem clearer. What I > > meant is that there is no similar function of > > 'glade_get_widget_tree(widget)'. At the context where should call > > gtk_builder_ge

Re: How to get a widget from its parent of parent(...) by name?

2010-06-09 Thread Tadej Borovšak
Hello. > Thank you, I'm sorry for that I didn't explain the problem clearer. What I > meant is that there is no similar function of > 'glade_get_widget_tree(widget)'. At the context where should call > gtk_builder_get_object(), there is no 'GtkBuilder* builder' available. In > the previous code, w

Re: How to get a widget from its parent of parent(...) by name?

2010-06-09 Thread Tao Wang
Thank you, I'm sorry for that I didn't explain the problem clearer. What I meant is that there is no similar function of 'glade_get_widget_tree(widget)'. At the context where should call gtk_builder_get_object(), there is no 'GtkBuilder* builder' available. In the previous code, we can call 'glade_

Re: How to get a widget from its parent of parent(...) by name?

2010-06-09 Thread Florian Müllner
El mié, 09-06-2010 a las 22:02 +1000, Tao Wang escribió: > How can I do this if I migrate to GtkBuilder? There is no similar function > of 'glade_xml_get_widget()'. gtk_builder_get_object() is what you want :) ___ gtk-app-devel-list mailing list gtk-app-

How to get a widget from its parent of parent(...) by name?

2010-06-09 Thread Tao Wang
Hi, I'm migrating a project from GnomeDruid/Libglade to GtkAssistant/GtkBuilder. I got a problem of replacing 'glade_xml_get_wiget()'. The ui structure is like following: GtkAssistant assistant \ GtkVBox vbox1 \ GtkRadioButton button1 | GtkRadioButton button2 In

Re: Top down layout

2010-06-09 Thread jcupitt
On 9 June 2010 12:40, Matthew Allen wrote: > the problem I have now is that because I'm catching the "configure-event" > on the GtkWindow (to adjust my internal position/size variables) the > scrollview doesn't update to the client area of the window as I resize it. That's an easy one (phew): all

Re: Top down layout

2010-06-09 Thread Matthew Allen
> > When I tried putting putting a scrollable area into a window... > > I didn't get very convincing results. The code below attempts to put a > > very large button into a 300x300 size window. > > I made you a tiny example program. This puts a 400x400 button into a > 300x300 window. If the window

Re: gdk_draw_image() not working?

2010-06-09 Thread jcupitt
On 8 June 2010 23:22, Tomasz Sterna wrote: > I am using the following code (stripped): > > 8< > drawing = gtk_drawing_area_new (); > gc = gdk_gc_new (drawing->window); > image = gdk_image_new (GDK_IMAGE_FASTEST, >                       gdk_visual_get_system(), w, h ); > paint_image (imag

Re: Top down layout

2010-06-09 Thread jcupitt
On 9 June 2010 06:16, Matthew Allen wrote: >    GtkWidget *vp = gtk_viewport_new(GTK_ADJUSTMENT(h), GTK_ADJUSTMENT(v)); >    if (vp) >    { On a tiny style point, by design gtk cannot get out of memory errors. You can set a handler to run on out-of-mem, and allocations you perform yourself with g

Re: Top down layout

2010-06-09 Thread jcupitt
Hi Matthew, On 9 June 2010 06:16, Matthew Allen wrote: > When I tried putting putting a scrollable area into a window... > I didn't get very convincing results. The code below attempts to put a very > large button into a 300x300 size window. I made you a tiny example program. This puts a 400x400