* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
-
#include <config.h>
#include <gtk/gtk.h>
#include <libgnomevfs/gnome-vfs.h>
#include "hildon-mapper.h"
+#include "path.h"
#include "utils.h"
#include "mapper-types.h"
#include "settings.h"
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);