Re: Trying to get custom Bonobo tool bar controls & standard buttonsto match appearance
- From: John Sullivan <sullivan eazel com>
- To: Michael Meeks <michael helixcode com>
- Cc: gnome-components-list gnome org
- Subject: Re: Trying to get custom Bonobo tool bar controls & standard buttonsto match appearance
- Date: Wed, 06 Dec 2000 17:14:07 -0800
Michael Meeks wrote:
> Hi John,
>
> On Wed, 6 Dec 2000, John Sullivan wrote:
> > In the Nautilus tool bar are Back and Forward buttons. These buttons
> > are intended to look and act exactly like other tool bar buttons, with
> > one difference: right-clicking on them gives a pop-up menu.
>
> Yes.
>
> > I could find no way to get access to the right-click event with a
> > normal Bonobo tool bar item
>
> There is no way to do this.
>
> > so I made a control and embedded within it my own widget. I made my
> > widget be a BonoboUIToolbarButtonItem, so that I could share as much
> > code as possible with standard Bonobo tool bar items, and thus
> > minimize differences.
>
> This is the correct approach.
>
> > This works pretty well, but one place where it fails is in the
> > BonoboUIToolbarItemStyle. My widget doesn't have this style set when
> > the standard tool bar buttons do, and I haven't found any way for my
> > widget to determine what style is used by standard tool bar buttons.
> > And when the style changes (e.g. when a dragged-off tool bar is made
> > vertical), my widget doesn't react.
>
> Yes; ok, the right solution to this I think is to define several
> properties that we can use to signal style changes to embedded
> controls. This is my preferred method, to improve the platform.
>
> > Perhaps there's already the right mechanism in here for me to hook
> > into, but I just didn't notice it? Or is this a known design problem
> > in Bonobo, where controls don't get notified/updated the way standard
> > tool bar buttons do?
>
> Yes; it is a known issue, can you add the 'bonobo:look' and other
> properties as neccessary. I think we should probably namespace the
> properties at least like above; similar to the oaf attribute namespaceing
> - rather feeble really.
>
> > Unless there's a way to do this that I didn't realize, my plan is to
> > duplicate enough logic to get the initial style right, and punt on the
> > fact that style changes in the lifetime of the tool bar won't affect
> > my widget.
>
> Better to do it with properties I think, see
> bonobo-property-bag[-client].[ch], it should be easy, less work, more
> robust and a useful solution to others I think; sound good ? :-)
It certainly isn't less work than the one line I've already added to get the
initial style right in Nautilus. I agree that this approach sounds like the
right one. Given my current knowledge of bonobo-property-bags (zilch), it's
probably not completely trivial for me to get this working. I'd like to, but
it's fairly low on my priority list, so I won't make any promises.
>
> Regards,
>
> Michael.
>
> --
> mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]