]> err.no Git - mapper/commitdiff
Test code for search list double click handling
authorKaj-Michael Lang <milang@onion.tal.org>
Sat, 3 Nov 2007 10:40:02 +0000 (12:40 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Sat, 3 Nov 2007 10:40:02 +0000 (12:40 +0200)
src/search.c

index dd10f704fcbef29380b830aa12e5e62f035c8738..0aa78efcad8a544f05d93c306832cab62d2fc3b1 100644 (file)
@@ -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
 }