Skip to content

Commit

Permalink
also search in optional package
Browse files Browse the repository at this point in the history
  • Loading branch information
gijzelaerr committed Feb 4, 2014
1 parent 95877d7 commit a5b55d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Kittens/pixmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3014,8 +3014,11 @@ def icon (self):

__icons_loaded = False;

def load_icons (appname):
"""load all icons found in path, subdirs 'icons/appname'""";
def load_icons (appname, package=""):
"""
load all icons found in path, subdirs '<package>/icons/<appname>'.
Package is optional.
""";
# loop over system path
global __icons_loaded;
if __icons_loaded:
Expand All @@ -3024,7 +3027,7 @@ def load_icons (appname):
for path in icon_paths:
path = path or '.';
# for each entry, try <entry>/icons/<appname>'
trydir = os.path.join(path,'icons',appname);
trydir = os.path.join(path,package,'icons',appname);
_dprint(3,'trying icon path',trydir);
try: files = os.listdir(trydir);
except: continue;
Expand Down

0 comments on commit a5b55d2

Please sign in to comment.