aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/proto_draw.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-11-28 12:30:18 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-11-28 12:30:18 +0000
commit311ec682066f759fa2aad2bf3118ffb805e028e8 (patch)
tree74454e4a81392145a4c00f89c65f9317c44a8b3c /gtk/proto_draw.c
parentff7c20938ea3da3ae7d494b35809a2387f497dec (diff)
Put double click on a frame link back.
svn path=/trunk/; revision=23644
Diffstat (limited to 'gtk/proto_draw.c')
-rw-r--r--gtk/proto_draw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c
index c2f61a42d8..5b292ae6ad 100644
--- a/gtk/proto_draw.c
+++ b/gtk/proto_draw.c
@@ -2046,13 +2046,15 @@ tree_view_select(GtkWidget *widget, GdkEventButton *event)
node = gtk_ctree_node_nth(ctree, row);
g_assert(node);
- gtk_ctree_select(ctree, node);
-
/* if that's a doubleclick, try to follow the link */
if(event->type == GDK_2BUTTON_PRESS) {
fi = gtk_ctree_node_get_row_data(ctree, node);
tree_view_follow_link(fi);
}
+ else if (((GdkEventButton *)event)->button != 1) {
+ /* if button == 1 gtk_ctree_select is already (or will be) called by the widget */
+ gtk_ctree_select(ctree, node);
+ }
} else {
return FALSE;
}
@@ -2066,7 +2068,6 @@ tree_view_select(GtkWidget *widget, GdkEventButton *event)
&path, NULL, NULL, NULL))
{
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
- gtk_tree_selection_select_path(sel, path);
/* if that's a doubleclick, try to follow the link */
if(event->type == GDK_2BUTTON_PRESS) {
@@ -2079,6 +2080,10 @@ tree_view_select(GtkWidget *widget, GdkEventButton *event)
tree_view_follow_link(fi);
}
}
+ else if (((GdkEventButton *)event)->button != 1) {
+ /* if button == 1 gtk_tree_selection_select_path is already (or will be) called by the widget */
+ gtk_tree_selection_select_path(sel, path);
+ }
} else {
return FALSE;
}