GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Apr 24, 2014 11:22 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: file name
PostPosted: Sat Nov 17, 2007 7:20 am 
Offline
Familiar Face

Joined: Fri Sep 28, 2007 10:59 am
Posts: 46
How you can recive only one file name? the following function returns both name and path of the file . gtk_file_chooser_get_filename . But i want file name . what should I do?...


Top
 Profile  
 
 Post subject: re file name
PostPosted: Sat Nov 17, 2007 4:36 pm 
Offline
Familiar Face

Joined: Sat Nov 17, 2007 3:05 pm
Posts: 5
there's some dependency on what G_FILENAME_ENCODING is set to I suppose, but basically you have to search from the end of the string for a slash (or backslash if you're using windows?) and copy everything after that to another (or the same) buffer.

check the documentation for g_path_get_basename it might be relevant....
http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-path-get-basename


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group