[alacarte] MenuEditor: Support separators



commit 2d50f3c3b55e96b23a30f93b7920ea413b1becc2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jun 20 15:06:06 2012 -0400

    MenuEditor: Support separators

 Alacarte/MenuEditor.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index a6fc152..d2634a0 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -118,6 +118,7 @@ class MenuEditor(object):
         item_type = item_iter.next()
 
         while item_type != GMenu.TreeItemType.INVALID:
+            item = None
             if item_type == GMenu.TreeItemType.DIRECTORY:
                 item = item_iter.get_directory()
             elif item_type == GMenu.TreeItemType.ENTRY:
@@ -126,6 +127,8 @@ class MenuEditor(object):
                 item = item_iter.get_header()
             elif item_type == GMenu.TreeItemType.ALIAS:
                 item = item_iter.get_alias()
+            elif item_type == GMenu.TreeItemType.SEPARATOR:
+                item = item_iter.get_separator()
             if item:
                 contents.append(item)
             item_type = item_iter.next()



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