aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-03-23 18:26:11 +0800
committerXan Lopez <xan@src.gnome.org>2003-03-23 18:26:11 +0800
commitf360f793d3c18a3d0e9870f05d0a9787066f7046 (patch)
treed8b6b690d18b61b015ba281d2e1eb3f792463a91
parent1cbf7f5f14b162826d5c016d836d8c2243986f58 (diff)
downloadgsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.tar
gsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.tar.gz
gsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.tar.bz2
gsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.tar.lz
gsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.tar.xz
gsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.tar.zst
gsoc2013-epiphany-f360f793d3c18a3d0e9870f05d0a9787066f7046.zip
Fix right click selection logic.
Fix right click selection logic.
-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;