6521 |
} |
} |
6522 |
|
|
6523 |
|
|
6524 |
|
/* Finds the last child widget that happens to be of type GtkEntry */ |
6525 |
|
static void |
6526 |
|
find_entry(GtkWidget *w, gpointer user_data) |
6527 |
|
{ |
6528 |
|
GtkWidget **entry = user_data; |
6529 |
|
if ( GTK_IS_ENTRY(w)) |
6530 |
|
{ |
6531 |
|
*entry = w; |
6532 |
|
} |
6533 |
|
} |
6534 |
|
|
6535 |
GtkWidget * |
GtkWidget * |
6536 |
gtk_sheet_get_entry(GtkSheet *sheet) |
gtk_sheet_get_entry(GtkSheet *sheet) |
6537 |
{ |
{ |
6552 |
if(GTK_IS_TABLE(parent)) children = GTK_TABLE(parent)->children; |
if(GTK_IS_TABLE(parent)) children = GTK_TABLE(parent)->children; |
6553 |
if(GTK_IS_BOX(parent)) children = GTK_BOX(parent)->children; |
if(GTK_IS_BOX(parent)) children = GTK_BOX(parent)->children; |
6554 |
|
|
6555 |
|
if(GTK_IS_CONTAINER(parent)) |
6556 |
|
{ |
6557 |
|
gtk_container_forall(GTK_CONTAINER(parent), find_entry, &entry); |
6558 |
|
|
6559 |
|
if(GTK_IS_ENTRY(entry)) |
6560 |
|
return entry; |
6561 |
|
} |
6562 |
|
|
6563 |
if(!children) return NULL; |
if(!children) return NULL; |
6564 |
|
|
6565 |
while(children){ |
while(children){ |