Re: How to use FileChooserButton to get a filename (C language)

Tadej BorovÅ¡ak <[email protected]> Fri, 04 Jan 2013 02:26:48 +0100
Newsgroups gmane.comp.gnome.glade.user
Message-ID <1357262808.2395.8.camel@tinki>
Hello!


> 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:

G_MODULE_EXPORT void
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].

Cheers,
Tadej


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

[2]
http://developer.gnome.org/gtk3/stable/GtkButton.html#GtkButton-clicked

-- 
Tadej Borovšak
[email protected]
[email protected]
blog.borovsak.si

_______________________________________________
Glade-users maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users