Re: Location entry in GtkFileChooser



Luis Menina wrote:
Hi Carlos.

Well, I'm not familiar with GtkFileChooser, but I think you should retrieve the full filename, and then use g_path_get_basename to get the short filename.

Thanks, that is a good suggestion, unfortunately it fails in my case. I really need to have access to the GtkEntry next to Location, to get the information in there.

The reason is, in my app, I accept local and remote addresses as well. It works
like this:

If the user writes:
http://www.my_site.org/my_path/my_file.xml
my app tries to fetch that file by HTTP (and ignores the GTK fullname).

If the users writes:
ftp://ftp.my_site.org/my_path/my_file.xml
my app tries to fetch that file by anonymous FTP (and ignores the GTK fullname).

Otherwise, my app will consider the file as an ordinary file,
and then normal procedure applies: get the GTK fullname, etc...

Unfortunatly GTK tries to parse the GtkEntry before sending it to me,
and gtk_file_chooser_get_filename returns NULL when the shortname
starts with http:// or ftp:// which in turn makes it impossible to use
g_path_get_basename :-(

So I really must have access to the Location GtkEntry,
Carlos
Cheers,

Luis

Carlos Pereira a écrit :
Hullo,

In a GTkFilechooser, how can I acess the information
on the Location entry? I only find functions to get
the full filename and uri but not the actual short
filename...

Carlos
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






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