Move the special directory query helpers into the places browser.

This commit is contained in:
Adam Reichold
2015-12-25 23:28:10 +01:00
parent e78d29ef35
commit b62b78e2f8
12 changed files with 146 additions and 232 deletions

View File

@@ -293,24 +293,14 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
dialog.set_current_name (lastFilename);
//Add the user's default (or global if multiuser=false) profile path to the Shortcut list
#ifdef WIN32
// Dirty workaround, waiting for a clean solution by using exceptions!
if (!safe_is_shortcut_dir(options.getPreferredProfilePath()))
#endif
try {
dialog.add_shortcut_folder(options.getPreferredProfilePath());
} catch (Glib::Error &err) {}
try {
dialog.add_shortcut_folder(options.getPreferredProfilePath());
} catch (Glib::Error&) {}
//Add the image's path to the Shortcut list
#ifdef WIN32
// Dirty workaround, waiting for a clean solution by using exceptions!
if (!safe_is_shortcut_dir(imagePath))
#endif
try {
dialog.add_shortcut_folder(imagePath);
} catch (Glib::Error &err) {}
try {
dialog.add_shortcut_folder(imagePath);
} catch (Glib::Error&) {}
//Add response buttons the the dialog:
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
@@ -468,24 +458,14 @@ void ProfilePanel::load_clicked (GdkEventButton* event)
bindCurrentFolder (dialog, options.loadSaveProfilePath);
//Add the user's default (or global if multiuser=false) profile path to the Shortcut list
#ifdef WIN32
// Dirty workaround, waiting for a clean solution by using exceptions!
if (!safe_is_shortcut_dir(options.getPreferredProfilePath()))
#endif
try {
dialog.add_shortcut_folder(options.getPreferredProfilePath());
} catch (Glib::Error &err) {}
try {
dialog.add_shortcut_folder(options.getPreferredProfilePath());
} catch (Glib::Error&) {}
//Add the image's path to the Shortcut list
#ifdef WIN32
// Dirty workaround, waiting for a clean solution by using exceptions!
if (!safe_is_shortcut_dir(imagePath))
#endif
try {
dialog.add_shortcut_folder(imagePath);
} catch (Glib::Error &err) {}
try {
dialog.add_shortcut_folder(imagePath);
} catch (Glib::Error&) {}
//Add response buttons the the dialog:
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);