dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dialog->add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
if(!filename.empty())
- dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename);
+ if (is_absolute_path(filename))
+ dialog->set_filename(filename);
+ else
+ dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename);
if(dialog->run()==GTK_RESPONSE_ACCEPT) {
filename=dialog->get_filename();
delete dialog;
dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dialog->add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
if(!filename.empty())
- dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename);
+ if (is_absolute_path(filename))
+ dialog->set_filename(filename);
+ else
+ dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename);
if(dialog->run()==GTK_RESPONSE_ACCEPT) {
filename=dialog->get_filename();
delete dialog;
dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dialog->add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
if(!filename.empty())
- dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename);
+ if (is_absolute_path(filename))
+ dialog->set_filename(filename);
+ else
+ dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename);
if(dialog->run()==GTK_RESPONSE_ACCEPT) {
filename=dialog->get_filename();
delete dialog;