Get the current folder in a file chooser dialog

2012-02-01 Thread Manuel Ferrero
How do I get the current folder of a file selected in a GtkFileChooser when the file is selected in the Recenttly used section? My code is this: open_dialog = gtk_file_chooser_dialog_new( "Open", GTK_WINDOW(data->window1), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CAN

Re: File Chooser Dialog: display only files with chosen extensions: SOLVED

2008-01-12 Thread vijayasarathy
gtk_file_filter_add_pattern(filefilter,(const gchar >> *)"application/octet-stream"); >> > > gtk_file_filter_add_pattern is for shell-style glob matches. You could > either use gtk_file_filter_add_mime_type or > gtk_file_filter_add_pattern(filefilter, "*.exe"). &g

Re: File Chooser Dialog: display only files with chosen extensions

2008-01-12 Thread Armin Burgmeier
ou could either use gtk_file_filter_add_mime_type or gtk_file_filter_add_pattern(filefilter, "*.exe"). > //create file chooser dialog box > wdgt_filechooser = create_ui_filechooser(); > > //Add filter to the dialog box > gtk_file_chooser_

Re: File Chooser Dialog: display only files with chosen extensions

2008-01-12 Thread Emmanuele Bassi
On Sat, 2008-01-12 at 17:04 +0530, [EMAIL PROTECTED] wrote: > //Add filter to the dialog box > gtk_file_chooser_add_filter((GtkFileChooser > *)wdgt_filechooser,filefilter); try with gtk_file_chooser_set_filter (file_chooser, filter); and use the casting macros that GTK+ provides, w

Re: File Chooser Dialog: display only files with chosen extensions

2008-01-12 Thread vijayasarathy
efilter,(const gchar *)"application/octet-stream"); //create file chooser dialog box wdgt_filechooser = create_ui_filechooser(); //Add filter to the dialog box gtk_file_chooser_add_filter((GtkFileChooser *)wdgt_filechooser,filefilter);

Re: File Chooser Dialog: display only files with chosen extensions

2008-01-12 Thread Eduardo M KALINOWSKI
[EMAIL PROTECTED] wrote: > Hi all, > > Is it possible that we can let a GtkFileChooserDialog object [file chooser > dialog] to display only files of specific extensions, for example, display > only exe files in the navigated folder ? > Certainly. You have to create GtkFileF

File Chooser Dialog: display only files with chosen extensions

2008-01-12 Thread vijayasarathy
Hi all, Is it possible that we can let a GtkFileChooserDialog object [file chooser dialog] to display only files of specific extensions, for example, display only exe files in the navigated folder ? Thanks. Vijay

Re: file chooser dialog

2006-08-05 Thread dasaspock
Thank you for your help! Your hints made it work. I was able to constrict the paths that can be chosen in my file chooser. But there ist one Problem left: On the left side of my file chooser Dialog there are many shortcuts shown which now can not be chosen any more. This is not very nice. But

Re: file chooser dialog

2006-08-04 Thread Roland Koebler
hi, > You need to normalize the paths, then you can string compare them. that's right. and then you could compare them with g_str_has_prefix(), for example. > Given that the current directory were /tmp/barb, normalizing the path > will transform ./../file and /tmp/barb/file into ./file. if you wa

Re: file chooser dialog

2006-07-31 Thread Wallace Owen
You need to normalize the paths, then you can string compare them. Given that the current directory were /tmp/barb, normalizing the path will transform ./../file and /tmp/barb/file into ./file. // Wally On Mon, 2006-07-31 at 23:36 +0200, Roland Koebler wrote: > hi, > > > Does anybody also ha

Re: file chooser dialog

2006-07-31 Thread Roland Koebler
hi, > 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). maybe there already is such a function in a library - I don't know. but you can use glib. look here: http://developer.gnome.org/d

Re: file chooser dialog

2006-07-31 Thread Norbert Bauer
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

Re: file chooser dialog

2006-07-31 Thread Iago Rubio
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. > Tha

file chooser dialog

2006-07-31 Thread dasaspock
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