Re: Bug in GLib, libglade, libc??

2006-08-14 Thread tomas
On Tue, Aug 15, 2006 at 12:57:06AM -0300, Fabricio Rocha wrote: > Thank you very much, Yeti and Samuel, for your replies! > [...] > I have a suspicion from my lack of practice in C: a module of my > program uses a structured type which must contain, as its last member, a > dynamic list of

Re: Bug in GLib, libglade, libc??

2006-08-14 Thread John Coppens
On Tue, 15 Aug 2006 00:57:06 -0300 Fabricio Rocha <[EMAIL PROTECTED]> wrote: > I have a suspicion from my lack of practice in C: a module of > my program uses a structured type which must contain, as its last > member, a dynamic list of strings, i.e., pointers to gchars (**list). > Sometimes

Re: Bug in GLib, libglade, libc??

2006-08-14 Thread Samuel Cormier-Iijima
Hi, First of all, this should really be better documented elsewhere, but valgrind has some problems debugging and profiling multithreaded code (such as Gtk/Glib). To get some more accurate results, try the following: G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --show-reachable "myapp"

Re: Bug in GLib, libglade, libc??

2006-08-14 Thread Fabricio Rocha
Thank you very much, Yeti and Samuel, for your replies! I really believe that there is something wrong in MY code, and not in libglade, nor libc, nor GTK, etc., that makes my program react so different every time I compile and run it. However, I still could not figure what exactly is wr

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \"Firefly\" Lund
On Mon, 14 Aug 2006, rupert wrote: > void crypto_mount_set_pixbuf(struct treedata *treedata){ > > gchar *mountpoint; > GtkTreeIter iter; > gtk_tree_model_get_iter_first(treedata->store,&iter); > A couple of stylistic points: 1) put the opening brace as the first thing on the next line 2) add

Re: Fwd: Systray icon..

2006-08-14 Thread James Scott Jr
I was able to compile it, after a few minor changes. If you wanting to use it on a linux platform download my example for this url. http://mysite.verizon.net/skoona/id2.html The example program demonstrates adding and removing an icon, adding tooltips, popup-menus to an icon, etc. Let me know, i

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
grrr, simple as most of the time: void crypto_mount_set_pixbuf(struct treedata *treedata){ gchar *mountpoint; GtkTreeIter iter; gtk_tree_model_get_iter_first(treedata->store,&iter); do { gtk_tree_model_get(treedata->store, &iter, MOUNTPOINT_COLUMN, &mountpoint, -1);

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
its getting good, somehow i packed the gtk_tree_model_iter_next in a do while loop, when i have no return in the loop it show all the lines once(it should show it every 100ms) , when i add a return it always loops(but loops) at the first line. void crypto_mount_set_pixbuf(struct treedata *treeda

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \"Firefly\" Lund
On Mon, 14 Aug 2006, rupert wrote: > thx for the hel, with adding the tip lanve gave its working somehow now, > but i had to do some changes: > > gtk_tree_model_get_iter_first(treedata->store,&treedata->iter); > i have this line now before make_list and also in the function that updates > the > pi

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
On 8/14/06, Peter Firefly Lund <[EMAIL PROTECTED]> wrote: > > On Mon, 14 Aug 2006, rupert wrote: > > > void make_list(GtkListStore *store, GtkTreeIter iter, gpointer > > pixbuf_mapper_yes, gpointer pixbuf_mapper_no, gpointer pixbuf_mount_yes, > > gpointer pixbuf_mount_no){ > > Notice the lack of *

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Lance Dillon
(I hate yahoo's quoting) - Original Message From: "Peter "Firefly" Lund" <[EMAIL PROTECTED]> To: Lance Dillon <[EMAIL PROTECTED]> Cc: gtk-app-devel-list@gnome.org Sent: Monday, August 14, 2006 8:07:43 AM Subject: Re: Key-value file parser, howto get all groups and create loop from th

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \"Firefly\" Lund
On Mon, 14 Aug 2006, Lance Dillon wrote: > The problem is your code doesn't seem to initialize iter in any way. > Before you call make_list, you should probably do something like this: No, no. make_list() by itself is fine. It sets its local iter in every iteration through the call to gtk_lis

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Lance Dillon
- Original Message From: rupert <[EMAIL PROTECTED]> To: Peter Firefly Lund <[EMAIL PROTECTED]> Cc: gtk-app-devel-list@gnome.org Sent: Monday, August 14, 2006 7:53:40 AM Subject: Re: Key-value file parser, howto get all groups and create loop from them which gets started here, before t

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \"Firefly\" Lund
On Mon, 14 Aug 2006, rupert wrote: > void make_list(GtkListStore *store, GtkTreeIter iter, gpointer > pixbuf_mapper_yes, gpointer pixbuf_mapper_no, gpointer pixbuf_mount_yes, > gpointer pixbuf_mount_no){ Notice the lack of * in front of the variable iter. > make_list(treedata.store, treedata.ite

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
On 8/14/06, Peter Firefly Lund <[EMAIL PROTECTED]> wrote: > > On Mon, 14 Aug 2006, rupert wrote: > > Strangely the function seems to stop, because i only get 1 test on the > bash: > (cryptomaster:11056): Gtk-CRITICAL **: gtk_list_store_set: assertion > `iter->stamp == list_store->stamp' failed > >

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \"Firefly\" Lund
On Mon, 14 Aug 2006, rupert wrote: Strangely the function seems to stop, because i only get 1 test on the bash: (cryptomaster:11056): Gtk-CRITICAL **: gtk_list_store_set: assertion `iter->stamp == list_store->stamp' failed And how, pray tell, do you get your iterator initialized? ;) The snippet y

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
I've gone through all the warning and now only get one warning on my +- 700 lines of code, now i have 3 warnings left wich I dont get away by now. Thx for the advice to go thorugh them, my old teacher told me we can ignore them :(. I packed the tree into a struct and now access the parts with treed

Re: pthread_t through pthread_self?

2006-08-14 Thread Peter \"Firefly\" Lund
On Sun, 13 Aug 2006, Luka Napotnik wrote: > I'm interested if the function pthread_self() returns a valid pthread_t > structure for threads, created with g_thread_new() so the pthread_t can > be used with pthread_kill() ? As long as you are working on top of POSIX, yes, it should. pthread_kill()