[alacarte] Rename the "Revert" button
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alacarte] Rename the "Revert" button
- Date: Tue, 17 Jul 2012 00:26:55 +0000 (UTC)
commit 6517d363de24299b5472ba43d0af7396fcb9e086
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Jul 15 22:14:32 2012 -0400
Rename the "Revert" button
"Revert" is not an appropriate name for this button, as it deletes
all custom additions and modifications to the menu system. "Restore
System Configuration" is a better name.
Alacarte/MainWindow.py | 4 ++--
Alacarte/MenuEditor.py | 16 ++++++++--------
data/alacarte.ui | 8 ++++----
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index 1b71df8..6c06366 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -438,12 +438,12 @@ class MainWindow(object):
def on_help_button_clicked(self, *args):
Gtk.show_uri(Gdk.Screen.get_default(), "ghelp:user-guide#menu-editor", Gtk.get_current_event_time())
- def on_revert_button_clicked(self, button):
+ def on_restore_button_clicked(self, button):
dialog = self.tree.get_object('revertdialog')
dialog.set_transient_for(self.tree.get_object('mainwindow'))
dialog.show_all()
if dialog.run() == Gtk.ResponseType.YES:
- self.editor.revert()
+ self.editor.restoreToSystem()
dialog.hide()
def on_close_button_clicked(self, button):
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index 6628150..0e4b2c4 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -52,8 +52,8 @@ class MenuEditor(object):
fd.write(self.dom.toprettyxml())
fd.close()
- def revert(self):
- self.revertTree(self.tree.get_root_directory())
+ def restoreToSystem(self):
+ self.restoreTree(self.tree.get_root_directory())
path = os.path.join(util.getUserMenuPath(), os.path.basename(self.tree.get_canonical_menu_path()))
try:
os.unlink(path)
@@ -63,20 +63,20 @@ class MenuEditor(object):
self.loadDOM()
self.save()
- def revertTree(self, menu):
+ def restoreTree(self, menu):
item_iter = menu.iter()
item_type = item_iter.next()
while item_type != GMenu.TreeItemType.INVALID:
if item_type == GMenu.TreeItemType.DIRECTORY:
item = item_iter.get_directory()
- self.revertTree(item)
+ self.restoreTree(item)
elif item_type == GMenu.TreeItemType.ENTRY:
item = item_iter.get_entry()
- self.revertItem(item)
+ self.restoreItem(item)
item_type = item_iter.next()
- self.revertMenu(menu)
+ self.restoreMenu(menu)
- def revertItem(self, item):
+ def restoreItem(self, item):
if not self.canRevert(item):
return
try:
@@ -85,7 +85,7 @@ class MenuEditor(object):
pass
self.save()
- def revertMenu(self, menu):
+ def restoreMenu(self, menu):
if not self.canRevert(menu):
return
#wtf happened here? oh well, just bail
diff --git a/data/alacarte.ui b/data/alacarte.ui
index 4c29740..a87d932 100644
--- a/data/alacarte.ui
+++ b/data/alacarte.ui
@@ -80,16 +80,16 @@
</object>
</child>
<child>
- <object class="GtkButton" id="revert_button">
+ <object class="GtkButton" id="restore_button">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Restore the default menu layout</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="label">gtk-revert-to-saved</property>
+ <property name="label" translatable="yes">Restore System Configuration</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal handler="on_revert_button_clicked" name="clicked"/>
+ <signal handler="on_restore_button_clicked" name="clicked"/>
</object>
</child>
<child>
@@ -393,7 +393,7 @@
</child>
<action-widgets>
<action-widget response="-11">help_button</action-widget>
- <action-widget response="0">revert_button</action-widget>
+ <action-widget response="0">restore_button</action-widget>
<action-widget response="-7">close_button</action-widget>
</action-widgets>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]