Re: hiding a Gnome (bonobo) toolbar?
eric liprandi <[email protected]> Wed, 28 Sep 2005 22:31:36 -0600
| Newsgroups | gmane.comp.gnome.gnomemm |
|---|---|
| Message-ID | <[email protected]> |
--===============2138513110== Content-Type: multipart/alternative; boundary="----=_Part_289_29291232.1127968296346" ------=_Part_289_29291232.1127968296346 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Michael, When I think about it, it was kinda obvious... just needed someone else to point it out. This actually helped me find out the answer for my other question. Thanks a lot, Eric. On 9/28/05, Michael J M Thomson <[email protected]> wrote: > > 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 =3D 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 =3D 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=3D0,j,s[40]=3D{0,},l[40];for(;;){s[i]|| > > (l[i]=3Ds[i]=3Drand()%10);for(j=3D0;j<25;++j)printf("\x1b[%d;%dH\x1b[%d;3= %cm%c",s > > [i]+j,i*2+1,l[i]-j=3D=3D1||l[i]-j!=3D2&&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]*=3D++l[i]<25;i=3D++i= %40;}} > ------=_Part_289_29291232.1127968296346 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Michael,<br> <br> When I think about it, it was kinda obvious... just needed someone else to = point it out.<br> This actually helped me find out the answer for my other question.<br> <br> Thanks a lot,<br> <br> Eric.<br><br><div><span class=3D"gmail_quote">On 9/28/05, <b class=3D"gmail= _sendername">Michael J M Thomson</b> <<a href=3D"mailto:[email protected]= n.net">[email protected]</a>> wrote:</span><blockquote class=3D"gmai= l_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0p= t 0pt 0.8ex; padding-left: 1ex;"> Eric Liprandi wrote:<br>> Hi again,<br>><br>> For the same applica= tion as mentioned in my previous question (resizing<br>> Gnome::UI::App)= , would like to "hide" the toolbar.<br>><br>> Once again, t= he interface was designed with Glade and therefore a <br>> BonoboDockItem was created to contain the toolbar.<br>><br>>= What is the proper way of get this BonoboDockItem and then hiding it?<br>&= gt; (not just the embedded toolbar).<br>><br>> Thanks in again for th= e help, <br>><br>> Eric.<br>><br>> ____________________________________= ___________<br>> gnomemm-list mailing list<br>> <a href=3D"mailto:gno= [email protected]">[email protected]</a><br>> <a href=3D"http://m= ail.gnome.org/mailman/listinfo/gnomemm-list"> http://mail.gnome.org/mailman/listinfo/gnomemm-list</a><br>><br><br>Just= give the Bonobo::DockItem a name in glade, then retrieve it like you would= <br>any other widget:<br> Gtk::Widget *dockitem =3D glade_xml-&= gt;get_widget("toolbar_dockitem"); <br> if (dockitem)<br> dockitem->hid= e();<br><br>Or if you want the exact type (requires bonobouimm):<br> &= nbsp; using Gnome::Bonobo;<br> Bonobo::DockItem *dockitem =3D d= ynamic_cast<Bonobo::DockItem*>(<br> glade_xml= ->get_widget("toolbar_dockitem")); <br> if (dockitem) {<br> dockitem->s= ignal_dock_detach().connect(<br> sigc::= bind(sigc::mem_fun(*statusbar, &Gtk::StatusBar::push),<br> &= nbsp; &nbs= p; "Hey, put me back!", 0));<br> }<br><br>--<br>Michael J M Thomson= <br><br>Knock knock, Neo...<br>main(){int/* gcc matrix.c -o matrix */i=3D0,= j,s[40]=3D{0,},l[40];for(;;){s[i]||<br>(l[i]=3Ds[i]=3Drand()%10);for(j=3D0;= j<25;++j)printf("\x1b[%d;%dH\x1b[%d;3%cm%c",s <br>[i]+j,i*2+1,l[i]-j=3D=3D1||l[i]-j!=3D2&&l[i]-j<6||l[i]-j>= 15&&l[i]-j<21||0,(l[i]-j<br><3?7:(l[i]-j<16)*2)+'0',j<l= [i]?rand()%93+33:32);s[i]*=3D++l[i]<25;i=3D++i%40;}}<br></blockquote></d= iv><br> ------=_Part_289_29291232.1127968296346-- --===============2138513110== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnomemm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnomemm-list --===============2138513110==--