GtkTree problem..(plz read this also)



hi

actually in my button "clicked" action function i written as below.(it is same frm GtkTutorial)

GList *i;

i = GTK_TREE_SELECTION(tree);

while (i)

{

gchar *name;

GtkLabel *label; GtkWidget *item;

item = GTK_WIDGET (i->data);

label = GTK_LABEL (GTK_BIN (item)->child);

gtk_label_get (label, &name);

g_print ("\t%s on level %d\n", name, GTK_TREE (item->parent)->level);

i = i->next;

}

 

but by using this suppose user just click on subtree but did not select any items under it ,it will return me name of subtree..

i want the name of item only that is selected & some error if not selected like that..

plz help me..

regrads

nimeesh patel



Do You Yahoo!?
For regular News updates go to Yahoo! News

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]