Fast preview thumbnail is configurable now
This commit is contained in:
@@ -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]
|
||||
|
@@ -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]
|
||||
|
@@ -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]
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -47,47 +47,6 @@ class DirEntry {
|
||||
}
|
||||
};
|
||||
|
||||
#if 0
|
||||
class PreviewLoader : public ProcessingThread<DirEntry> {
|
||||
|
||||
protected:
|
||||
PreviewLoaderListener* pl;
|
||||
|
||||
public:
|
||||
PreviewLoader () : pl(NULL) { ProcessingThread<DirEntry>(); }
|
||||
void setPreviewLoaderListener (PreviewLoaderListener* p) { pl = p; }
|
||||
void start ();
|
||||
void process () { ProcessingThread<DirEntry>::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,
|
||||
|
@@ -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);
|
||||
|
@@ -123,8 +123,9 @@ class Options {
|
||||
std::vector<Glib::ustring> favoriteDirs;
|
||||
std::vector<Glib::ustring> renameTemplates;
|
||||
bool renameUseTemplates;
|
||||
bool overwriteOutputFile;
|
||||
|
||||
bool internalThumbIfUntouched;
|
||||
bool overwriteOutputFile;
|
||||
|
||||
std::vector<double> thumbnailZoomRatios;
|
||||
bool overlayedFileNames;
|
||||
bool showFileNames;
|
||||
|
Reference in New Issue
Block a user