Remove recursive symlink browsing for Windows

Windows doesn't have symbolic links, so the preference should not be
shown.
This commit is contained in:
Lawrence Lee
2023-10-17 21:20:18 -07:00
parent 051bbaf322
commit b6f3ea421e
2 changed files with 10 additions and 4 deletions

View File

@@ -1405,9 +1405,11 @@ Gtk::Widget* Preferences::getFileBrowserPanel()
hbBrowseRecursive->pack_start(*browseRecursiveDepth, Gtk::PACK_SHRINK, 4); hbBrowseRecursive->pack_start(*browseRecursiveDepth, Gtk::PACK_SHRINK, 4);
hbBrowseRecursive->pack_start(*labBrowseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4); hbBrowseRecursive->pack_start(*labBrowseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4);
hbBrowseRecursive->pack_start(*browseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4); hbBrowseRecursive->pack_start(*browseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4);
browseRecursiveFollowLinks = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_BROWSERECURSIVEFOLLOWLINKS")));
vbro->pack_start(*hbBrowseRecursive, Gtk::PACK_SHRINK, 0); vbro->pack_start(*hbBrowseRecursive, Gtk::PACK_SHRINK, 0);
#ifndef _WIN32
browseRecursiveFollowLinks = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_BROWSERECURSIVEFOLLOWLINKS")));
vbro->pack_start(*browseRecursiveFollowLinks, Gtk::PACK_SHRINK, 0); vbro->pack_start(*browseRecursiveFollowLinks, Gtk::PACK_SHRINK, 0);
#endif
fro->add(*vbro); fro->add(*vbro);
@@ -1886,7 +1888,9 @@ void Preferences::storePreferences()
moptions.internalThumbIfUntouched = ckbInternalThumbIfUntouched->get_active(); moptions.internalThumbIfUntouched = ckbInternalThumbIfUntouched->get_active();
moptions.browseRecursiveDepth = static_cast<int>(browseRecursiveDepth->get_value()); moptions.browseRecursiveDepth = static_cast<int>(browseRecursiveDepth->get_value());
moptions.browseRecursiveMaxDirs = static_cast<int>(browseRecursiveMaxDirs->get_value()); moptions.browseRecursiveMaxDirs = static_cast<int>(browseRecursiveMaxDirs->get_value());
if (browseRecursiveFollowLinks) {
moptions.browseRecursiveFollowLinks = browseRecursiveFollowLinks->get_active(); moptions.browseRecursiveFollowLinks = browseRecursiveFollowLinks->get_active();
}
auto save_where = saveParamsPreference->get_active_row_number(); auto save_where = saveParamsPreference->get_active_row_number();
moptions.saveParamsFile = save_where == 0 || save_where == 2; moptions.saveParamsFile = save_where == 0 || save_where == 2;
@@ -2114,7 +2118,9 @@ void Preferences::fillPreferences()
ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched); ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched);
browseRecursiveDepth->set_value(moptions.browseRecursiveDepth); browseRecursiveDepth->set_value(moptions.browseRecursiveDepth);
browseRecursiveMaxDirs->set_value(moptions.browseRecursiveMaxDirs); browseRecursiveMaxDirs->set_value(moptions.browseRecursiveMaxDirs);
if (browseRecursiveFollowLinks) {
browseRecursiveFollowLinks->set_active(moptions.browseRecursiveFollowLinks); browseRecursiveFollowLinks->set_active(moptions.browseRecursiveFollowLinks);
}
saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1); saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1);

View File

@@ -196,7 +196,7 @@ class Preferences final :
Gtk::CheckButton* sameThumbSize; Gtk::CheckButton* sameThumbSize;
Gtk::SpinButton* browseRecursiveDepth; Gtk::SpinButton* browseRecursiveDepth;
Gtk::SpinButton* browseRecursiveMaxDirs; Gtk::SpinButton* browseRecursiveMaxDirs;
Gtk::CheckButton* browseRecursiveFollowLinks; Gtk::CheckButton* browseRecursiveFollowLinks{nullptr};
Gtk::SpinButton* threadsSpinBtn; Gtk::SpinButton* threadsSpinBtn;
Gtk::SpinButton* clutCacheSizeSB; Gtk::SpinButton* clutCacheSizeSB;