From: <kr_...@us...> - 2003-11-22 12:22:21
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv8851/src/cbits/GTK Modified Files: StatusBar.c Log Message: osGetStatusBarIndicatorsCount and osGetIndicatorPos functions for GNOME Index: StatusBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/StatusBar.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StatusBar.c 16 Nov 2003 13:25:20 -0000 1.4 --- StatusBar.c 22 Nov 2003 12:21:37 -0000 1.5 *************** *** 37,40 **** --- 37,52 ---- } + int osGetStatusBarIndicatorsCount() + { + int count; + GList *children; + + children = gtk_container_get_children(GTK_CONTAINER(GNOME_APP(gFrameWidget)->statusbar)); + count = g_list_length(children); + g_list_free (children); + + return count-1; + } + static void calc_pack_end_count(GtkWidget *child, gpointer data) { *************** *** 113,115 **** --- 125,147 ---- { gtk_label_set_text(GTK_LABEL(GTK_BIN(GTK_BIN(indicator)->child)->child), title); + } + + int osGetIndicatorPos(IndicatorHandle indicator) + { + int pos; + GList *children; + + pos = 0; + for (children = gtk_container_get_children(GTK_CONTAINER(GNOME_APP(gFrameWidget)->statusbar)); + children != NULL; + children = g_list_delete_link(children, children)) + { + if ((IndicatorHandle) children->data == indicator) + break; + pos++; + } + + g_list_free (children); + + return pos-1; } |