diff --git a/rtdata/options/options.lin b/rtdata/options/options.lin index 54b5a2c01..02016e9e4 100644 --- a/rtdata/options/options.lin +++ b/rtdata/options/options.lin @@ -41,6 +41,9 @@ RenameUseTemplates=false ThumbnailZoomRatios=0.2;0.3;0.45;0.6;0.8;1; OverlayedFileNames=true +# if TRUE, only fast, internal preview images are taken if the image is not edited yet +InternalThumbIfUntouched=true + [Clipping Indication] HighlightThreshold=253 ShadowThreshold=8 @@ -57,6 +60,8 @@ PathTemplate=%p1/converted/%f PathFolder= UsePathTemplate=true LastSaveAsPath= + +# if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. OverwriteOutputFile=false [Profiles] diff --git a/rtdata/options/options.osx b/rtdata/options/options.osx index 1793efe78..f05215ae6 100644 --- a/rtdata/options/options.osx +++ b/rtdata/options/options.osx @@ -41,6 +41,9 @@ RenameUseTemplates=false ThumbnailZoomRatios=0.2;0.3;0.45;0.6;0.8;1; OverlayedFileNames=true +# if TRUE, only fast, internal preview images are taken if the image is not edited yet +InternalThumbIfUntouched=true + [Clipping Indication] HighlightThreshold=253 ShadowThreshold=8 @@ -57,6 +60,8 @@ PathTemplate=%p1/converted/%f PathFolder= UsePathTemplate=true LastSaveAsPath= + +# if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. OverwriteOutputFile=false [Profiles] diff --git a/rtdata/options/options.win b/rtdata/options/options.win index 519c5bdd3..8834ed124 100644 --- a/rtdata/options/options.win +++ b/rtdata/options/options.win @@ -41,6 +41,9 @@ RenameUseTemplates=false ThumbnailZoomRatios=0.2;0.3;0.45;0.6;0.8;1; OverlayedFileNames=true +# if TRUE, only fast, internal preview images are taken if the image is not edited yet +InternalThumbIfUntouched=true + [Clipping Indication] HighlightThreshold=253 ShadowThreshold=8 @@ -57,6 +60,8 @@ PathTemplate=%p1/converted/%f PathFolder= UsePathTemplate=true LastSaveAsPath= + +# if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. OverwriteOutputFile=false [Profiles] diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index 68a5f9765..b31d6b454 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -83,7 +83,7 @@ void FileBrowserEntry::refreshThumbnailImage () { void FileBrowserEntry::refreshQuickThumbnailImage () { // Only make a (slow) processed preview if the picture has been edited at all if ( thumbnail && - thumbnail->isQuick() && thumbnail->isPParamsValid() ) + thumbnail->isQuick() && (!options.internalThumbIfUntouched || thumbnail->isPParamsValid()) ) { thumbImageUpdater->add(thumbnail, thumbnail->getProcParams(), preh, &updatepriority, true, this); } diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 4d15839f6..26866cee4 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -939,28 +939,3 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) { return false; } - -#if 0 -void PreviewMultiLoader::setPreviewLoaderListener (PreviewLoaderListener* p) { - loadA.setPreviewLoaderListener(p); loadB.setPreviewLoaderListener(p); -} - -// Simple round robin -void PreviewMultiLoader::add(DirEntry de) { - if (next==0) { - loadA.add(de); - next=1; - } else { - loadB.add(de); - next=0; - } -} - -void PreviewMultiLoader::start () { loadA.start(); loadB.start(); } -void PreviewMultiLoader::process () { loadA.process (); loadB.process(); } -void PreviewMultiLoader::remove (Glib::ustring fname) { loadA.remove(fname); loadB.remove(fname); } -void PreviewMultiLoader::end () { loadA.end(); loadB.end(); } -bool PreviewMultiLoader::runs () { return loadA.runs() || loadB.runs(); } -void PreviewMultiLoader::terminate () { loadA.terminate(); loadB.terminate(); } -void PreviewMultiLoader::stop () { loadA.stop(); loadB.stop(); } -#endif diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index 9d509a301..85e669c23 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -47,47 +47,6 @@ class DirEntry { } }; -#if 0 -class PreviewLoader : public ProcessingThread { - - protected: - PreviewLoaderListener* pl; - - public: - PreviewLoader () : pl(NULL) { ProcessingThread(); } - void setPreviewLoaderListener (PreviewLoaderListener* p) { pl = p; } - void start (); - void process () { ProcessingThread::process (); } - void process (DirEntry& current); - void remove (Glib::ustring fname); - void end (); -}; - -// Simple Multithreader: Harnesses two normal loader threads feeded by a round robin -// Same interface as a normal PreviewLoader to minimize effects on code -class PreviewMultiLoader { -protected: - PreviewLoader loadA,loadB; - int next; - -public: - PreviewMultiLoader () { next=0; } - - void setPreviewLoaderListener (PreviewLoaderListener* p); - - void add (DirEntry de); - - void start (); - void process (); - void remove (Glib::ustring fname); - void end (); - - bool runs (); - void terminate (); - void stop (); -}; -#endif - class FileCatalog : public Gtk::VBox, public DirSelectionListener, public PreviewLoaderListener, diff --git a/rtgui/options.cc b/rtgui/options.cc index 9a52d6d45..18ca9af0f 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -241,6 +241,7 @@ if (keyFile.has_group ("File Browser")) { if (keyFile.has_key ("File Browser", "ThumbnailZoomRatios"))thumbnailZoomRatios= keyFile.get_double_list ("File Browser", "ThumbnailZoomRatios"); if (keyFile.has_key ("File Browser", "OverlayedFileNames")) overlayedFileNames = keyFile.get_boolean ("File Browser", "OverlayedFileNames"); if (keyFile.has_key ("File Browser", "ShowFileNames")) showFileNames = keyFile.get_boolean ("File Browser", "ShowFileNames"); + if (keyFile.has_key ("File Browser", "InternalThumbIfUntouched")) internalThumbIfUntouched = keyFile.get_boolean ("File Browser", "InternalThumbIfUntouched"); } if (keyFile.has_group ("Clipping Indication")) { @@ -359,7 +360,8 @@ int Options::saveToFile (Glib::ustring fname) { keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); - + keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); + keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); diff --git a/rtgui/options.h b/rtgui/options.h index 3b313c6f9..c56475948 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -123,8 +123,9 @@ class Options { std::vector favoriteDirs; std::vector renameTemplates; bool renameUseTemplates; - bool overwriteOutputFile; - + bool internalThumbIfUntouched; + bool overwriteOutputFile; + std::vector thumbnailZoomRatios; bool overlayedFileNames; bool showFileNames;