[alacarte] MainWindow: Remove "Restore" menu item from Edit



commit 81ec64be35c11b4c29b5ae472c7d91816a53b164
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Jul 15 22:12:15 2012 -0400

    MainWindow: Remove "Restore" menu item from Edit

 Alacarte/MainWindow.py |   16 ----------------
 data/alacarte.ui       |   10 ----------
 2 files changed, 0 insertions(+), 26 deletions(-)
---
diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index d407633..1b71df8 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -49,7 +49,6 @@ class MainWindow(object):
         self.setupMenuTree()
         self.setupItemTree()
         self.tree.get_object('edit_delete').set_sensitive(False)
-        self.tree.get_object('edit_revert_to_original').set_sensitive(False)
         self.tree.get_object('edit_properties').set_sensitive(False)
         self.tree.get_object('move_up_button').set_sensitive(False)
         self.tree.get_object('move_down_button').set_sensitive(False)
@@ -302,17 +301,6 @@ class MainWindow(object):
         elif isinstance(item, GMenu.TreeSeparator):
             self.editor.deleteSeparator(item)
 
-    def on_edit_revert_to_original_activate(self, menu):
-        item_tree = self.tree.get_object('item_tree')
-        items, iter = item_tree.get_selection().get_selected()
-        if not iter:
-            return
-        item = items[iter][3]
-        if isinstance(item, GMenu.TreeEntry):
-            self.editor.revertItem(item)
-        elif isinstance(item, GMenu.TreeDirectory):
-            self.editor.revertMenu(item)
-
     def on_edit_properties_activate(self, menu):
         item_tree = self.tree.get_object('item_tree')
         items, iter = item_tree.get_selection().get_selected()
@@ -350,7 +338,6 @@ class MainWindow(object):
         item_tree.get_selection().unselect_all()
         self.loadItems(self.menu_store[menu_path][2])
         self.tree.get_object('edit_delete').set_sensitive(False)
-        self.tree.get_object('edit_revert_to_original').set_sensitive(False)
         self.tree.get_object('edit_properties').set_sensitive(False)
         self.tree.get_object('move_up_button').set_sensitive(False)
         self.tree.get_object('move_down_button').set_sensitive(False)
@@ -381,9 +368,6 @@ class MainWindow(object):
         self.tree.get_object('new_separator_button').set_sensitive(True)
         self.tree.get_object('delete_button').set_sensitive(True)
 
-        can_revert = self.editor.canRevert(item)
-        self.tree.get_object('edit_revert_to_original').set_sensitive(can_revert)
-
         can_edit = not isinstance(item, GMenu.TreeSeparator)
         self.tree.get_object('edit_properties').set_sensitive(can_edit)
         self.tree.get_object('properties_button').set_sensitive(can_edit)
diff --git a/data/alacarte.ui b/data/alacarte.ui
index 7a9ff15..4c29740 100644
--- a/data/alacarte.ui
+++ b/data/alacarte.ui
@@ -12,14 +12,6 @@
           </object>
         </child>
         <child>
-          <object class="GtkAction" id="edit_revert_to_original">
-            <property name="stock_id">gtk-revert-to-saved</property>
-            <property name="name">edit_revert_to_original</property>
-            <property name="label" translatable="yes">_Revert to Original</property>
-            <signal handler="on_edit_revert_to_original_activate" name="activate"/>
-          </object>
-        </child>
-        <child>
           <object class="GtkAction" id="edit_delete">
             <property name="stock_id">gtk-delete</property>
             <property name="name">edit_delete</property>
@@ -31,8 +23,6 @@
     <ui>
       <popup name="edit_menu">
         <menuitem action="edit_properties"/>
-        <menuitem action="edit_revert_to_original"/>
-        <separator/>
         <menuitem action="edit_delete"/>
       </popup>
     </ui>



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