summaryrefslogtreecommitdiff
path: root/Mozo/MainWindow.py
diff options
context:
space:
mode:
authorgm10 <[email protected]>2019-08-11 17:08:21 +0200
committerraveit65 <[email protected]>2019-09-12 17:53:08 +0200
commitea123567792eba65a0fafdd03e8dfb660ff389ad (patch)
treeee6246a8321dc491821119708d88dbf9e0901d5f /Mozo/MainWindow.py
parentbf2767f66437fb7d9f2c21fd9a3d1f9fa15f8bf8 (diff)
downloadmozo-ea123567792eba65a0fafdd03e8dfb660ff389ad.tar.bz2
mozo-ea123567792eba65a0fafdd03e8dfb660ff389ad.tar.xz
Add Undo and Redo buttons
Diffstat (limited to 'Mozo/MainWindow.py')
-rw-r--r--Mozo/MainWindow.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Mozo/MainWindow.py b/Mozo/MainWindow.py
index 19635f5..23db1bd 100644
--- a/Mozo/MainWindow.py
+++ b/Mozo/MainWindow.py
@@ -53,11 +53,12 @@ class MainWindow:
def __init__(self, datadir, version, argv):
self.file_path = datadir
self.version = version
- self.editor = MenuEditor()
Gtk.Window.set_default_icon_name('mozo')
self.tree = Gtk.Builder()
self.tree.set_translation_domain(GETTEXT_PACKAGE)
self.tree.add_from_file(os.path.join(self.file_path, 'mozo.ui'))
+ self.editor = MenuEditor(undo_button=self.tree.get_object('undo_button'),
+ redo_button=self.tree.get_object('redo_button'))
self.tree.connect_signals(self)
self.setupMenuTree()
self.setupItemTree()
@@ -617,13 +618,13 @@ class MainWindow:
elif isinstance(item, MateMenu.TreeSeparator):
self.editor.moveSeparator(item, item.get_parent(), after=after)
- def on_mainwindow_undo(self, accelgroup, window, keyval, modifier):
+ def on_mainwindow_undo(self, *_args):
self.editor.undo()
- def on_mainwindow_redo(self, accelgroup, window, keyval, modifier):
+ def on_mainwindow_redo(self, *_args):
self.editor.redo()
- def on_help_button_clicked(self, *args):
+ def on_help_button_clicked(self, *_args):
Gtk.show_uri(Gdk.Screen.get_default(), "help:mate-user-guide/menu-editor", Gtk.get_current_event_time())
def on_revert_button_clicked(self, button):