]> git.gag.com Git - debian/gnuradio/commitdiff
Fix for custom category paths.
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 2 May 2009 07:55:12 +0000 (07:55 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 2 May 2009 07:55:12 +0000 (07:55 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10946 221aa14e-8319-0410-a670-987f0aec2ac5

grc/src/gui/BlockTreeWindow.py

index 9e4bec3f9ae7d84f9ac26f3fc108954c3e070949..ed69ef5b9dd0b92ef867705a5ada83c4790e538a 100644 (file)
@@ -80,10 +80,11 @@ class BlockTreeWindow(gtk.VBox):
                """
                Add a block with category to this selection window.
                Add only the category when block is None.
-               @param category the category list
+               @param category the category list or path string
                @param block the block object or None
                """
-               category = tuple(category)[1:] #tuple is hashable
+               if isinstance(category, str): category = category.split('/')
+               category = tuple(filter(lambda x: x, category)) #tuple is hashable
                #add category and all sub categories
                for i, cat_name in enumerate(category):
                        sub_category = category[:i+1]