[maemo-developers] hildon file chooser dialog
From: ds ds2 at physik.deDate: Sun Jun 6 20:42:47 EEST 2010
- Previous message: hildon file chooser dialog
- Next message: DBus Methods and Signals Introspection or Documentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks a lot for your reply.
I tried, but I can not pass the correct path.
If I pass /home/user/MyDocs/.documents
it is falling back to /
if I pass /home/user/MyDocs/
it goes into MyDocs, but I can not change to images or other
directories.
My guess is: it is a scratchbox problem.
The behaviour on diablo (N800) was, that you did not have to
pass a
current folder, and it was using the correct one
(/home/user/MyDocs) but
with the images directory and everything else present.
Detlef
Am Sonntag, den 06.06.2010, 08:58 -0700 schrieb Aniello Del Sorbo:
> On 6 June 2010 06:40, ds <ds2 at physik.de> wrote:
> Hello,
>
> I have a problem with hildon file chooser dialog in
> scratchbox. I can
> not test in N900:-)
>
> I use simple code
>
> hildon_file_chooser_dialog_new((GtkWindow*)window,GTK_FILE_CHOOSER_ACTION_SAVE);
> GtkFileFilter *filter=gtk_file_filter_new();
> gtk_file_filter_add_pattern (filter,"*.png");
> gtk_file_chooser_set_filter (GTK_FILE_CHOOSER
> (fdialog),filter);
>
> gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fdialog),
> "nicedraw");
> gtk_widget_show_all(GTK_WIDGET(fdialog));
> if (gtk_dialog_run (GTK_DIALOG (fdialog)) == GTK_RESPONSE_OK)
> {
> SaveToFile=TRUE;
> char nn[150];
> char *filename;
> filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER
> (fdialog));
> g_stpcpy(nn,filename);
> g_free (filename);
>
>
> Only in case I directly press "SAVE" when the dialog is open,
> I get an
> corrupted filename. If I first change location in the dialog
> everything
> works fine.
>
> Is this only a problem in scratchbox. I used X86 target and
> run it in
> the full maemo GUI. My application was installed with the GUI
> installer.
>
> Thanks a lot for any hint
>
> Detlef
>
>
> Probably you've got to set the default directory with a call like:
>
> gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER
> (dialog), default_path);
>
> Where default path should point (usually) to user's Documents
> (/home/user/MyDocs/.documents)
>
> If you don't do that, or pass a wrong path, it'll default to the root
> directory ("/") and it'll behave like you described.
>
>
> --
> anidel
- Previous message: hildon file chooser dialog
- Next message: DBus Methods and Signals Introspection or Documentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
