|
我写了一个获得gtktreeview每一行双击的事件的信号的函数,如下
view = gtk_tree_view_new();
g_signal_connect(view, "row-activated", G_CALLBACK(onRowActivated), NULL);
static void onRowActivated (GtkTreeView *view,
GtkTreePath *path,
GtkTreeViewColumn *col,
gpointer user_data)
{
GtkTreeModel *model;
GtkTreeIter iter;
GtkWidget *clist;
model = gtk_tree_view_get_model(view);
if (gtk_tree_model_get_iter(model, &iter, path))
{ gchar *name;
gtk_tree_model_get(model, &iter, COL_FIRST_NAME, &name, -1);
clist=create_tabel_clist(name); //create_table_clist()函数返回的是一个vbox
gtk_paned_add2 (GTK_PANED (hpaned), clist);//?这个地方显示的第一双击获得的clist,后面双击事件产生的clist不会在hpaned上显示出来,我怎么才能够更新呢?
gtk_widget_show(clist);
}
}
请你帮我一下 |
|