Toolbar Enhancements 0.15

Talk about add-ons and extension development.
Post Reply
User avatar
James
Moderator
Posts: 27999
Joined: June 18th, 2003, 3:07 pm
Location: Made in Canada

Post by James »

clav wrote: so why not all just downgrade to an older build for a while, until i figure out a solution ;)


riiiiiight... :p


Do you think you can fix it so it will work properly with recent builds?
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

clav wrote:for those who are interested, the cause of this bug (everything disappearing from toolbars at the left, right or bottom when you restart Fb) is that in current nightlies the toolbox elements are having their xbl bindings attached in the opposite order to the build i was originally testing on (20030831).

with current nightlies the new <toolbox/>es to support the toolbars at the side and left get constructed before the original navigator-toolbox, which breaks things, because they need to retrieve the palette of toolbar items from it. (and since they can't find the palette they can't clone the items in it to add to the custom toolbars as they are rebuild on startup)

so why not all just downgrade to an older build for a while, until i figure out a solution ;)
I catch the ;)

Thinking about the explanation, I am perplexed. Why reverse the order? What do the devs have in mind?

Edit: Hmmm. The calculator button causes the calculator to open in a sidebar. But when it does that, it opens in simple calculator mode. It does not open in scientific or RPN. Nor is there an option in the View menu to switch to one of those. Nor do the f7-f9 function keys work to produce the various features/views available.
Firefox: Sic transit gloria mundi.
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

ehume wrote:I catch the ;)

i like to make my posts accessible to all, rather than jsut other extension devs :)

Thinking about the explanation, I am perplexed. Why reverse the order? What do the devs have in mind?

i think bug 216721 is probably the cause of the change. it's the only thing that seemed relevant when looking at a bonsai query for the xbl/ dir for the last month.

Edit: Hmmm. The calculator button causes the calculator to open in a sidebar. But when it does that, it opens in simple calculator mode. It does not open in scientific or RPN. Nor is there an option in the View menu to switch to one of those. Nor do the f7-f9 function keys work to produce the various features/views available.

what is this calculator button you're talking about? it's not part of ToolbarExt


anyway, I've fixed the bug. new build to follow shortly, but it won't be compatible with old Fb nightlies, only very recent ones
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

v0.3: http://downloads.mozdev.org/clav/toolba ... ext0.3.xpi

should work with recent nighlies. no feature changes
jedbro
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.
Contact:

Post by jedbro »

clav wrote:v0.3: http://downloads.mozdev.org/clav/toolba ... ext0.3.xpi

should work with recent nighlies. no feature changes


Nice!! could you let us in on what you did to fix it? (might be helpfull for us authors in the future)
flatrabbit
Posts: 383
Joined: November 5th, 2002, 6:41 pm
Location: the land of kirk
Contact:

Post by flatrabbit »

Is there a better way to delete new toolbars other than just taking all the icons off? Or am I just missing something? I also notice that when I shut down Fb it removes the new icons from the new toolbar but leaves the bar there....
flatrabbit
-- A conscience does not prevent sin. It only prevents you from enjoying it.
‡ [ home | give | game ] ‡
User avatar
Paradox52525
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere
Contact:

Post by Paradox52525 »

Uhm...clav? I could be mistaken...but isn't "right" supposed to mean "the side your right hand is on?" Try adding a new toolbar on the "right" side and you'll see what I mean =P
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

clav wrote:
ehume wrote:Hmmm. The calculator button causes the calculator to open in a sidebar. But when it does that, it opens in simple calculator mode. It does not open in scientific or RPN. Nor is there an option in the View menu to switch to one of those. Nor do the f7-f9 function keys work to produce the various features/views available.

what is this calculator button you're talking about? it's not part of ToolbarExt
It's part of Mozcalc. I never noticed the button until I installed ToolbarEnhancements I assumed it was part of "TBE" ;-)

I'll build a new profile when I download today's FB build. The problem is probably with Mozcalc.

As for Toolbar Enhancement 0.3, it seems to be working fine. It goes really well with the latest Spheregnome theme.
Firefox: Sic transit gloria mundi.
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

Paradox52525 wrote:Uhm...clav? I could be mistaken...but isn't "right" supposed to mean "the side your right hand is on?" Try adding a new toolbar on the "right" side and you'll see what I mean =P

i see a toolbar on the right:
http://clav.mozdev.org/toolbarext/screenshot2.png

what do you see?
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

flatrabbit wrote:Is there a better way to delete new toolbars other than just taking all the icons off? Or am I just missing something?

not at the moment. could add it to the context menu, but i'm not convinced it's that useful.

I also notice that when I shut down Fb it removes the new icons from the new toolbar but leaves the bar there....

that's the bug that occured in recent nightlies which 0.3 fixes.
User avatar
Paradox52525
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere
Contact:

Post by Paradox52525 »

Strange...when I add a new toolbar on the left side, it appears on the right. When I add a new toolbar to the right it appears on the left. Possibly a conflict with another extension?
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

jedbro wrote:Nice!! could you let us in on what you did to fix it? (might be helpful for us authors in the future)


ok, but I don't think it will be very useful, because it's specific to how customisable toolbars work

in older builds, the toolbar elements (for the nav and bookmarks toolbar) were constructed before the toolboxes that contained them, so it was in their constructor that the |palette| field of the nav-toolbox was set. the extra toolboxes added by ToolbarExt were constructed after the nav-toolbox, and had a |palette| property, because it used a getter function to return the palette from the nav toolbox. (the setter function just threw an exception, because it wasn't needed).

in newer builds where the extra toolboxes are constructed first, followed by the nav-toolbox, followed by the toolbars it contains, this stops working, because the constructors for the new toolbox tries to build the custom toolbars it should contain, which requires retrieving the toolbar palette, which isn't available yet.

the solution I used was to have all <toolbox/> elements have a "palette" attribute in the xul file, which holds the id of the <toolbarpalette/> they want to use. in the toolbox constructor function the palette field (not attr) is accessed by looking up the palette id in a hashtable parameter of the document called |toolbarpalettes|. if it's not there then the palette is found by using getElementById, removed from the document (to avoid id conflicts later) and put into the hash. this means it doesn't matter which toolbox gets it's xbl binding attached first.

finding out what order xbl bindings are being attached I did by having all the constructor functions throw an exception at the end, including the element id. and that's something which might be of some use to other authors at some point
clav
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK
Contact:

Post by clav »

Paradox52525 wrote:Strange...when I add a new toolbar on the left side, it appears on the right. When I add a new toolbar to the right it appears on the left. Possibly a conflict with another extension?


maybe. could also be some css someone posted that makes the sidebar appear on the right, because that works by setting dir:rtl on the <hbox id="browser"/> which the extra toolboxes are overlayed into
User avatar
Paradox52525
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere
Contact:

Post by Paradox52525 »

Aha that does seem to be it. The userchrome.css tweak that puts the sidebar on the right is what causes that reversal.
sjrowland
Posts: 38
Joined: January 10th, 2003, 4:54 am

Re: Print button

Post by sjrowland »

clav wrote:
sjrowland wrote:2) Instead of hi-jacking the print button and making it a print preview button could you not give us another button for print preview which we could drag and drop from the customize menu. This would give people the option of print, print-preview or both.

i could, but i'm not going to. :p


Pity as despite the overall usefullness and general niceness of this extension the removal of the print button makes it a none starter for me. :(

But great work all the same. :)
Post Reply