[Glade-users] How to use FileChooserButton to get a filename (C language)


I have to get the filename the user selects from the chooserbutton and
send it as a string to a function. Unfortunatelly, i've been receiving
this annoying error: Gtk-CRITICAL **: IA__gtk_file_chooser_get_uri:
assertion `GTK_IS_FILE_CHOOSER (chooser)' failed

The program is a simple 2 button window: first button is the
filechooserbutton, and the second is the standard button that calls
the "clica" function when clicked.

Without the XML file that holds your GUI description things are a bit
hard to debug, but if I understand you correctly, "clica" function is
connected to GtkButton::clicked signal? If this is the case, then your
clica function should have a prototype like this:

clica (GtkButton *button,
       gpointer  *user_data);

You can find documentation about how your function prototypes should
look and what each parameter means by clicking DevHelp button in Glade
or by visiting GNOME developer's pages [1]. Documentation for
GtkButton::clicked signal can be found here [2].


[1] http://developer.gnome.org


Tadej Borov?ak
tadej.borovsak at gmail.com
tadeboro at gmail.com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]