gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), g_get_home_dir());
}
-if (file && *file)
+if (file && *file) {
gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(dialog), *file);
-else
- gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(dialog), "track.gpx");
+ if (strlen(*file)==0)
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), "track.gpx");
+} else
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), "track.gpx");
if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_OK) {
gchar *file_uri_str;
if (!file_open(dir, &file_uri_str)) {
buffer=NULL;
- return TRUE;
+ return FALSE;
}
vfs_result=gnome_vfs_read_entire_file(file_uri_str, bytes, buffer);