summaryrefslogtreecommitdiff
path: root/Mozo/MainWindow.py
diff options
context:
space:
mode:
authorMatt Jorde <[email protected]>2011-08-23 20:58:10 +0200
committerAlexei Sorokin <[email protected]>2016-08-23 00:17:03 +0300
commitc39ea786f9bfff1eef4962b8a8bbb700ffb34de5 (patch)
tree144a9c0875399117561438a45c0ec56c31fd07ee /Mozo/MainWindow.py
parent2256cf36835b904670606972fb4d6bb5f26ea5dc (diff)
downloadmozo-c39ea786f9bfff1eef4962b8a8bbb700ffb34de5.tar.bz2
mozo-c39ea786f9bfff1eef4962b8a8bbb700ffb34de5.tar.xz
add properties and a delete button
https://bugzilla.gnome.org/show_bug.cgi?id=518251
Diffstat (limited to 'Mozo/MainWindow.py')
-rw-r--r--Mozo/MainWindow.py11
1 files changed, 11 insertions, 0 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()