Re: hiding a Gnome (bonobo) toolbar?
Michael J M Thomson <[email protected]> Thu, 29 Sep 2005 07:42:43 +1000
| Newsgroups | gmane.comp.gnome.gnomemm |
|---|---|
| Organization | Little, if any. |
| Message-ID | <[email protected]> |
Eric Liprandi wrote: > Hi again, > > For the same application as mentioned in my previous question (resizing > Gnome::UI::App), would like to "hide" the toolbar. > > Once again, the interface was designed with Glade and therefore a > BonoboDockItem was created to contain the toolbar. > > What is the proper way of get this BonoboDockItem and then hiding it? > (not just the embedded toolbar). > > Thanks in again for the help, > > Eric. > > _______________________________________________ > gnomemm-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gnomemm-list > Just give the Bonobo::DockItem a name in glade, then retrieve it like you would any other widget: Gtk::Widget *dockitem = glade_xml->get_widget("toolbar_dockitem"); if (dockitem) dockitem->hide(); Or if you want the exact type (requires bonobouimm): using Gnome::Bonobo; Bonobo::DockItem *dockitem = dynamic_cast<Bonobo::DockItem*>( glade_xml->get_widget("toolbar_dockitem")); if (dockitem) { dockitem->signal_dock_detach().connect( sigc::bind(sigc::mem_fun(*statusbar, &Gtk::StatusBar::push), "Hey, put me back!", 0)); } -- Michael J M Thomson Knock knock, Neo... main(){int/* gcc matrix.c -o matrix */i=0,j,s[40]={0,},l[40];for(;;){s[i]|| (l[i]=s[i]=rand()%10);for(j=0;j<25;++j)printf("\x1b[%d;%dH\x1b[%d;3%cm%c",s [i]+j,i*2+1,l[i]-j==1||l[i]-j!=2&&l[i]-j<6||l[i]-j>15&&l[i]-j<21||0,(l[i]-j <3?7:(l[i]-j<16)*2)+'0',j<l[i]?rand()%93+33:32);s[i]*=++l[i]<25;i=++i%40;}}