Nautilus toolbars and Bonobo
- From: John Sullivan <sullivan eazel com>
- To: gnome-components-list <gnome-components-list gnome org>, nautilus <nautilus-list lists eazel com>
- Subject: Nautilus toolbars and Bonobo
- Date: Mon, 20 Mar 2000 16:09:26 -0800
I've been trying to convert Nautilus's toolbar to use Bonobo, so that
Nautilus component content viewers could merge items into it if appropriate.
I'm stuck on making Nautilus's Back and Forward buttons retain their current
behavior when Bonobo-ized. The current behavior is: left-click activates the
button as normal, right-click brings up a menu (on mouse down, not mouse
up). This right-click behavior is not supported directly. To achieve it with
the current Bonobo, I need to wrap my widget in a BonoboControl and put the
BonoboControl into the toolbar. But this approach causes (at least) two
other problems: (1) my widget's width is not set using the same algorithm as
all the "standard" toolbar buttons; it is given the minimum required width
instead, which looks unacceptably bad. (2) I can create my widget respecting
the user's toolbar style preferences, but my widget is not modified when
those preferences change the way it would be if it were a standard toolbar
button.
Nat believes that the GtkToolbar that Bonobo uses has many serious flaws
that require its replacement, and that it isn't worth trying to find
workaround for these types of problems since everything will change when the
toolbar code is replaced.
I see four avenues from here for the Nautilus toolbar and Bonobo:
(1) Don't Bonobo-ize the Nautilus toolbar at all for the first release of
Nautilus. This would mean that components can add entire toolbars, but they
cannot add individual toolbar items to the current toolbar.
(2) Add to Bonobo the ability to specify more callbacks for standard Bonobo
toolbar items than just the "clicked" one. Specifically, Nautilus would need
the ability to add a button_press_event callback. Then use this mechanism
for Nautilus's Back and Forward toolbar items.
(3) Spend the time required to rewrite GtkToolbar as necessary to fix all of
the trouble spots that Bonobo is having with it, then rework Bonobo's use of
it to match. This would have to either include the work in (2) or some other
sort of fixes to the non-standard-toolbar-item issues I mentioned above.
(4) Wait until some unspecified other person has done (3) and only then try
to use Bonobo for Nautilus's toolbar.
Given the fact that we've not yet had any instance of a component that
wanted to merge a toolbar item with Nautilus's toolbar, and given the amount
of work to be done in Nautilus before first ship, I'm strongly against
pursuing option (3) myself. I'm also not sure how easily option (2) can be
done without a lot of hackery, though I suspect it's not too hard. (4) is of
course always a possibility, but we have to assume that it's equivalent to
(1).
My current opinion is to do (2) if Nat thinks it's OK, or otherwise (1). I
would love to hear other opinions on this matter. If I don't get any
responses in a few days, I'll assume nobody else cares, in which case I'll
just go with solution (1).
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]