Closed Bug 885574 Opened 11 years ago Closed 11 years ago

Remove duplicate constants for number of columns in Menu Panel

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: jaws, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:P5])

There are a couple places where we define a const kColumnsInMenuPanel = 3. We should move that to either a pref or some place where the constant can be shared.
Blocks: 880382
Whiteboard: [Australis:M?] → [Australis:M?][Australis:P5]
I forgot to close this, this is a constant on CustomizableUI.jsm now.

gkruitbosch-16516:customizableui gkruitbosch$ grep -ri 'column' *
src/CustomizableUI.jsm:  get PANEL_COLUMN_COUNT() 3,
src/CustomizeMode.jsm:    let orphanedItems = narrowItemsAfterWideItem % CustomizableUI.PANEL_COLUMN_COUNT;
src/CustomizeMode.jsm:    let placeholders = CustomizableUI.PANEL_COLUMN_COUNT - orphanedItems;
src/DragPositionManager.jsm:      this._heightToWidthFactor = CustomizableUI.PANEL_COLUMN_COUNT;
src/DragPositionManager.jsm:        hDiff /= CustomizableUI.PANEL_COLUMN_COUNT;
src/PanelWideWidgetTracker.jsm:  // wide widgets that could be filled up with single column widgets
src/PanelWideWidgetTracker.jsm:    // Make sure that there are n % columns = 0 narrow buttons before the widget.
src/PanelWideWidgetTracker.jsm:    if (fixedPos !== null || prevSiblingCount % CustomizableUI.PANEL_COLUMN_COUNT) {
src/PanelWideWidgetTracker.jsm:      let desiredChange = -(prevSiblingCount % CustomizableUI.PANEL_COLUMN_COUNT);
src/PanelWideWidgetTracker.jsm:        desiredChange = CustomizableUI.PANEL_COLUMN_COUNT + desiredChange + 1;


Fixed by bug 919965:

https://hg.mozilla.org/mozilla-central/rev/6c8dc8b0add4
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M?][Australis:P5] → [Australis:P5]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.