Custom profiler builder in partial pastes and context menu
see issue 941
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
#00 Deutsch
|
||||
#01 (keenonkites; Aktualisierte Version für 2.3 beta2)
|
||||
#02 (phberlin; basiert auf keenonkites' Erstübersetzung)
|
||||
@@ -16,6 +15,7 @@
|
||||
#14 05.12.2010, 3.0 alpha: Erweiterung und Korrekturen (Metex)
|
||||
#15 Jan-Jul 2011: Erweiterungen und Korrekturen (MaWe). Letzter Stand: 26.07.2011
|
||||
#16 Erweiterung (oduis)
|
||||
#17 Erweiterung (oduis)
|
||||
ABOUT_TAB_BUILD;Version
|
||||
ABOUT_TAB_CREDITS;Danksagungen
|
||||
ABOUT_TAB_LICENSE;Lizenz
|
||||
@@ -87,6 +87,7 @@ FILEBROWSER_DELETEDLGLABEL;Dateien löschen
|
||||
FILEBROWSER_DELETEDLGMSG;Möchten Sie wirklich %1 Datei(en) unwiderruflich löschen?
|
||||
FILEBROWSER_DELETEDLGMSGINCLPROC;Möchten Sie wirklich %1 Datei(en) unwiderruflich löschen, SAMT evtl. zugehörigen, aus der Stapelverarbeitung resultierenden Ausgabedateien?
|
||||
FILEBROWSER_EMPTYTRASH;Papierkorb leeren
|
||||
FILEBROWSER_EXEC_CPB;Benutzerdef. Bildprofilgenerator ausführen
|
||||
FILEBROWSER_EMPTYTRASHHINT;Dateien endgültig aus Papierkorb löschen
|
||||
FILEBROWSER_EXIFFILTERAPPLY;Anwenden
|
||||
FILEBROWSER_EXIFFILTERAPPLYHINT;Ein-/Ausschalten des Exif Filters im Datei-Browser
|
||||
|
@@ -75,6 +75,7 @@ FILEBROWSER_DELETEDLGMSG;Are you sure you want to delete the selected %1 files?
|
||||
FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files INCLUDING a Queue processed version?
|
||||
FILEBROWSER_EMPTYTRASH;Empty Trash
|
||||
FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files of the trash
|
||||
FILEBROWSER_EXEC_CPB;Run custom profile builder
|
||||
FILEBROWSER_EXIFFILTERAPPLY;Apply
|
||||
FILEBROWSER_EXIFFILTERAPPLYHINT;Switch on/off exif filter of the file browser
|
||||
FILEBROWSER_EXIFFILTERLABEL;Exif Filter
|
||||
|
@@ -397,7 +397,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
||||
is->setProgressListener( this );
|
||||
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
ProcParams* ldprof = openThm->createProcParamsForUpdate(); // will be freed by initProfile
|
||||
ProcParams* ldprof = openThm->createProcParamsForUpdate(true,false); // will be freed by initProfile
|
||||
|
||||
// initialize profile
|
||||
Glib::ustring defProf = openThm->getType()==FT_Raw ? options.defProfRaw : options.defProfImg;
|
||||
|
@@ -147,6 +147,7 @@ FileBrowser::FileBrowser ()
|
||||
submenuProfileOperations->attach (*Gtk::manage(partpasteprof = new Gtk::MenuItem (M("FILEBROWSER_PARTIALPASTEPROFILE"))), 0, 1, p, p+1); p++;
|
||||
submenuProfileOperations->attach (*Gtk::manage(applyprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE"))), 0, 1, p, p+1); p++;
|
||||
submenuProfileOperations->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p+1); p++;
|
||||
submenuProfileOperations->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p+1); p++;
|
||||
submenuProfileOperations->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p+1); p++;
|
||||
|
||||
submenuProfileOperations->show_all ();
|
||||
@@ -158,6 +159,7 @@ FileBrowser::FileBrowser ()
|
||||
pmenu->attach (*Gtk::manage(partpasteprof = new Gtk::MenuItem (M("FILEBROWSER_PARTIALPASTEPROFILE"))), 0, 1, p, p+1); p++;
|
||||
pmenu->attach (*Gtk::manage(applyprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE"))), 0, 1, p, p+1); p++;
|
||||
pmenu->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p+1); p++;
|
||||
pmenu->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p+1); p++;
|
||||
pmenu->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p+1); p++;
|
||||
}
|
||||
|
||||
@@ -204,6 +206,7 @@ FileBrowser::FileBrowser ()
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
}
|
||||
@@ -588,8 +591,15 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) {
|
||||
for (int i=0; i<mselected.size(); i++)
|
||||
mselected[i]->thumbnail->clearProcParams (FILEBROWSER);
|
||||
queue_draw ();
|
||||
} else if (m==execcustprof) {
|
||||
for (int i=0; i<mselected.size(); i++) {
|
||||
mselected[i]->thumbnail->createProcParamsForUpdate (false, true);
|
||||
|
||||
// Empty run to update the thumb
|
||||
rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams ();
|
||||
mselected[i]->thumbnail->setProcParams (params, FILEBROWSER);
|
||||
}
|
||||
else if (m==clearFromCache) {
|
||||
} else if (m==clearFromCache) {
|
||||
for (int i=0; i<mselected.size(); i++)
|
||||
tbl->clearFromCacheRequested (mselected, false);
|
||||
//queue_draw ();
|
||||
@@ -634,6 +644,7 @@ void FileBrowser::partPasteProfile () {
|
||||
if (partialPasteDlg.run ()) {
|
||||
|
||||
for (int i=0; i<mselected.size(); i++) {
|
||||
mselected[i]->thumbnail->createProcParamsForUpdate(false,false); // this can execute customprofilebuilder to generate param file
|
||||
rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams ();
|
||||
partialPasteDlg.applyPaste (¶ms, &clipboard.getProcParams());
|
||||
mselected[i]->thumbnail->setProcParams (params, FILEBROWSER);
|
||||
@@ -726,6 +737,8 @@ void FileBrowser::applyPartialMenuItemActivated (Glib::ustring ppname) {
|
||||
if (partialPasteDlg.run ()) {
|
||||
|
||||
for (int i=0; i<selected.size(); i++) {
|
||||
selected[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file
|
||||
|
||||
rtengine::procparams::ProcParams params = ((FileBrowserEntry*)selected[i])->thumbnail->getProcParams ();
|
||||
partialPasteDlg.applyPaste (¶ms, pparams);
|
||||
((FileBrowserEntry*)selected[i])->thumbnail->setProcParams (params, FILEBROWSER);
|
||||
@@ -825,7 +838,7 @@ void FileBrowser::toTrashRequested (std::vector<FileBrowserEntry*> tbe) {
|
||||
|
||||
for (int i=0; i<tbe.size(); i++) {
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
tbe[i]->thumbnail->createProcParamsForUpdate(); // this can execute customprofilebuilder to generate param file
|
||||
tbe[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file
|
||||
|
||||
// no need to notify listeners as item goes to trash, likely to be deleted
|
||||
|
||||
@@ -866,7 +879,7 @@ void FileBrowser::rankingRequested (std::vector<FileBrowserEntry*> tbe, int rank
|
||||
|
||||
for (int i=0; i<tbe.size(); i++) {
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
tbe[i]->thumbnail->createProcParamsForUpdate(); // this can execute customprofilebuilder to generate param file
|
||||
tbe[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file
|
||||
|
||||
// notify listeners TODO: should do this ONLY when params changed by customprofilebuilder?
|
||||
tbe[i]->thumbnail->notifylisterners_procParamsChanged(FILEBROWSER);
|
||||
@@ -885,7 +898,7 @@ void FileBrowser::colorlabelRequested (std::vector<FileBrowserEntry*> tbe, int c
|
||||
|
||||
for (int i=0; i<tbe.size(); i++) {
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
tbe[i]->thumbnail->createProcParamsForUpdate(); // this can execute customprofilebuilder to generate param file
|
||||
tbe[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file
|
||||
|
||||
// notify listeners TODO: should do this ONLY when params changed by customprofilebuilder?
|
||||
tbe[i]->thumbnail->notifylisterners_procParamsChanged(FILEBROWSER);
|
||||
|
@@ -87,6 +87,7 @@ class FileBrowser : public ThumbBrowserBase, public LWButtonListener {
|
||||
Gtk::MenuItem* partpasteprof;
|
||||
Gtk::MenuItem* applyprof;
|
||||
Gtk::MenuItem* applypartprof;
|
||||
Gtk::MenuItem* execcustprof;
|
||||
Gtk::MenuItem* clearprof;
|
||||
Gtk::MenuItem* cachemenu;
|
||||
Gtk::MenuItem* clearFromCache;
|
||||
|
@@ -47,7 +47,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa
|
||||
// rank and inTrash were found in cache (old style), move them over to pparams
|
||||
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
createProcParamsForUpdate(); // this can execute customprofilebuilder to generate param file
|
||||
createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file
|
||||
|
||||
// TODO? should we call notifylisterners_procParamsChanged here?
|
||||
|
||||
@@ -175,14 +175,14 @@ const ProcParams& Thumbnail::getProcParams () {
|
||||
}
|
||||
|
||||
// Create default params on demand and returns a new updatable object
|
||||
rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate() {
|
||||
rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool forceCPB) {
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
ProcParams* ldprof = NULL;
|
||||
|
||||
Glib::ustring defProf = getType()==FT_Raw ? options.defProfRaw : options.defProfImg;
|
||||
|
||||
const CacheImageData* cfs=getCacheImageData();
|
||||
if (!options.customProfileBuilder.empty() && !hasProcParams() && cfs && cfs->exifValid) {
|
||||
if (!options.customProfileBuilder.empty() && (!hasProcParams() || forceCPB) && cfs && cfs->exifValid) {
|
||||
// For the filename etc. do NOT use streams, since they are not UTF8 safe
|
||||
Glib::ustring cmdLine=Glib::ustring("\"") + options.customProfileBuilder + Glib::ustring("\" \"") + fname + Glib::ustring("\" \"")
|
||||
+ options.rtdir + Glib::ustring("/") + options.profilePath + Glib::ustring("/") + defProf + Glib::ustring(".pp3") + Glib::ustring("\" ");
|
||||
@@ -199,7 +199,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate() {
|
||||
if (success) loadProcParams();
|
||||
}
|
||||
|
||||
if (hasProcParams()) {
|
||||
if (returnParams && hasProcParams()) {
|
||||
ldprof = new ProcParams ();
|
||||
*ldprof = getProcParams ();
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ class Thumbnail {
|
||||
const rtengine::procparams::ProcParams& getProcParams ();
|
||||
|
||||
// Use this to create params on demand for update
|
||||
rtengine::procparams::ProcParams* createProcParamsForUpdate ();
|
||||
rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool forceCPB);
|
||||
|
||||
void setProcParams (const rtengine::procparams::ProcParams& pp, int whoChangedIt=-1, bool updateCacheNow=true);
|
||||
void clearProcParams (int whoClearedIt=-1);
|
||||
|
Reference in New Issue
Block a user