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> &lt;<a href=3D"mailto:[email protected]=
n.net">[email protected]</a>&gt; 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>&gt; Hi again,<br>&gt;<br>&gt; For the same applica=
tion as mentioned in my previous question (resizing<br>&gt; Gnome::UI::App)=
, would like to &quot;hide&quot; the toolbar.<br>&gt;<br>&gt; Once again, t=
he interface was designed with Glade and therefore a
<br>&gt; BonoboDockItem was created to contain the toolbar.<br>&gt;<br>&gt;=
 What is the proper way of get this BonoboDockItem and then hiding it?<br>&=
gt; (not just the embedded toolbar).<br>&gt;<br>&gt; Thanks in again for th=
e help,
<br>&gt;<br>&gt; Eric.<br>&gt;<br>&gt; ____________________________________=
___________<br>&gt; gnomemm-list mailing list<br>&gt; <a href=3D"mailto:gno=
[email protected]">[email protected]</a><br>&gt; <a href=3D"http://m=
ail.gnome.org/mailman/listinfo/gnomemm-list">
http://mail.gnome.org/mailman/listinfo/gnomemm-list</a><br>&gt;<br><br>Just=
 give the Bonobo::DockItem a name in glade, then retrieve it like you would=
<br>any other widget:<br>&nbsp;&nbsp; Gtk::Widget *dockitem =3D glade_xml-&=
gt;get_widget(&quot;toolbar_dockitem&quot;);
<br>&nbsp;&nbsp; if (dockitem)<br>&nbsp;&nbsp;&nbsp;&nbsp; dockitem-&gt;hid=
e();<br><br>Or if you want the exact type (requires bonobouimm):<br>&nbsp;&=
nbsp; using Gnome::Bonobo;<br>&nbsp;&nbsp; Bonobo::DockItem *dockitem =3D d=
ynamic_cast&lt;Bonobo::DockItem*&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp; glade_xml=
-&gt;get_widget(&quot;toolbar_dockitem&quot;));
<br>&nbsp;&nbsp; if (dockitem) {<br>&nbsp;&nbsp;&nbsp;&nbsp; dockitem-&gt;s=
ignal_dock_detach().connect(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sigc::=
bind(sigc::mem_fun(*statusbar, &amp;Gtk::StatusBar::push),<br>&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&quot;Hey,
put me back!&quot;, 0));<br>&nbsp;&nbsp; }<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&lt;25;++j)printf(&quot;\x1b[%d;%dH\x1b[%d;3%cm%c&quot;,s
<br>[i]+j,i*2+1,l[i]-j=3D=3D1||l[i]-j!=3D2&amp;&amp;l[i]-j&lt;6||l[i]-j&gt;=
15&amp;&amp;l[i]-j&lt;21||0,(l[i]-j<br>&lt;3?7:(l[i]-j&lt;16)*2)+'0',j&lt;l=
[i]?rand()%93+33:32);s[i]*=3D++l[i]&lt;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==--