From 14fba37bca6d58c37a358087a67ff18e8fc553ad Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Sat, 3 Nov 2007 12:40:02 +0200 Subject: [PATCH] Test code for search list double click handling --- src/search.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index dd10f70..0aa78ef 100644 --- a/src/search.c +++ b/src/search.c @@ -246,8 +246,22 @@ return TRUE; static void search_item_activated_cb(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data) { -#if 0 search_dialog *s=(search_dialog *)data; +GtkTreeIter iter; +GtkTreeModel *model; +guint id; + +if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)), NULL, &iter)) + return; + +model=gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); +if (!model) + return; + +gtk_tree_model_get(model, &iter, ITEM_ID, &id, -1); +g_printf("Item %d\n", id); + +#if 0 gtk_widget_destroy(sd.dialog); #endif } -- 2.39.5