Base directory for filechooser dialog?



Hi
I would like the filechooser dialog not  to open in the currenr directory,
but in a particulart other diectory.

I tried it like this:

    Gtk::FileChooserDialog dialog("Please choose a
file",Gtk::FILE_CHOOSER_ACTION_OPEN);
    dialog.set_transient_for(*m_pOwner);

    //Add response buttons the the dialog:
    dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
    dialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);

    dialog.set_current_folder(m_sBaseDir);

Where m_sBaseDir contains the name of the directory i want the
filechooser to use.
But this does not seem to work - the filechooser still opens in the
current directory.
Can anybody help me here?

Thank YOu
  Jody


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