Skip to content

Commit

Permalink
Inverting sort button, fixing void storage loading issues
Browse files Browse the repository at this point in the history
  • Loading branch information
João Cardoso committed Mar 5, 2015
1 parent 8b0fba8 commit a283d7f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Bagnon.toc
Expand Up @@ -5,7 +5,7 @@
## SavedVariables: Bagnon_Sets

## OptionalDeps: BagBrother, ItemRack, Wardrobe, WoWUnit
## Version: 6.1.4
## Version: 6.1.5

libs\libs.xml

Expand Down
8 changes: 8 additions & 0 deletions Changelog.txt
@@ -1,3 +1,11 @@
====== 6.1.5
* Void Storage:
** Fixed issue affecting some users that caused the frame to require being open twice to appear.
** Fixed issue causing frame to appear empty on first appearance.
** Fixed issue preventing control click items to preview them.
* Flipped clean up button behaviour back to what it was before patch 6.1.
* Updated chinese locales.

====== 6.1.4
* Fixed issue with the "Display Blizzard Bags" feature.
* Last version appears to be a success. Applied same process to Vault and Guild Bank.
Expand Down
2 changes: 1 addition & 1 deletion common
10 changes: 4 additions & 6 deletions components/sortButton.lua
Expand Up @@ -54,14 +54,12 @@ function SortButton:OnClick(button)
if button == 'RightButton' then
if isBank then
DepositReagentBank()
SortReagentBankBags()
SortBankBags()
end
elseif isBank then
--SetSortBagsRightToLeft(false)
SortReagentBankBags()
SortBankBags()
DepositReagentBank()
else
--SetSortBagsRightToLeft(false)
SortBags()
end
end
Expand All @@ -72,8 +70,8 @@ function SortButton:OnEnter()
local frameID = self:GetParent().frameID
if frameID == 'bank' then
GameTooltip:SetText(L.TipManageBank)
GameTooltip:AddLine(L.TipCleanBank, 1,1,1)
GameTooltip:AddLine(L.TipDepositReagents, 1,1,1)
GameTooltip:AddLine(L.TipCleanBank, 1,1,1)
else
GameTooltip:SetText(L.TipCleanBags)
end
Expand Down
27 changes: 15 additions & 12 deletions main.lua
Expand Up @@ -25,11 +25,22 @@ function Addon:OnEnable()
self:AddSlashCommands()
self:CreateFrame('inventory')
self:CreateFrameLoader(ADDON .. '_GuildBank', 'GuildBankFrame_LoadUI')
self:CreateFrameLoader(ADDON .. '_VoidStorage', 'VoidStorage_LoadUI')
self:CreateFrameLoader('GuildBank', 'GuildBankFrame_LoadUI')
self:CreateFrameLoader('VoidStorage', 'VoidStorage_LoadUI')
self:CreateOptionsLoader()
end
function Addon:CreateFrameLoader(module, method)
local addon = ADDON .. '_' .. module
if GetAddOnEnableState(UnitName('player'), addon) >= 2 then
_G[method] = function()
if LoadAddOn(addon) then
self:GetModule(module):OnOpen()
end
end
end
end
function Addon:CreateOptionsLoader()
local f = CreateFrame('Frame', nil, InterfaceOptionsFrame)
f:SetScript('OnShow', function(self)
Expand All @@ -38,14 +49,6 @@ function Addon:CreateOptionsLoader()
end)
end
function Addon:CreateFrameLoader(addon, method)
if GetAddOnEnableState(UnitName('player'), addon) >= 2 then
_G[method] = function()
LoadAddOn(addon)
end
end
end
--[[ Bags ]]--
Expand Down Expand Up @@ -104,8 +107,8 @@ end
function Addon:CreateFrame(id)
if self:IsFrameEnabled(id) then
self.frames[id] = self.frames[id] or self[id:gsub('^.', id.upper) .. 'Frame']:New(id)
return self.frames[id]
end
return self.frames[id]
end
function Addon:IsFrameShown(id)
Expand Down Expand Up @@ -298,7 +301,7 @@ function Addon:HandleSlashCommand(cmd)
self:ToggleFrame('bank')
elseif cmd == 'bags' or cmd == 'inventory' then
self:ToggleFrame('inventory')
elseif cmd == 'guild' and LoadAddOn('Bagnon_GuildBaank')then
elseif cmd == 'guild' and LoadAddOn('Bagnon_GuildBank')then
self:ToggleFrame('guild')
elseif cmd == 'vault' and LoadAddOn('Bagnon_VoidStorage') then
self:ToggleFrame('vault')
Expand Down

0 comments on commit a283d7f

Please sign in to comment.