[gnome-documents] Use single click activation in contents view



commit 14d21abef0ba19f9f4dddb7303b80c2d360f02c1
Author: William Jon McCann <jmccann redhat com>
Date:   Fri Jan 18 04:31:42 2013 -0500

    Use single click activation in contents view

 src/lib/gd-places-links.c |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/src/lib/gd-places-links.c b/src/lib/gd-places-links.c
index b0635ba..c1aca3c 100644
--- a/src/lib/gd-places-links.c
+++ b/src/lib/gd-places-links.c
@@ -73,7 +73,6 @@ emit_link_activated (GdPlacesLinks *self)
         GtkTreeIter iter;
 
         selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (self->priv->tree_view));
-
         if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
                 EvLink *link;
                 EvDocumentModel *document_model;
@@ -118,18 +117,6 @@ schedule_emit_link_activated (GdPlacesLinks *self)
 }
 
 static gboolean
-button_release_event_cb (GtkWidget *widget,
-                         GdkEventButton *event,
-                         GdPlacesLinks *self)
-{
-        if (event->button == GDK_BUTTON_PRIMARY) {
-                schedule_emit_link_activated (self);
-        }
-
-        return FALSE;
-}
-
-static gboolean
 update_page_cb_foreach (GtkTreeModel  *model,
                         GtkTreePath   *path,
                         GtkTreeIter   *iter,
@@ -284,9 +271,7 @@ gd_places_links_construct (GdPlacesLinks *self)
 
         /* Create tree view */
         priv->tree_view = gtk_tree_view_new ();
-
-        g_signal_connect (priv->tree_view, "button-release-event",
-                          G_CALLBACK (button_release_event_cb), self);
+        gtk_tree_view_set_activate_on_single_click (GTK_TREE_VIEW (priv->tree_view), TRUE);
         g_signal_connect_swapped (priv->tree_view, "row-activated",
                                   G_CALLBACK (schedule_emit_link_activated), self);
 



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