hildon file chooser dialog
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 ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: hildon file chooser dialog
On 6 June 2010 06:40, ds d...@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 ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: hildon file chooser dialog
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 d...@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 ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] how to add more files/folders tree structure in hildon-file-chooser-dialog besides files on the disk
hildon-file-chooser-dialog shows folder/file tree structure in the left space and some other view in the right space. It is possible to artificial folder/file tree tree structure in the left after normal folder/file ? someone give me some guides?should I implement some interfaces? regards ___ 雅虎1G免费邮箱百分百防垃圾信 http://cn.mail.yahoo.com/ ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers