summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 8f4f7cdf04..9aa6fdf815 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -582,6 +582,7 @@ class ImageSelectionDialog (gtk.Dialog):
582 582
583 self.image_folder = image_folder 583 self.image_folder = image_folder
584 self.image_types = image_types 584 self.image_types = image_types
585 self.image_list = []
585 self.image_names = [] 586 self.image_names = []
586 587
587 # create visual elements on the dialog 588 # create visual elements on the dialog
@@ -645,13 +646,17 @@ class ImageSelectionDialog (gtk.Dialog):
645 dialog.destroy() 646 dialog.destroy()
646 647
647 def fill_image_store(self): 648 def fill_image_store(self):
649 self.image_list = []
648 self.image_store.clear() 650 self.image_store.clear()
649 imageset = set() 651 imageset = set()
650 for root, dirs, files in os.walk(self.image_folder): 652 for root, dirs, files in os.walk(self.image_folder):
653 # ignore the sub directories
654 dirs[:] = []
651 for f in files: 655 for f in files:
652 for image_type in self.image_types: 656 for image_type in self.image_types:
653 if f.endswith('.' + image_type): 657 if f.endswith('.' + image_type):
654 imageset.add(f.rsplit('.' + image_type)[0]) 658 imageset.add(f.rsplit('.' + image_type)[0])
659 self.image_list.append(f)
655 660
656 for image in imageset: 661 for image in imageset:
657 self.image_store.set(self.image_store.append(), 0, image, 1, False) 662 self.image_store.set(self.image_store.append(), 0, image, 1, False)
@@ -665,9 +670,8 @@ class ImageSelectionDialog (gtk.Dialog):
665 while iter: 670 while iter:
666 path = self.image_store.get_path(iter) 671 path = self.image_store.get_path(iter)
667 if self.image_store[path][1]: 672 if self.image_store[path][1]:
668 for root, dirs, files in os.walk(self.image_folder): 673 for f in self.image_list:
669 for f in files: 674 if f.startswith(self.image_store[path][0] + '.'):
670 if f.startswith(self.image_store[path][0] + '.'): 675 self.image_names.append(f)
671 self.image_names.append(f)
672 break 676 break
673 iter = self.image_store.iter_next(iter) 677 iter = self.image_store.iter_next(iter)