Re: Configuring Toolbars with BononboUI



Hi Gustavo,

On Sun, 2002-09-08 at 14:21, Gustavo J A M Carneiro wrote:
>   I have spent almost two days trying to solve this simple problem.

	I'm sorry about that; ask questions earlier, this one is quite simple.

>   If the user right-clicks on the toolbar, a menu appears giving it the
> option to hide the toolbar. However, once hidden, there is no way to
> bring it back without changing a gconf key.

	Right;

>   I would like to include a menu item (View->Tool Bar), to show/hide the
> toolbar. How can I do that? I mean I know how to create a toggle menu
> item, listen for state changes, etc., but how do I programatically show
> or hide the toolbar. For the status bar it was easy: just set the
> 'hidden' property on /status:
> 	bonobo_ui_component_set_prop(component, "/status", "hidden",
> 				     visible? "0" : "1", NULL);
> 
> But for the toolbar it doesn't work. Maybe it's because I don't know the
> correct path, because it is not documented?

	Nope; it's because as you set the path - it is clobbered internally by
the configuration mechanism and hidden again :-)

	The way the configuration works is this: as you change a node, it's
looked up in the config hash which has a list of properties which are
'clobbered' on it - and these are set to the stored values.

	You really want to add a menu item with the builtin verb
'BonoboCustomize' that magically should do what you want [ albeit with a
somewhat ugly GUI ].

	The question as to how best to abstract / expose the customization
information is a difficult one. I'd be most pleased if you could come up
with a design / a set of thoughts on how to do this.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]