Gtkfilechooser question



Hi,
i'm facing a problem in the use of the gtk_file_chooser_dialog.
I'm developing a frontend for an antivirus scanner
and i need to pass to the scanner the path of the file OR folder
to scan. At the moment due to the nature of the

GtkFileChooserAction
typedef enum
{
  GTK_FILE_CHOOSER_ACTION_OPEN,
  GTK_FILE_CHOOSER_ACTION_SAVE,
  GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
  GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
} GtkFileChooserAction;

I solved the problem by adding two buttons to the gui 
one to select a file and one to select a folder.
This obviously is a suboptimal solution.
In the past i used a gtk_file_selection widget
for that function but i abandoned it as now it is deprecated.
After googling aroud a lot I tried various hacks to the gtk_file_chooser_dialog
by connecting to different signals and trying
to change the GtkFileChooserAction on the fly
with no result.
What I'm missing is a:

GTK_FILE_CHOOSER_ACTION_SELECT_FILE_FOLDER

action but i doubt the gtk people will implement
it for me :-).

I also started looking at the gtk_file_chooser
source to see if it is possible to implement 
a private version of the widget for my app
but this looks like a rather difficult task.
Any hints are welcome as i'm at a dead end now....


Thanks in advance and best regards,
Tito



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