RE: Passing data from a data collection window back to a main

2006-12-02 Thread Freddie Unpenstein
On Sun 11/26, [EMAIL PROTECTED] < [EMAIL PROTECTED] > > I am about to start a new app, and would like to improve my > programming style. I have been using global variables to pass data > from "popup" windows back to a main window. I have seen discussion > about using g_object_set_data, but have no

Re: Passing data from a data collection window back to a main

2006-11-26 Thread Zeeshan Ali
Hi! The best and simplest way to get rid of global varriables would be to define a structure that would contain all the data you need and then you can keep passing it's pointer around in the callbacks using the 'user_data' argument. If you want to use g_object_set/get_data() instead, thats also

Re: Passing data from a data collection window back to a main

2006-11-26 Thread [EMAIL PROTECTED]
This is my global variable version: #include #include "callbacks.h" #include "interface.h" #include "support.h" GtkWidget *window2, *window1, *label1, *entry1; void on_button1_clicked (GtkButton *button, gpo