You would need to send the GtkComboBox widget to the callback function when connecting it. For example:
Code:
g_signal_connect (G_OBJECT (button1), "clicked", G_CALLBACK (on_button1_clicked), (gpointer) combobox);
...
static void
on_button1_clicked (GtkButton *button, GtkComboBox *combobox)
{
fillCombo (combobox);
}
Remember that, because of the definition of the g_signal_connect() function and the callback function prototype, GtkComboBox can be set to any supported widget type. For example, you can use gpointer, GtkObject, GObject, GtkWidget or any other ancestor of GtkComboBox.
Since you only need the combobox in fillCombo(), you can also do the following because g_signal_connect_swapped() switches the order of the parameters in the callback function:
Code:
g_signal_connect_swapped (G_OBJECT (button1), "clicked", G_CALLBACK (on_button1_clicked), (gpointer) combobox);
...
static void
on_button1_clicked (GtkComboBox *combobox)
{
fillCombo (combobox);
}
For more information on GTK+, you can check out my book that is being released in March 2007 at
http://book.andrewkrause.net ...