Hello,
I am writing a basic file read / write program and testing it in Maemo SDK.
The part of the program that opens and reads a file works fine. The program is
also able to ask the user to select a file to save to (the Save dialog opens
and allows the user to type in / select a filename). But there is also the
following output at the terminal:
[...output omitted ...]
cbActionSave invoked
runFileChooser2: invoked!
running dialog
application[16448]: GLIB WARNING ** hildon-fm - Failed to create monitor for
path file:///home/sana/MyDocs/.camera
application[16448]: GLIB WARNING ** hildon-fm - error accessing
'file:///home/sana/MyDocs/.camera': File not found
application[16448]: GLIB CRITICAL ** default - make_child_uri: assertion `uri
!= NULL' failed
application[16448]: GLIB CRITICAL ** GLib-GIO - g_file_new_for_commandline_arg:
assertion `arg != NULL' failed
hello there1!application[16448]: GLIB CRITICAL ** default - make_child_uri:
assertion `uri != NULL' failed
application[16448]: GLIB CRITICAL ** GLib-GIO - g_file_new_for_commandline_arg:
assertion `arg != NULL' failed
hello there2! dialog completed
user didn't select any filename
you didn't choose a filename to save to
The code for the function is fairly standard:
static gchar* runFileChooser2(ApplicationState* app, GtkFileChooserAction
style) {
GtkWidget* dialog = NULL;
gchar* filename = NULL;
g_assert(app != NULL);
g_print("runFileChooser2: invoked!\n");
dialog = hildon_file_chooser_dialog_new(GTK_WINDOW(app->window), style);
gtk_widget_show_all(GTK_WIDGET(dialog));
g_print(" running dialog\n");
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
g_print(" hello there1!");
filename =
gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
g_print(" hello there2!");
}
g_print(" dialog completed\n");
gtk_widget_destroy(dialog);
if (filename != NULL) {
g_print(" user selected filename '%s'\n", filename);
} else {
g_print(" user didn't select any filename\n");
}
return filename;
}
I am new to Maemo, and I am not sure what the problem is here... any ideas
about how to go about solving this problem?
Thanks,
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers