|
发表于 2006-5-31 08:34:22
|
显示全部楼层
[code:1]
gboolean is_dir;
GtkTreeIter iter;
gchar *src_path;
GList *glist = gtk_icon_view_get_selected_items (GTK_ICON_VIEW(widget));
GtkListStore *store = (GtkListStore *)gtk_icon_view_get_model(GTK_ICON_VIEW(widget));
if (glist == NULL)
return;
while (glist != NULL) {
GtkTreePath *tree_path = (GtkTreePath *)glist -> data;
gtk_tree_model_get_iter (GTK_TREE_MODEL (store),
&iter, tree_path);
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter,
COL_PATH, &src_path,
COL_IS_DIRECTORY, &is_dir,
-1);
g_print ("src: %s\n",src_path);
glist = glist -> next;
}[/code:1] |
|