LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 948|回复: 1

gtk/gnome写程序的一个问题

[复制链接]
发表于 2006-4-2 09:18:47 | 显示全部楼层 |阅读模式
我在写浏览文件的ok消息时候想返回输入的文件路径使用
gchar *url;
url= gtk_file_selection_get_filename(GTK_FILE_SELECTION(data));
结果出现个警告如下:
seedwnd.c: In function `okFile':
seedwnd.c:16: warning: assignment discards qualifiers from pointer target type
然后程序实际运行后得不到路径,不知道为什么 ?
发表于 2006-4-3 17:05:47 | 显示全部楼层
This function returns the selected filename in the on-disk encoding (see g_filename_from_utf8()), which may or may not be the same as that used by GTK+ (UTF-8). To convert to UTF-8, call g_filename_to_utf8(). The returned string points to a statically allocated buffer and should be copied if you plan to keep it around.

Retrieves the currently selected filename from the file selection dialog. If no file is selected then the selected directory path is returned.


http://www-eleves-isia.cma.fr/do ... ECTION-GET-FILENAME

hope it will help
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表