1038 - [Feature Request] Launcher click toggles Button Lock
It's a little inconvenient to right-click on the Bartender4 launcher icon to open the options panel, toggle the Lock Button option, then close the options panel. It'd be very handy if you could have the launcher toggle button lock with one click.
As an example, I added this to make Shift/Ctrl/Alt-Left-Click do it in my copy:
$ diff -b -c Bartender4.lua.4.5.8.original Bartender4.lua.4.5.8.patched *** Bartender4.lua.4.5.8.original 2013-01-05 19:33:04.680753358 -0600 --- Bartender4.lua.4.5.8.patched 2013-01-05 19:30:51.172751878 -0600 *************** *** 465,475 **** --- 465,482 ---- label = "Bartender4", OnClick = function(_, msg) if msg == "LeftButton" then + if IsModifierKeyDown() then + local value = not Bartender4.db.profile.buttonlock + print("Bartender4 button lock " .. (value and "on" or "off")) + Bartender4.db.profile.buttonlock = value + Bartender4.Bar:ForAll("ForAll", "SetAttribute", "buttonlock", value) + else if Bartender4.Locked then Bartender4["Unlock"](Bartender4) else Bartender4["Lock"](Bartender4) end + end elseif msg == "RightButton" then if LibStub("AceConfigDialog-3.0").OpenFrames["Bartender4"] then LibStub("AceConfigDialog-3.0"):Close("Bartender4") *************** *** 483,488 **** --- 490,496 ---- if not tooltip or not tooltip.AddLine then return end tooltip:AddLine("Bartender4") tooltip:AddLine(L_BT_LEFT) + tooltip:AddLine("|cffffff00Modified-Click|r to toggle button lock") tooltip:AddLine(L_BT_RIGHT) end, }) $
FWIW, MiddleButton would be my preference for this, but I'm not sure all platforms (e.g. Macs) have middle buttons, so I went with any modifier key down.
Thanks for a great addon!
-Foam
| User | When | Change |
|---|---|---|
| Foam-Head | Jan 06, 2013 at 01:42 UTC | Create |
Facts
- Reported
- Jan 06, 2013
- Status
- New - Issue has not had initial review yet.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Votes
- 0