Could anyone please give me a hint on how to attach a "double clicked" signal to the pixbuf that is in the GtkTreeView? GtkCellRendererPixbuf doesn't have any signals?
I managed to set the GTK_CELL_RENDERER_MODE_ACTIVATABLE switch to the renderer, but I don't know how to work. I checked the header file and in fact there is the "activate" method; could you please demonstrate how to use it?
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
column = gtk_tree_view_column_new_with_attributes(NULL,
renderer,
"pixbuf",
0,
NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(view), column);
OK I try this:
Tree view's 'row-activated' will send the path and column as arguments to the callback. With 'cursor-changed' just need to call gtk_gtk_treeview_get_cursor to find out the path and column. With gtk Widget's 'button-press-event' I get the event as an argument for the callback and just need to call gtk_treeview_get_path_at_pos with event x and event y to get the path and column.