From fd57feed5b81f1c52e9a90466cc17236ed017d27 Mon Sep 17 00:00:00 2001 From: espectador Date: Sat, 16 Jan 2010 05:22:02 +0000 Subject: [PATCH] Fixed bug #28580 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29292 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSImage.m | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3e5124c8b..524e2d5de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-01-15 German Arias + + * Source/NSImage.m: Changes to fix bug #28580. + 2010-01-15 13:08-EST Gregory John Casamento * Headers/Additions/GNUstepGUI/GSTheme.h: Added method to call diff --git a/Source/NSImage.m b/Source/NSImage.m index b9f4ebb70..40d98053c 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -267,6 +267,26 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep) } } + /* Second search on theme bundle */ + if (!path) + { + if (ext) + path = [[[GSTheme theme] bundle] pathForResource: realName ofType: ext]; + else + { + id o, e; + + e = [array objectEnumerator]; + while ((o = [e nextObject])) + { + path = [[[GSTheme theme] bundle] pathForResource: realName + ofType: o]; + if (path != nil && [path length] != 0) + break; + } + } + } + /* If not found then search in system */ if (!path) {