[meld] filediff: Migrate toggle actions to UI file
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Migrate toggle actions to UI file
- Date: Sun, 14 Dec 2014 20:51:45 +0000 (UTC)
commit 99c84e70975dcee529aa94633caa85f0323da881
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Dec 14 08:28:58 2014 +1000
filediff: Migrate toggle actions to UI file
data/ui/filediff.ui | 12 +++++-------
meld/filediff.py | 7 -------
2 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/data/ui/filediff.ui b/data/ui/filediff.ui
index 58292ca..53ef4cd 100644
--- a/data/ui/filediff.ui
+++ b/data/ui/filediff.ui
@@ -162,16 +162,14 @@
</object>
<accelerator key="Escape" modifiers="GDK_CONTROL_MASK"/>
</child>
-<!--
<child>
- <object class="GtkAction" id="NONE">
- <property name="label" translatable="yes">NONE</property>
- <property name="tooltip" translatable="yes">NONE</property>
- <signal name="activate" handler="NONE" swapped="no"/>
+ <object class="GtkToggleAction" id="LockScrolling">
+ <property name="label" translatable="yes">Lock Scrolling</property>
+ <property name="tooltip" translatable="yes">Lock scrolling of all panes</property>
+ <property name="active">True</property>
+ <signal name="toggled" handler="on_action_lock_scrolling_toggled" swapped="no"/>
</object>
- <accelerator key="NONE" modifiers="NONE"/>
</child>
- -->
</object>
<object class="GtkMessageDialog" id="check_save_dialog">
<property name="can_focus">False</property>
diff --git a/meld/filediff.py b/meld/filediff.py
index 4dcfbd2..7444355 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -240,16 +240,9 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
buf.connect("notify::has-selection",
self.update_text_actions_sensitivity)
- toggle_actions = (
- ("LockScrolling", None, _("Lock Scrolling"), None,
- _("Lock scrolling of all panes"),
- self.on_action_lock_scrolling_toggled, True),
- )
-
self.ui_file = gnomeglade.ui_file("filediff-ui.xml")
self.actiongroup = self.FilediffActions
self.actiongroup.set_translation_domain("meld")
- self.actiongroup.add_toggle_actions(toggle_actions)
self.findbar = findbar.FindBar(self.grid)
self.grid.attach(self.findbar.widget, 1, 2, 5, 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]