[Glade-users] how to fill a ComboBoxEntry with the names of files of a directory ?

santiago.pita at apc.univ-paris7.fr santiago.pita at apc.univ-paris7.fr
Thu Feb 2 11:12:23 EST 2006


Hi, I'm a beginner-user of glade. I have created a GUI with a Browser and 
an empty ComboBoxEntry. I would like, when the user selects a directory 
with the Browser, the ComboBoxEntry to be filled with the names of the 
files which are this directory.

For that, I have choosen the Signal="clicked" for the button OK of my 
Browser. As a consequence, I have the following lines in the callback.c 
file:

void
on_filechooserbutton_clicked(GtkButton *button, gpointer user_data)
{

}

I suppose that I have to fill this, beginning with something like:
GtkFileChooser *chooser;
chooser = lookup_widget(button,"runlist_filechooserdialog");

But I don't know how to continue in order:
1) get the list of files being in the selected directory
2) put this in my ComboBoxEntry

I would appreciate some help!

Cheers
Santiago


More information about the Glade-users mailing list