Re: Gio memory management

2008-10-14 Thread John Vetterli
On Mon, Oct 13, 2008 at 08:05:59PM +0200, nico wrote: I would like to know your opinion about the problem with the memory usage, that I was talking about in my previous mails... Did someone test the script? Did someone look charts that I make? Does it use the same quantity of memory to scan

Re: Gio memory management

2008-10-14 Thread nico
Hi, The problem may be a simple one: the . and .. directories. Unless g_file_enumerate_children filters these out for you (the online documentation makes no mention of doing so) you need to ignore these. Otherwise, you'll just keep scanning the same directory, or its parent, over and over

Re: Gio memory management

2008-10-14 Thread nico
Thank you, Damien, Yes, the g_free(child_path); is needed. Now I need only... 43.8 Mb instead of 44.1 Mb. That's better... But I guess the main memory leak isn't here... In fact, in the first program that I post to the mailing list I was building the children filename by myself (with malloc,

Re: Gio memory management

2008-10-14 Thread nico
Thank you Nicola, Yes, that's it. Now everything seems to be alright (I'm stupid). Regards, Nicolas Because you are unrefing it in the wrong place. Now you have: while ((file_info = g_file_enumerator_next_file()) != NULL) { ... } g_object_unref(file_info); Here file_info is surely NULL

Re: Gio memory management

2008-10-14 Thread Nicola Fontana
On Tue, 14 Oct 2008 17:41:13 +0200 Damien Caliste [EMAIL PROTECTED] wrote: Hello, Le 14/10/2008, nico [EMAIL PROTECTED] a écrit : And here is the source code of the program: http://yojik.shtooka.net/gio.c I didn't run nor check extensively the program but maybe there is a memory leak

Re: Gio memory management

2008-10-14 Thread Nicola Fontana
On Tue, 14 Oct 2008 18:03:05 +0200 nico [EMAIL PROTECTED] wrote: Thank you Nicola, And you're also g_freeing a GFileInfo, which is a GObject. Try to use g_object_unref() instead. Ciao When I use g_object_unref() instead of g_free(file_info); I've got this error :

Status Icons and Tooltip

2008-10-14 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I noticed that with GTK 2.12 that tooltips have been replaced with tooltip and that with tooltip you can set the text displayed to be marked up. Is there a way to set the tooltip of the status icon to use marked up text? Thanks, Kevin - -- Get my

Re: Gio memory management

2008-10-14 Thread Damien Caliste
Hello, Le 14/10/2008, nico [EMAIL PROTECTED] a écrit : And here is the source code of the program: http://yojik.shtooka.net/gio.c I didn't run nor check extensively the program but maybe there is a memory leak coming from the path you build with g_build_filename(). The documentation states that

Re: Gio memory management

2008-10-14 Thread nico
Thank you Nicola, And you're also g_freeing a GFileInfo, which is a GObject. Try to use g_object_unref() instead. Ciao When I use g_object_unref() instead of g_free(file_info); I've got this error : (process:30949): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT

Dialog box with buttons flickers

2008-10-14 Thread dolly vittal
Hi All, I have created a small GTk+ application and I use a dialog box with two buttons.   When I use gtk_dialog_run , the dialog is shown and it flickers.   I am not sure if this is the problem with gtk or the way I have coded the dialog box.  I really appreciate any help on solving this.