Closed Bug 407899 Opened 17 years ago Closed 16 years ago

SeaMonkey would like separate default modes/iconsizes for each toolbar

Categories

(Toolkit :: Toolbars and Toolbar Customization, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(1 file, 1 obsolete file)

I am working on customizable toolbars for SeaMonkey in Bug 394288 . One problem we have is that we would like different defaults for certain toolbars e.g. small icons for the Personal toolbar but large icons for the Navigation toolbar. This problem crops up when you click on the "Restore default set" button in the Customize Toolbar window.

This patch allows each toolbar to have default mode/iconsize which is different from that set on the toolbox.

Tested on:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007121009 Minefield/3.0b2pre

Note this patch does not affect how Firefox behaves at the moment, but if the Firefox developers want, they can take advantage of this patch by setting the following attributes on individual customizable toolbars: "defaultmode" and "defaulticonsize".

(No approvalM11 flag available so using M10)
Flags: blocking1.9?
Attachment #292588 - Flags: review?(mano)
Attachment #292588 - Flags: approvalM10?
Attachment #292588 - Flags: approvalM10?
Not a blocker, likely would take patch.
Flags: wanted1.9+
Flags: blocking1.9?
Flags: blocking1.9-
Priority: -- → P4
Blocks: 172517
I guess this could make the migration of the Firefox home button from main to bookmarks toolbar easier as well, as you probably have different button sizes at play in this case...
Yeah, they are using some hacky combination of CSS and javascript to change the home-button when it moves to/from the personal toolbar.
Comment on attachment 292588 [details] [diff] [review]
Patch 1.0 Each toolbar can have defaults different from that of the toolbox

>Index: toolkit/content/customizeToolbar.js

>+function updateIconSize(aUseSmallIcons, localDefault)

>+      var toolbarIconSize = localDefault && toolbar.hasAttribute("defaulticonsize") ?
>+                            toolbar.getAttribute("defaulticonsize") :
>+                            gToolboxIconSize;

>+function updateToolbarMode(aModeValue, localDefault)

>+      var toolbarMode = localDefault && toolbar.hasAttribute("defaultmode") ?
>+                        toolbar.getAttribute("defaultmode") :
>+                        aModeValue;

nit: Can you add parentheses so that I don't have to remember that && takes precedence over "?:" ?
Attachment #292588 - Flags: review?(mano) → review+
Fixed nits carrying forward r+
Attachment #292588 - Attachment is obsolete: true
Attachment #300847 - Flags: review+
Attachment #300847 - Flags: approval1.9b3?
Attachment #300847 - Flags: approval1.9?
Attachment #300847 - Attachment description: Patch 1.0 Nits fixed carrying forward r+ → Patch 1.1 Nits fixed carrying forward r+
Comment on attachment 300847 [details] [diff] [review]
Patch 1.1 Nits fixed carrying forward r+

Don't see the need to get this for beta 3. It can land when the tree re-opens for a1.9 checkins.
Attachment #300847 - Flags: approval1.9b3?
Attachment #300847 - Flags: approval1.9b3-
Attachment #300847 - Flags: approval1.9?
Attachment #300847 - Flags: approval1.9+
Version: unspecified → Trunk
Keywords: checkin-needed
Checking in toolkit/content/customizeToolbar.js;
/cvsroot/mozilla/toolkit/content/customizeToolbar.js,v  <--  customizeToolbar.js
new revision: 1.43; previous revision: 1.42
done
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: mozilla1.9beta3 → mozilla1.9beta4
Blocks: 417924
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: