Erik Grinaker <[EMAIL PROTECTED]> writes:
> I'm trying to hide the toolbar of a gnome.ui.App() instance, but I don't
> seem to be getting anywhere. If I just call hide() on the toolbar, it is
> hidden but its display area is still visible (empty, though). It seems
> to be contained in a Bonobo Dock, but I can't find any good
> documentation on it anywhere.
You're right, hiding the gtk+ toolbar will leave a blank area in the
Bonobo dock. You need hide the dock item itself, but first you have
to get the dock item. One way is to use get_dock_item_by_name(). (As
you note, this isn't documented well.)
I'm afraid I can't give you an exact prescription without seeing your
code, but here is a snippet from some test code I tried some months
ago that might put you on the right track. The variable my_app is a
reference to the gnome.ui.App instance.
# Hide toolbar. We need to get the bonobo dock item to show/hide
# instead of simply hiding the toolbar itself or we will leave
# blank dock space when we hide.
# The default toolbar name for a gnome.ui.App seems to be 'Toolbar'.
bonobo_toolbar = my_app.get_dock_item_by_name('Toolbar')
if bonobo_toolbar:
bonobo_toolbar.hide()
You can show it again using show() in place of hide().
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/