Thank you! That should work. Does anybody also have an idea, how to realize the decision, if a path is below another one (platform independent would be nice but not absolutely necessary). That means a function that works like this: Default path ist '/temp/test/' /temp/test/ => function says true /temp/test/folder/ => function says true /home/test/otherfolder/ => function says false
Unfortunately the function must work with relative paths also (so tring comparison is not possible). -------- Original-Nachricht -------- Datum: Mon, 31 Jul 2006 12:48:28 +0200 Von: Iago Rubio <[EMAIL PROTECTED]> An: gtk-app-devel-list@gnome.org Betreff: Re: file chooser dialog > On Mon, 2006-07-31 at 09:16 +0200, [EMAIL PROTECTED] wrote: > > Hi, I'm using a file chooser dialog for a 'save as' and 'load' dialog. > > I have the problem that I have to set a base directory (e. g. > '/temp/test'), which is not to be crossed. > > That means that no files shall be selectable which are not below this > directory (e. g. '/temp/test/file' shall be selectable but '/temp/file' shall > be not) > > Is there an elegant method to do this? > > > > Any ideas? > > 1.- Don't show files out of this directory: > > http://www.gtk.org/api/2.6/gtk/gtk-gtkfilefilter.html > > 2.- Do not allow the file chooser to move out of this directory: > > http://www.gtk.org/api/2.6/gtk/GtkFileChooser.html#GtkFileChooser-current-folder-changed > http://www.gtk.org/api/2.6/gtk/GtkFileChooser.html#gtk-file-chooser-set-current-folder > > -- > Iago Rubio > > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list -- "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list