[Xfce4-commits] [apps/catfish] 01/01: Only generate new thumbnails if the thumbnail preview mode is active (bug #14689)
noreply at xfce.org
noreply at xfce.org
Sun Jan 20 14:15:15 CET 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/catfish.
commit 6dfb3d93b78f03d98a721525dab8fea23229e387
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Jan 20 08:15:08 2019 -0500
Only generate new thumbnails if the thumbnail preview mode is active (bug #14689)
---
catfish/CatfishWindow.py | 2 +-
catfish_lib/Thumbnailer.py | 5 ++++-
po/catfish.pot | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/catfish/CatfishWindow.py b/catfish/CatfishWindow.py
index a22022f..873b020 100644
--- a/catfish/CatfishWindow.py
+++ b/catfish/CatfishWindow.py
@@ -1531,7 +1531,7 @@ class CatfishWindow(Window):
def get_thumbnail(self, path, mime_type=None):
"""Try to fetch a thumbnail."""
- thumb = self.thumbnailer.get_thumbnail(path, mime_type)
+ thumb = self.thumbnailer.get_thumbnail(path, mime_type, self.show_thumbnail)
if thumb:
return thumb
return self.get_file_icon(path, mime_type)
diff --git a/catfish_lib/Thumbnailer.py b/catfish_lib/Thumbnailer.py
index b09bdd1..912a05a 100644
--- a/catfish_lib/Thumbnailer.py
+++ b/catfish_lib/Thumbnailer.py
@@ -207,7 +207,7 @@ class Thumbnailer:
print("Exception: ", e)
return False
- def get_thumbnail(self, filename, mime_type = None):
+ def get_thumbnail(self, filename, mime_type = None, buildit = True):
thumb = self._get_normal_filename(filename)
if os.path.exists(thumb):
return thumb
@@ -232,6 +232,9 @@ class Thumbnailer:
else:
return False
+ if not buildit:
+ return False
+
normal = self._get_normal_filename(filename)
if self._create_thumbnail(filename, normal):
return normal
diff --git a/po/catfish.pot b/po/catfish.pot
index bd33072..7af22c0 100644
--- a/po/catfish.pot
+++ b/po/catfish.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-01-20 07:24-0500\n"
+"POT-Creation-Date: 2019-01-20 08:11-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list