This is a just simplified case because my C file is too big to post it here:
int main(int argc, char **argv) {
GtkWidget *window, *vbox, *toolbar, *locationentry;
GtkToolItem *locationbar;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
vbox = gtk_vbox_new(FALSE, 0);
toolbar = gtk_toolbar_new();
locationentry = gtk_entry_new();
locationbar = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(locationbar), locationentry);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), locationbar, -1);
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
How do I add locationentry to the toolbar so that it fills the toolbar? GtkToolItem does not subclass GtkBox so I can't use gtk_box_pack_start function which has the fill argument I need here.
I attached the big C file.
I forgot to say that I'm using Webkit GTK+ port (libwebkit-dev package on Ubuntu 9.10). The simplified case does not use this lib, but the main.c file I attached uses it.
PS: Sorry for my bad English..