[shotwell] Only fall-back to resource if not found



commit 38ef40caddf0c5c4b8197c2d15e51f3666f6c35b
Author: Jens Georg <mail jensge org>
Date:   Fri Feb 22 11:53:29 2019 +0100

    Only fall-back to resource if not found

 src/Resources.vala | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/Resources.vala b/src/Resources.vala
index 669f2852..689b4da3 100644
--- a/src/Resources.vala
+++ b/src/Resources.vala
@@ -1051,11 +1051,13 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
             debug("Failed to find icon %s in theme, falling back to resources", name);
         }
 
-        try {
-            var path = "/org/gnome/Shotwell/icons/%s".printf(name);
-            pixbuf = new Gdk.Pixbuf.from_resource(path);
-        } catch (Error err) {
-            critical("Unable to load icon %s: %s", name, err.message);
+        if (pixbuf == null) {
+            try {
+                var path = "/org/gnome/Shotwell/icons/%s".printf(name);
+                pixbuf = new Gdk.Pixbuf.from_resource(path);
+            } catch (Error err) {
+                critical("Unable to load icon %s: %s", name, err.message);
+            }
         }
 
         if (pixbuf == null)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]