merge with 'profile-reset-default'
This commit is contained in:
@@ -117,7 +117,7 @@ FILEBROWSER_DELETEDLGMSG;Are you sure you want to delete the selected <b>%1</b>
|
|||||||
FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected <b>%1</b> files <b>including</b> a queue-processed version?
|
FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected <b>%1</b> files <b>including</b> a queue-processed version?
|
||||||
FILEBROWSER_EMPTYTRASH;Empty trash
|
FILEBROWSER_EMPTYTRASH;Empty trash
|
||||||
FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files from trash.
|
FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files from trash.
|
||||||
FILEBROWSER_EXEC_CPB;Custom Profile Builder
|
FILEBROWSER_RESETDEFAULTPROFILE;Reset to default
|
||||||
FILEBROWSER_EXTPROGMENU;Open with
|
FILEBROWSER_EXTPROGMENU;Open with
|
||||||
FILEBROWSER_FLATFIELD;Flat-Field
|
FILEBROWSER_FLATFIELD;Flat-Field
|
||||||
FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory
|
FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory
|
||||||
|
@@ -340,7 +340,7 @@ FileBrowser::FileBrowser ()
|
|||||||
p++;
|
p++;
|
||||||
submenuProfileOperations->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1);
|
submenuProfileOperations->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1);
|
||||||
p++;
|
p++;
|
||||||
submenuProfileOperations->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p + 1);
|
submenuProfileOperations->attach (*Gtk::manage(resetdefaultprof = new Gtk::MenuItem (M("FILEBROWSER_RESETDEFAULTPROFILE"))), 0, 1, p, p + 1);
|
||||||
p++;
|
p++;
|
||||||
submenuProfileOperations->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1);
|
submenuProfileOperations->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1);
|
||||||
p++;
|
p++;
|
||||||
@@ -358,7 +358,7 @@ FileBrowser::FileBrowser ()
|
|||||||
p++;
|
p++;
|
||||||
pmenu->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1);
|
pmenu->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1);
|
||||||
p++;
|
p++;
|
||||||
pmenu->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p + 1);
|
pmenu->attach (*Gtk::manage(resetdefaultprof = new Gtk::MenuItem (M("FILEBROWSER_RESETDEFAULTPROFILE"))), 0, 1, p, p + 1);
|
||||||
p++;
|
p++;
|
||||||
pmenu->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1);
|
pmenu->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1);
|
||||||
p++;
|
p++;
|
||||||
@@ -427,7 +427,7 @@ FileBrowser::FileBrowser ()
|
|||||||
partpasteprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), partpasteprof));
|
partpasteprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), partpasteprof));
|
||||||
applyprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applyprof));
|
applyprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applyprof));
|
||||||
applypartprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applypartprof));
|
applypartprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applypartprof));
|
||||||
execcustprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), execcustprof));
|
resetdefaultprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), resetdefaultprof));
|
||||||
clearprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), clearprof));
|
clearprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), clearprof));
|
||||||
cachemenu->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), cachemenu));
|
cachemenu->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), cachemenu));
|
||||||
|
|
||||||
@@ -960,7 +960,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
queue_draw ();
|
queue_draw ();
|
||||||
} else if (m == execcustprof) {
|
} else if (m == resetdefaultprof) {
|
||||||
if (!mselected.empty() && bppcl) {
|
if (!mselected.empty() && bppcl) {
|
||||||
bppcl->beginBatchPParamsChange(mselected.size());
|
bppcl->beginBatchPParamsChange(mselected.size());
|
||||||
}
|
}
|
||||||
|
@@ -110,7 +110,7 @@ protected:
|
|||||||
Gtk::MenuItem* partpasteprof;
|
Gtk::MenuItem* partpasteprof;
|
||||||
Gtk::MenuItem* applyprof;
|
Gtk::MenuItem* applyprof;
|
||||||
Gtk::MenuItem* applypartprof;
|
Gtk::MenuItem* applypartprof;
|
||||||
Gtk::MenuItem* execcustprof;
|
Gtk::MenuItem* resetdefaultprof;
|
||||||
Gtk::MenuItem* clearprof;
|
Gtk::MenuItem* clearprof;
|
||||||
Gtk::MenuItem* cachemenu;
|
Gtk::MenuItem* cachemenu;
|
||||||
Gtk::MenuItem* clearFromCache;
|
Gtk::MenuItem* clearFromCache;
|
||||||
|
@@ -198,14 +198,13 @@ const ProcParams& Thumbnail::getProcParamsU ()
|
|||||||
* The loaded profile may be partial, but it return a complete ProcParams (i.e. without ParamsEdited)
|
* The loaded profile may be partial, but it return a complete ProcParams (i.e. without ParamsEdited)
|
||||||
*
|
*
|
||||||
* @param returnParams Ask to return a pointer to a ProcParams object if true
|
* @param returnParams Ask to return a pointer to a ProcParams object if true
|
||||||
* @param forceCPB True if the Custom Profile Builder has to be invoked, False if the CPB has to be invoked if the profile doesn't
|
* @param force True if the profile has to be re-generated even if it already exists
|
||||||
* exist yet. It depends on other conditions too
|
|
||||||
* @param flaggingMode True if the ProcParams will be created because the file browser is being flagging an image
|
* @param flaggingMode True if the ProcParams will be created because the file browser is being flagging an image
|
||||||
* (rang, to trash, color labels). This parameter is passed to the CPB.
|
* (rang, to trash, color labels). This parameter is passed to the CPB.
|
||||||
*
|
*
|
||||||
* @return Return a pointer to a ProcPamas structure to be updated if returnParams is true and if everything went fine, NULL otherwise.
|
* @return Return a pointer to a ProcPamas structure to be updated if returnParams is true and if everything went fine, NULL otherwise.
|
||||||
*/
|
*/
|
||||||
rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool forceCPB, bool flaggingMode)
|
rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool force, bool flaggingMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
static int index = 0; // Will act as unique identifier during the session
|
static int index = 0; // Will act as unique identifier during the session
|
||||||
@@ -217,7 +216,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
|
|||||||
|
|
||||||
const CacheImageData* cfs = getCacheImageData();
|
const CacheImageData* cfs = getCacheImageData();
|
||||||
Glib::ustring defaultPparamsPath = options.findProfilePath(defProf);
|
Glib::ustring defaultPparamsPath = options.findProfilePath(defProf);
|
||||||
const bool create = (!hasProcParams() || forceCPB);
|
const bool create = (!hasProcParams() || force);
|
||||||
|
|
||||||
const Glib::ustring outFName =
|
const Glib::ustring outFName =
|
||||||
(options.paramsLoadLocation == PLL_Input) ?
|
(options.paramsLoadLocation == PLL_Input) ?
|
||||||
@@ -239,6 +238,11 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
loadProcParams();
|
loadProcParams();
|
||||||
}
|
}
|
||||||
|
} else if (create && defProf != DEFPROFILE_DYNAMIC) {
|
||||||
|
const PartialProfile *p = profileStore.getProfile(defProf);
|
||||||
|
if (p && !p->pparams->save(outFName)) {
|
||||||
|
loadProcParams();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.CPBPath.empty() && !defaultPparamsPath.empty() && create && cfs && cfs->exifValid) {
|
if (!options.CPBPath.empty() && !defaultPparamsPath.empty() && create && cfs && cfs->exifValid) {
|
||||||
|
@@ -87,7 +87,7 @@ public:
|
|||||||
const rtengine::procparams::ProcParams& getProcParamsU (); // Unprotected version
|
const rtengine::procparams::ProcParams& getProcParamsU (); // Unprotected version
|
||||||
|
|
||||||
// Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel)
|
// Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel)
|
||||||
rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool forceCPB, bool flaggingMode = false);
|
rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool force, bool flaggingMode = false);
|
||||||
|
|
||||||
void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true);
|
void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true);
|
||||||
void clearProcParams (int whoClearedIt = -1);
|
void clearProcParams (int whoClearedIt = -1);
|
||||||
|
Reference in New Issue
Block a user