[geary] Remove GtkTreeView Ctrl+N binding: Bug #713917
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Remove GtkTreeView Ctrl+N binding: Bug #713917
- Date: Fri, 10 Oct 2014 02:14:26 +0000 (UTC)
commit 1de491cb0d3d1c6707f3869fb5959ab6a16c247d
Author: Jim Nelson <jim yorba org>
Date: Thu Oct 9 19:10:10 2014 -0700
Remove GtkTreeView Ctrl+N binding: Bug #713917
GtkTreeView's binding for Ctrl+N to "move cursor to next item"
conflicted with Geary's Ctrl+N binding for New Message. This removes
GtkTreeView's binding.
.../conversation-list/conversation-list-view.vala | 6 ++++++
src/client/folder-list/folder-list-tree.vala | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/client/conversation-list/conversation-list-view.vala
b/src/client/conversation-list/conversation-list-view.vala
index 55f3e7c..bdc1370 100644
--- a/src/client/conversation-list/conversation-list-view.vala
+++ b/src/client/conversation-list/conversation-list-view.vala
@@ -74,6 +74,12 @@ public class ConversationListView : Gtk.TreeView {
// Watch for mouse events.
motion_notify_event.connect(on_motion_notify_event);
leave_notify_event.connect(on_leave_notify_event);
+
+ // GtkTreeView binds Ctrl+N to "move cursor to next". Not so interested in that, so we'll
+ // remove it.
+ unowned Gtk.BindingSet? binding_set = Gtk.BindingSet.find("GtkTreeView");
+ assert(binding_set != null);
+ Gtk.BindingEntry.remove(binding_set, Gdk.Key.N, Gdk.ModifierType.CONTROL_MASK);
}
private void on_conversation_monitor_changed() {
diff --git a/src/client/folder-list/folder-list-tree.vala b/src/client/folder-list/folder-list-tree.vala
index f860764..adeb7e0 100644
--- a/src/client/folder-list/folder-list-tree.vala
+++ b/src/client/folder-list/folder-list-tree.vala
@@ -29,6 +29,12 @@ public class FolderList.Tree : Sidebar.Tree {
// Set self as a drag destination.
Gtk.drag_dest_set(this, Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT,
TARGET_ENTRY_LIST, Gdk.DragAction.COPY | Gdk.DragAction.MOVE);
+
+ // GtkTreeView binds Ctrl+N to "move cursor to next". Not so interested in that, so we'll
+ // remove it.
+ unowned Gtk.BindingSet? binding_set = Gtk.BindingSet.find("GtkTreeView");
+ assert(binding_set != null);
+ Gtk.BindingEntry.remove(binding_set, Gdk.Key.N, Gdk.ModifierType.CONTROL_MASK);
}
~Tree() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]