[nautilus] eel: remove unused eel_gtk_tree_view_set_activate_on_single_click



commit ae16296bbc5fdfa7a9ef475b9c61f24965a9e9d9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jan 22 20:35:33 2013 -0500

    eel: remove unused eel_gtk_tree_view_set_activate_on_single_click

 eel/eel-gtk-extensions.c |   51 ----------------------------------------------
 eel/eel-gtk-extensions.h |    4 ---
 2 files changed, 0 insertions(+), 55 deletions(-)
---
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c
index 3a590f1..804584d 100644
--- a/eel/eel-gtk-extensions.c
+++ b/eel/eel-gtk-extensions.c
@@ -317,57 +317,6 @@ eel_gtk_menu_insert_separator (GtkMenu *menu, int index)
 	return GTK_MENU_ITEM (menu_item);
 }
 
-static gboolean 
-tree_view_button_press_callback (GtkWidget *tree_view,
-				 GdkEventButton *event,
-				 gpointer data)
-{
-	GtkTreePath *path;
-	GtkTreeViewColumn *column;
-
-	if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
-		if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (tree_view),
-						   event->x, event->y,
-						   &path,
-						   &column,
-						   NULL, 
-						   NULL)) {
-			gtk_tree_view_row_activated
-				(GTK_TREE_VIEW (tree_view), path, column);
-			gtk_tree_path_free (path);
-		}
-	}
-
-	return FALSE;
-}
-
-void
-eel_gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
-						gboolean should_activate)
-{
-	guint button_press_id;
-
-	button_press_id = GPOINTER_TO_UINT 
-		(g_object_get_data (G_OBJECT (tree_view), 
-				    "eel-tree-view-activate"));
-
-	if (button_press_id && !should_activate) {
-		g_signal_handler_disconnect (tree_view, button_press_id);
-		g_object_set_data (G_OBJECT (tree_view), 
-				   "eel-tree-view-activate", 
-				   NULL);
-	} else if (!button_press_id && should_activate) {
-		button_press_id = g_signal_connect 
-			(tree_view,
-			 "button-press-event",
-			 G_CALLBACK  (tree_view_button_press_callback),
-			 NULL);
-		g_object_set_data (G_OBJECT (tree_view), 
-				   "eel-tree-view-activate", 
-				   GUINT_TO_POINTER (button_press_id));
-	}
-}
-
 void
 eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog,
 				  const gchar *details_text)
diff --git a/eel/eel-gtk-extensions.h b/eel/eel-gtk-extensions.h
index bde1360..5b58c76 100644
--- a/eel/eel-gtk-extensions.h
+++ b/eel/eel-gtk-extensions.h
@@ -48,10 +48,6 @@ GtkMenuItem *         eel_gtk_menu_append_separator                   (GtkMenu
 GtkMenuItem *         eel_gtk_menu_insert_separator                   (GtkMenu              *menu,
 								       int                   index);
 
-/* GtkTreeView */
-void                  eel_gtk_tree_view_set_activate_on_single_click  (GtkTreeView               *tree_view,
-								       gboolean                   should_activate);
-
 /* GtkMessageDialog */
 void                  eel_gtk_message_dialog_set_details_label        (GtkMessageDialog          *dialog,
 								       const gchar               *details_text);



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