From 26d478b8732626c29a80347df66ebd1a520742be Mon Sep 17 00:00:00 2001 From: mbkma Date: Tue, 2 Mar 2021 19:28:51 +0100 Subject: rewrite mozo.ui from scratch --- Mozo/MainWindow.py | 8 +- data/mozo.ui | 1039 +++++++++++++++++++++++----------------------------- 2 files changed, 461 insertions(+), 586 deletions(-) diff --git a/Mozo/MainWindow.py b/Mozo/MainWindow.py index 23db1bd..920f175 100644 --- a/Mozo/MainWindow.py +++ b/Mozo/MainWindow.py @@ -72,9 +72,9 @@ class MainWindow: self.tree.get_object('delete_button').set_sensitive(False) accelgroup = Gtk.AccelGroup() keyval, modifier = Gtk.accelerator_parse('Z') - accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_mainwindow_undo) + accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_undo_button_clicked) keyval, modifier = Gtk.accelerator_parse('Z') - accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_mainwindow_redo) + accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_redo_button_clicked) keyval, modifier = Gtk.accelerator_parse('F1') accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_help_button_clicked) self.tree.get_object('mainwindow').add_accel_group(accelgroup) @@ -618,10 +618,10 @@ class MainWindow: elif isinstance(item, MateMenu.TreeSeparator): self.editor.moveSeparator(item, item.get_parent(), after=after) - def on_mainwindow_undo(self, *_args): + def on_undo_button_clicked(self, *_args): self.editor.undo() - def on_mainwindow_redo(self, *_args): + def on_redo_button_clicked(self, *_args): self.editor.redo() def on_help_button_clicked(self, *_args): diff --git a/data/mozo.ui b/data/mozo.ui index 72dfea0..593037a 100644 --- a/data/mozo.ui +++ b/data/mozo.ui @@ -1,7 +1,167 @@ - + - + + + True + False + process-stop + + + True + False + window-close + + + True + False + edit-delete + + + True + False + help-browser + + + True + False + down + + + True + False + up + + + True + False + list-add + + + True + False + document-new + + + True + False + document-properties + + + True + False + edit-redo + + + True + False + document-revert + + + True + False + document-revert + + + False + Revert Changes? + False + dialog + + + False + 6 + 6 + 6 + 6 + vertical + 2 + + + False + end + + + _Cancel + True + True + True + cancel-icon + True + + + True + True + 0 + + + + + _Revert + True + True + True + revert-icon1 + True + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + + + True + False + dialog-question + 6 + + + True + True + 6 + 0 + + + + + True + False + Revert all menus to original settings? + + + True + True + 1 + + + + + True + True + 12 + 1 + + + + + + cancel_revert_button + revert_button1 + + @@ -37,686 +197,397 @@ - + True - False + False + edit-undo - 675 - 530 - True - False - 5 + False Main Menu - center - normal + 675 + 530 + normal - - - - - True - False + + False + 6 + 6 + 6 + 6 + vertical 2 - - True - False - end + + False + end - gtk-help + _Help True - True - True - False - True + True + True + help-icon + True - False - False + True + True 0 - gtk-undo + _Undo True - True - True - True - False - True - + True + True + undo-icon + True + - False - False + True + True 1 - gtk-redo + R_edo True - True - True - True - False - True - + True + True + redo-icon + True + - False - False + True + True 2 - gtk-revert-to-saved + _Revert True - True - True - False - Restore the default menu layout - True + True + True + revert-icon + True - False - False + True + True 3 - gtk-close + _Close True - True - True - True - False - True + True + True + close-icon + True - False - False + True + True 4 False - True - end + False 0 - + True - False - 5 + False - - False - 6 + + True + True - + True - True - 200 + False + vertical - + True - False - 6 - - - True - False - _Menus: - True - menu_tree - True - 0 - - - False - False - 0 - - + False + start + 4 + 2 + _Menus: + True + menu_tree + + + False + True + 0 + + + + + True + True + in - + True - True - in - - - True - True - True - False - - - - - - - + True + False + + + + + - - True - True - 1 - - False - True + True + True + 1 + + + True + True + + + + + True + False + vertical - + True - False - 6 - - - True - False - It_ems: - True - item_tree - True - 0 - - - False - False - 0 - - + False + start + 4 + 2 + _Items: + True + item_tree + + + False + True + 0 + + + + + True + True + in - + True - False - 6 - - - True - True - in - - - True - True - True - - - - - - - - - - - - - - - - True - True - 0 - - - - - True - False - 6 - - - True - False - 6 - start - - - True - True - True - False - - - - True - False - 0 - 0 - - - True - False - 2 - - - True - False - gtk-new - - - False - False - 0 - - - - - True - False - _New Menu - True - - - False - False - 1 - - - - - - - - - False - False - 0 - - - - - True - True - True - False - - - - True - False - 0 - 0 - - - True - False - 2 - - - True - False - gtk-add - - - False - False - 0 - - - - - True - False - Ne_w Item - True - - - False - False - 1 - - - - - - - - - False - False - 1 - - - - - New _Separator - True - True - True - False - True - - - - False - False - 2 - - - - - gtk-properties - True - True - True - True - - - - False - False - 3 - - - - - gtk-delete - True - True - True - True - - - - False - False - 4 - - - - - False - True - 0 - - - - - True - False - 12 - - - True - False - 6 - start - - - True - True - True - False - - - - True - False - 0 - 0 - - - True - False - 2 - - - True - False - gtk-go-up - - - False - False - 0 - - - - - True - False - Move Up - True - - - False - False - 1 - - - - - - - - - False - False - 0 - - - - - True - True - True - False - - - - True - False - 0 - 0 - - - True - False - 2 - - - True - False - gtk-go-down - - - False - False - 0 - - - - - True - False - Move Down - True - - - False - False - 1 - - - - - - - - - False - False - 1 - - - - - - - True - True - 1 - - - - - False - True - 1 - + True + + + + + + + + + - - True - True - 1 - - True - True + True + True + 1 - True - True - 0 + True + True - - - - True - True - 1 - - - - - - help_button - undo_button - redo_button - revert_button - close_button - - - - - False - 5 - Revert Changes? - False - dialog - - - - - - True - False - 2 - - - True - False - end - - - gtk-cancel - True - True - True - False - True - - False - False + True + True 0 - - gtk-revert-to-saved + True - True - True - False - True + False + 22 + vertical + 6 + + + True + False + vertical + 6 + start + + + _New Menu + True + True + True + new-menu-icon + True + + + + True + True + 0 + + + + + Ne_w Item + True + True + True + new-item-icon + True + + + + True + True + 1 + + + + + New _Seperator + True + True + True + True + + + + True + True + 2 + + + + + _Properties + True + True + True + properties-icon + True + + + + False + True + 3 + + + + + _Delete + True + True + True + delete-icon + True + + + + True + True + 4 + + + + + False + True + 0 + + + + + True + False + 12 + vertical + 6 + start + + + Move _Up + True + True + True + move-up-icon + True + + + + True + True + 0 + + + + + Move _Down + True + True + True + move-down-icon + True + + + + True + True + 1 + + + + + False + True + 1 + + False False - 1 - - - - - False - True - end - 0 - - - - - True - False - 5 - 8 - - - True - False - 0 - gtk-dialog-question - 6 - - - False - True - 0 - - - - - True - False - Revert all menus to original settings? - 0 - 0 - - - True - True + 6 1 @@ -724,14 +595,18 @@ True True + 6 1 - cancel_revert_button - button2 + help_button + undo_button + redo_button + revert_button + close_button -- cgit v1.2.1