removing toolbars from an app
- From: Edwin Young <edwin snufkin f9 co uk>
- To: gnome-devel-list gnome org
- Subject: removing toolbars from an app
- Date: Mon, 10 Jan 2000 19:12:11 -0500
Hi,
I have a couple of different toolbars, and I'd like the user to be
able to switch each of them on or off independently. Removing
them is causing me some headaches. First, I tried
hiding the GnomeDockItem for that toolbar. That worked, but
unfortunately even if all the toolbars in a band are hidden, the band
stays visible, so the app has a big grey bar across the top. Next,
I tried the function below. remove_item_by_name returns true,
but it doesn't seem to do anything. Any suggestions?
void
hide_move_toolbar_cb(GtkMenuItem *widget, gpointer user_data)
{
GtkWidget *dock = GNOME_APP(app)->dock;
static GnomeDockPlacement place;
static guint band,pos,off;
GnomeDockItem *item =
gnome_dock_get_item_by_name(GNOME_DOCK(dock),"move",
&place,&band,&pos,&off);
if(item) {
GnomeDockLayout *layout = gnome_dock_get_layout(GNOME_DOCK(dock));
gnome_dock_layout_remove_item_by_name(GNOME_DOCK_LAYOUT(layout),
"move");
} else {
gnome_app_add_toolbar(GNOME_APP (app),
GTK_TOOLBAR(toolbar_move),
"move",
GNOME_DOCK_ITEM_BEH_NORMAL,
place,
band,pos,off);
}
gtk_item_toggle(GTK_ITEM(widget));
}
Thanks,
--
Edwin Young
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]