aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/bookmarks/ephy-node-view.c21
2 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ca5af846..f63acdcf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-23 Xan Lopez <xan@masilla.org>
+
+ * src/bookmarks/ephy-node-view.c: (ephy_node_view_button_press_cb):
+
+ Fix right click selection logic.
+
2003-03-23 Marco Pesenti Gritti <marco@it.gnome.org>
* src/bookmarks/ephy-bookmarks-editor.c: (get_target_window),
diff --git a/src/bookmarks/ephy-node-view.c b/src/bookmarks/ephy-node-view.c
index 668e20757..2c97e4f33 100644
--- a/src/bookmarks/ephy-node-view.c
+++ b/src/bookmarks/ephy-node-view.c
@@ -255,12 +255,27 @@ ephy_node_view_button_press_cb (GtkTreeView *treeview,
GdkEventButton *event,
EphyNodeView *view)
{
+ GtkTreePath *path;
+ GtkTreeSelection *selection;
+
if (event->button == 3)
{
g_signal_emit (G_OBJECT (view), ephy_node_view_signals[SHOW_POPUP], 0);
- /* the event is handled, don't propagate it further (we avoid
- * changing the view with the right click this way) */
- return TRUE;
+ if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (treeview),
+ event->x,
+ event->y,
+ &path,
+ NULL, NULL, NULL))
+ {
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ if (gtk_tree_selection_path_is_selected (selection, path))
+ {
+ /* We handle the event (so the view won't be
+ * changed by the user click) because the user
+ * clicked on an already selected element */
+ return TRUE;
+ }
+ }
}
return FALSE;