[epiphany-extensions] rss: don't stop button-press-event propagation



commit 500715568723dd29a13b5456688c4e08c7d15015
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Fri Jan 22 23:19:23 2010 -0500

    rss: don't stop button-press-event propagation
    
    Because of our signal handler the context menu can popup with no row selected,
    this obviously breaks any action taken.
    
    Bug #563178

 extensions/rss/rss-ui.c |   21 +--------------------
 1 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/extensions/rss/rss-ui.c b/extensions/rss/rss-ui.c
index 13f5166..fa7e7f7 100644
--- a/extensions/rss/rss-ui.c
+++ b/extensions/rss/rss-ui.c
@@ -314,9 +314,7 @@ rss_ui_treeview_button_pressed_cb (GtkTreeView *treeview,
 				   RssUI *dialog)
 {
 	RssUIPrivate *priv = dialog->priv;
-	GtkTreeModel *model = GTK_TREE_MODEL (priv->store);
 	GtkTreeSelection *selection;
-	GtkTreeIter iter;
 	GtkTreePath *path = NULL;
 	GtkMenu *menu;
 
@@ -324,9 +322,7 @@ rss_ui_treeview_button_pressed_cb (GtkTreeView *treeview,
 
 	/* right-click? */
 	if (event->button != 3)
-	{
 		return FALSE;
-	}
 
 	/* Get tree path for row that was clicked */
 	if (!gtk_tree_view_get_path_at_pos (treeview,
@@ -336,27 +332,12 @@ rss_ui_treeview_button_pressed_cb (GtkTreeView *treeview,
 		return FALSE;
 	}
 
-	if (!gtk_tree_model_get_iter (model, &iter, path))
-	{
-		gtk_tree_path_free(path);
-		return FALSE;
-	}
-
-	/* Select the row the user clicked on */
-	selection = gtk_tree_view_get_selection (treeview);
-	if (gtk_tree_selection_count_selected_rows (selection) == 1)
-	{
-		gtk_tree_selection_unselect_all (selection);
-		gtk_tree_selection_select_path (selection, path);
-		gtk_tree_path_free (path);
-	}
-
 	/* now popup the menu */
 	menu = rss_ui_build_context_menu (dialog);
 	gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
 			event->button, event->time);
 
-	return TRUE;
+	return FALSE;
 }
 
 /* Set dnd cursor to the default dnd Gtk one and not the GtktreeView one */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]