Add recursive browsing options to preferences
Allow maximum recursion depth and maximum sub-directories to be configured in preferences.
This commit is contained in:
@@ -1824,6 +1824,8 @@ PREFERENCES_BEHADDALLHINT;Set all parameters to the <b>Add</b> mode.\nAdjustment
|
||||
PREFERENCES_BEHAVIOR;Behavior
|
||||
PREFERENCES_BEHSETALL;All to 'Set'
|
||||
PREFERENCES_BEHSETALLHINT;Set all parameters to the <b>Set</b> mode.\nAdjustments of parameters in the batch tool panel will be <b>absolute</b>, the actual values will be displayed.
|
||||
PREFERENCES_BROWSERECURSIVEDEPTH;Browse sub-folders depth
|
||||
PREFERENCES_BROWSERECURSIVEMAXDIRS;Maximum sub-folders
|
||||
PREFERENCES_CACHECLEAR;Clear
|
||||
PREFERENCES_CACHECLEAR_ALL;Clear all cached files:
|
||||
PREFERENCES_CACHECLEAR_ALLBUTPROFILES;Clear all cached files except for cached processing profiles:
|
||||
|
@@ -1389,6 +1389,24 @@ Gtk::Widget* Preferences::getFileBrowserPanel()
|
||||
maxRecentFolders->set_range(1, 25);
|
||||
vbro->pack_start(*hbrecent, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
// Recursive browsing options.
|
||||
Gtk::Box *hbBrowseRecursive = Gtk::manage(new Gtk::Box());
|
||||
Gtk::Label *labBrowseRecursiveDepth = Gtk::manage(new Gtk::Label(M("PREFERENCES_BROWSERECURSIVEDEPTH") + ":"));
|
||||
browseRecursiveDepth = Gtk::manage(new Gtk::SpinButton());
|
||||
browseRecursiveDepth->set_digits(0);
|
||||
browseRecursiveDepth->set_increments(1, 5);
|
||||
browseRecursiveDepth->set_range(1, 999);
|
||||
Gtk::Label *labBrowseRecursiveMaxDirs = Gtk::manage(new Gtk::Label(M("PREFERENCES_BROWSERECURSIVEMAXDIRS") + ":"));
|
||||
browseRecursiveMaxDirs = Gtk::manage(new Gtk::SpinButton());
|
||||
browseRecursiveMaxDirs->set_digits(0);
|
||||
browseRecursiveMaxDirs->set_increments(1, 5);
|
||||
browseRecursiveMaxDirs->set_range(1, 999);
|
||||
hbBrowseRecursive->pack_start(*labBrowseRecursiveDepth, Gtk::PACK_SHRINK, 4);
|
||||
hbBrowseRecursive->pack_start(*browseRecursiveDepth, Gtk::PACK_SHRINK, 4);
|
||||
hbBrowseRecursive->pack_start(*labBrowseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4);
|
||||
hbBrowseRecursive->pack_start(*browseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4);
|
||||
vbro->pack_start(*hbBrowseRecursive, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
fro->add(*vbro);
|
||||
|
||||
|
||||
@@ -1864,6 +1882,8 @@ void Preferences::storePreferences()
|
||||
moptions.filmStripOverlayedFileNames = filmStripOverlayedFileNames->get_active();
|
||||
moptions.sameThumbSize = sameThumbSize->get_active();
|
||||
moptions.internalThumbIfUntouched = ckbInternalThumbIfUntouched->get_active();
|
||||
moptions.browseRecursiveDepth = static_cast<int>(browseRecursiveDepth->get_value());
|
||||
moptions.browseRecursiveMaxDirs = static_cast<int>(browseRecursiveMaxDirs->get_value());
|
||||
|
||||
auto save_where = saveParamsPreference->get_active_row_number();
|
||||
moptions.saveParamsFile = save_where == 0 || save_where == 2;
|
||||
@@ -2089,6 +2109,8 @@ void Preferences::fillPreferences()
|
||||
filmStripOverlayedFileNames->set_active(moptions.filmStripOverlayedFileNames);
|
||||
sameThumbSize->set_active(moptions.sameThumbSize);
|
||||
ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched);
|
||||
browseRecursiveDepth->set_value(moptions.browseRecursiveDepth);
|
||||
browseRecursiveMaxDirs->set_value(moptions.browseRecursiveMaxDirs);
|
||||
|
||||
saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1);
|
||||
|
||||
|
@@ -194,6 +194,8 @@ class Preferences final :
|
||||
Gtk::CheckButton* overlayedFileNames;
|
||||
Gtk::CheckButton* filmStripOverlayedFileNames;
|
||||
Gtk::CheckButton* sameThumbSize;
|
||||
Gtk::SpinButton* browseRecursiveDepth;
|
||||
Gtk::SpinButton* browseRecursiveMaxDirs;
|
||||
|
||||
Gtk::SpinButton* threadsSpinBtn;
|
||||
Gtk::SpinButton* clutCacheSizeSB;
|
||||
|
Reference in New Issue
Block a user