[alacarte] MenuEditor: Fix creating submenus



commit bcabaee66439b4f7c7f0b44443f5d50d5b646218
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jun 1 02:11:54 2012 -0400

    MenuEditor: Fix creating submenus

 Alacarte/MenuEditor.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index a20e615..73d25f5 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -332,7 +332,10 @@ class MenuEditor(object):
         self.addXmlLayout(menu_xml, layout, dom)
         self.save()
 
-    def findMenu(self, menu_id, parent):
+    def findMenu(self, menu_id, parent=None):
+        if parent is None:
+            parent = self.applications.tree.get_root_directory()
+
         if menu_id == parent.get_menu_id():
             return parent
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]