summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mozo/MainWindow.py11
-rw-r--r--data/mozo.ui33
2 files changed, 41 insertions, 3 deletions
diff --git a/Mozo/MainWindow.py b/Mozo/MainWindow.py
index 176c410..74e5fd8 100644
--- a/Mozo/MainWindow.py
+++ b/Mozo/MainWindow.py
@@ -67,6 +67,8 @@ class MainWindow:
self.tree.get_object('move_up_button').set_sensitive(False)
self.tree.get_object('move_down_button').set_sensitive(False)
self.tree.get_object('new_separator_button').set_sensitive(False)
+ self.tree.get_object('properties_button').set_sensitive(False)
+ self.tree.get_object('delete_button').set_sensitive(False)
accelgroup = Gtk.AccelGroup()
keyval, modifier = Gtk.accelerator_parse('<Ctrl>Z')
accelgroup.connect(keyval, modifier, Gtk.AccelFlags.VISIBLE, self.on_mainwindow_undo)
@@ -450,14 +452,17 @@ class MainWindow:
item = items[iter][3]
self.tree.get_object('edit_delete').set_sensitive(True)
self.tree.get_object('new_separator_button').set_sensitive(True)
+ self.tree.get_object('delete_button').set_sensitive(True)
if self.editor.canRevert(item):
self.tree.get_object('edit_revert_to_original').set_sensitive(True)
else:
self.tree.get_object('edit_revert_to_original').set_sensitive(False)
if not item.get_type() == matemenu.TYPE_SEPARATOR:
self.tree.get_object('edit_properties').set_sensitive(True)
+ self.tree.get_object('properties_button').set_sensitive(True)
else:
self.tree.get_object('edit_properties').set_sensitive(False)
+ self.tree.get_object('properties_button').set_sensitive(False)
# If first item...
if items.get_path(iter).get_indices()[0] == 0:
@@ -640,6 +645,12 @@ class MainWindow:
pass
GLib.timeout_add(10, self.quit)
+ def on_properties_button_clicked(self, button):
+ self.on_edit_properties_activate(None)
+
+ def on_delete_button_clicked(self, button):
+ self.on_edit_delete_activate(None)
+
def on_style_updated(self, *args):
self.loadUpdates()
diff --git a/data/mozo.ui b/data/mozo.ui
index c9e1e30..a01bf4e 100644
--- a/data/mozo.ui
+++ b/data/mozo.ui
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkUIManager" id="uimanager1">
@@ -160,8 +159,6 @@
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="menu_tree">
@@ -381,6 +378,36 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="properties_button">
+ <property name="label">gtk-properties</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_properties_button_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete_button">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_delete_button_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>