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



commit 0137a079a034aedb2912c7c2aa8d5033dcf924d4
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 2ccd6782..801305ce 100644
--- a/src/Resources.vala
+++ b/src/Resources.vala
@@ -1038,11 +1038,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]