Disallow adding new categories under feeds. It's not really useful ;-)
authorPaweł Paprota <ppawel@fastmail.fm>
Sun, 16 Mar 2008 13:25:31 +0000 (16 14:25 +0100)
committerPaweł Paprota <ppawel@fastmail.fm>
Sun, 20 Apr 2008 16:45:48 +0000 (20 18:45 +0200)
straw/FeedListView.py

index 3b04c2a..6f30140 100644 (file)
@@ -487,8 +487,13 @@ class FeedsView(MVP.WidgetView):
             logging.exception(te)
 
     def on_menu_add_child_activate(self, *args):
-        self.begin_add_category(self.node_at_popup.node)
-    
+        node = self.node_at_popup.node
+
+        if not self.node_at_popup.node.is_parent():
+            node = node.parent
+
+        self.begin_add_category(node)
+
     def begin_add_category(self, node):
         category = Category()
         category.parent = node