gtk_file_chooser_unselect_all w/directory choosers



I'm using GtkFileChooser with GtkFileChooserAction == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER so that the user can choose a directory. I'm using gtk_file_chooser_unselect_all in case there are any directories in the CWD. That way, if the user hits OK as soon as the chooser is opened, then the directory the app selects is the CWD. This worked well in GTK 2.4.9 (SuSE 9.2), and behaves as the user expects.

Now, with GTK 2.6.4 (SUSE 9.3) and GTK 2.8.3, (SUSE 10.0) the gtk_file_chooser_unselect_all call does nothing. When the directory chooser is opened up, the first directory in the list is chosen. So, if the user hits OK right away, the directory they get is CWD/DIR1, where DIR1 is the first directory in the list. So now, if the user wants the CWD to be the working directory, they have to move up one directory and then select the directory they want, which is a bit of a nuisance.
Was this change intentional?   Seems hard to believe that it was.

ds = gtk_file_chooser_dialog_new(title, GTK_WINDOW(toplevel), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL);
gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(ds));
gtk_widget_show(ds);

Thanks,
Ken



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]