[Xfce4-commits] <postler:master> Fixed multiple selection and dragging
Christian Dywan
noreply at xfce.org
Tue Mar 1 23:08:01 CET 2011
Updating branch refs/heads/master
to 66004d3eba582b8c12978281d01fdafbf260ccf2 (commit)
from f67c72b4e0a6c3be2211d3ccfa7a54a4a19996cb (commit)
commit 66004d3eba582b8c12978281d01fdafbf260ccf2
Author: Sergio Spinatelli <spinatelli.sergio at gmail.com>
Date: Sat Feb 26 18:48:59 2011 +0100
Fixed multiple selection and dragging
Fixes: https://bugs.launchpad.net/postler/+bug/725597
postler/postler-messages.vala | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index fa23158..a362c6a 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -1090,6 +1090,16 @@ public class Postler.Messages : Gtk.TreeView {
&& get_selection ().path_is_selected (path)) {
get_selection().set_select_function( () => { return false; });
defer_select = path;
+ } else {
+ /* Re-enable selection */
+ get_selection().set_select_function(() => { return true; });
+ if (defer_select != null
+ && get_dest_row_at_pos ((int)event.x, (int)event.y, out path, out pos)
+ && defer_select == path
+ && !(event.x == 0 && event.y == 0))
+ set_cursor (path, null, false);
+
+ defer_select = null;
}
return base.button_press_event (event);
}
@@ -1108,6 +1118,17 @@ public class Postler.Messages : Gtk.TreeView {
defer_select = null;
return base.button_release_event (event);
+ } else {
+ get_selection ().set_select_function(() => { return true; });
+ Gtk.TreePath? path = null;
+ Gtk.TreeViewDropPosition pos;
+ get_dest_row_at_pos ((int)event.x, (int)event.y, out path, out pos);
+ if (defer_select != null
+ && get_dest_row_at_pos ((int)event.x, (int)event.y, out path, out pos)
+ && !(event.x == 0 && event.y == 0))
+ set_cursor (path, null, false);
+
+ defer_select = null;
}
GLib.List<Gtk.TreePath> paths = get_selection ().get_selected_rows (null);
More information about the Xfce4-commits
mailing list