gmain context/loop issue

2009-03-11 Thread Chuck Crisler
Hello! I am having a problem with the glib main context or g_main_loop. This is running on Ubuntu Linux 8.0.4 and Fedora 10. I have an app that needs to spawn and control another app. I am calling g_spawn_async_with_pipes from a secondary thread in a shared library, not the main app. I manually cre

Re: newbie question

2009-03-11 Thread Dov Grobgeld
Hi Frederico, (Copied from my own post from Mar 23, 2006 12:31:00 pm) Here are four additional possibilities: 1. Use global variables for your widgets. 2. Create a struct containing pointers to all your widgets and use the userdata field to pass this struct around in all callbacks. 3. Use the

Re: newbie question

2009-03-11 Thread Tadej Borovšak
2009/3/11 frederico schardong : >>void my_callback_function (GtkButton *widget, gpointer user_ptr); >> >>... >> >>g_signal_connect( G_OBJECT( widget), "clicked", >>       G_CALLBACK( my_callback_function), user_ptr ); >> >> >>void my_callback_function (GtkButton *widget, gpointer user_ptr) { >> >>

Re: newbie question

2009-03-11 Thread frederico schardong
>void my_callback_function (GtkButton *widget, gpointer user_ptr); > >... > >g_signal_connect( G_OBJECT( widget), "clicked", > G_CALLBACK( my_callback_function), user_ptr ); > > >void my_callback_function (GtkButton *widget, gpointer user_ptr) { > > ... >} > > >http://library.gnome.org/