Move the special directory query helpers into the places browser.
This commit is contained in:
@@ -392,28 +392,21 @@ void FlatField::flatFieldAutoSelectChanged()
|
||||
|
||||
}
|
||||
|
||||
void FlatField::setShortcutPath(Glib::ustring path)
|
||||
void FlatField::setShortcutPath(const Glib::ustring& path)
|
||||
{
|
||||
if (path == "") {
|
||||
if (path.empty ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
try {
|
||||
|
||||
// Dirty workaround, waiting for a clean solution by using exceptions!
|
||||
if (!safe_is_shortcut_dir(path))
|
||||
#endif
|
||||
{
|
||||
if (lastShortcutPath != "") {
|
||||
try {
|
||||
flatFieldFile->remove_shortcut_folder(lastShortcutPath);
|
||||
} catch (Glib::Error &err) {}
|
||||
if (!lastShortcutPath.empty ()) {
|
||||
flatFieldFile->remove_shortcut_folder (lastShortcutPath);
|
||||
}
|
||||
|
||||
flatFieldFile->add_shortcut_folder (path);
|
||||
|
||||
lastShortcutPath = path;
|
||||
|
||||
try {
|
||||
flatFieldFile->add_shortcut_folder(path);
|
||||
} catch (Glib::Error &err) {}
|
||||
}
|
||||
} catch (Glib::Error&) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user