WoWInterface SVN Plink

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc File deleted \ No newline at end of file
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua New file
0,0 → 1,83
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Font_Item_Select"
local widgetVersion = 1
 
local function SetText(self, text)
if text and text ~= '' then
local _, size, outline= self.text:GetFont()
self.text:SetFont(Media:Fetch('font',text),size,outline)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
return self
end
 
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Font"
local widgetVersion = 2
 
local function SetText(self, text)
if text and text ~= '' then
local _, size, outline= self.text:GetFont()
self.text:SetFont(Media:Fetch('font',text),size,outline)
end
self.text:SetText(text or "")
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Font_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local sortlist = {}
local function SetList(self, list)
self.list = list or Media:HashTable("font")
self.pullout:Clear()
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
if self.multiselect then
AddCloseButton()
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetText = SetText
self.SetValue = AceGUISharedMediaWidgets.SetValue
self.SetList = SetList
return self
end
 
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
Property changes : Added: svn:eol-style + native Added: svn:mime-type + text/plain
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua New file
0,0 → 1,263
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Sound_Item_Select"
local widgetVersion = 1
 
local function Frame_OnEnter(this)
local self = this.obj
 
if self.useHighlight then
self.highlight:Show()
end
self:Fire("OnEnter")
 
if self.specialOnEnter then
self.specialOnEnter(self)
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
 
self.highlight:Hide()
self:Fire("OnLeave")
 
if self.specialOnLeave then
self.specialOnLeave(self)
end
end
 
local function OnAcquire(self)
self.frame:SetToplevel(true)
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
end
 
local function OnRelease(self)
self.pullout = nil
self.frame:SetParent(nil)
self.frame:ClearAllPoints()
self.frame:Hide()
end
 
local function SetPullout(self, pullout)
self.pullout = pullout
 
self.frame:SetParent(nil)
self.frame:SetParent(pullout.itemFrame)
self.parent = pullout.itemFrame
fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
end
 
local function SetText(self, text)
self.sound = text or ''
self.text:SetText(text or "")
end
 
local function GetText(self)
return self.text:GetText()
end
 
local function SetPoint(self, ...)
self.frame:SetPoint(...)
end
 
local function Show(self)
self.frame:Show()
end
 
local function Hide(self)
self.frame:Hide()
end
 
local function SetDisabled(self, disabled)
self.disabled = disabled
if disabled then
self.useHighlight = false
self.text:SetTextColor(.5, .5, .5)
else
self.useHighlight = true
self.text:SetTextColor(1, 1, 1)
end
end
 
local function SetOnLeave(self, func)
self.specialOnLeave = func
end
 
local function SetOnEnter(self, func)
self.specialOnEnter = func
end
 
local function UpdateToggle(self)
if self.value then
self.check:Show()
else
self.check:Hide()
end
end
 
local function Frame_OnClick(this, button)
local self = this.obj
self.value = not self.value
UpdateToggle(self)
self:Fire("OnValueChanged", self.value)
end
 
local function Speaker_OnClick(this, button)
local self = this.obj
PlaySoundFile(Media:Fetch('sound',self.sound))
end
 
local function SetValue(self, value)
self.value = value
UpdateToggle(self)
end
 
local function Constructor()
local count = AceGUI:GetNextWidgetNum(type)
local frame = CreateFrame("Frame", "LSM30_Sound_DropDownItem"..count)
local self = {}
self.frame = frame
frame.obj = self
self.type = type
 
self.useHighlight = true
 
frame:SetHeight(17)
frame:SetFrameStrata("FULLSCREEN_DIALOG")
 
local button = CreateFrame("Button", nil, frame)
button:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-22,0)
button:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
self.button = button
button.obj = self
 
local speakerbutton = CreateFrame("Button", nil, frame)
speakerbutton:SetWidth(16)
speakerbutton:SetHeight(16)
speakerbutton:SetPoint("RIGHT",frame,"RIGHT",-6,0)
self.speakerbutton = speakerbutton
speakerbutton.obj = self
 
local speaker = frame:CreateTexture(nil, "BACKGROUND")
speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
speaker:SetAllPoints(speakerbutton)
self.speaker = speaker
 
local speakeron = speakerbutton:CreateTexture(nil, "HIGHLIGHT")
speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
speakeron:SetAllPoints(speakerbutton)
self.speakeron = speakeron
 
local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
text:SetTextColor(1,1,1)
text:SetJustifyH("LEFT")
text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0)
text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-24,0)
self.text = text
 
local highlight = button:CreateTexture(nil, "OVERLAY")
highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
highlight:SetBlendMode("ADD")
highlight:SetHeight(14)
highlight:ClearAllPoints()
highlight:SetPoint("RIGHT",frame,"RIGHT",-19,0)
highlight:SetPoint("LEFT",frame,"LEFT",5,0)
highlight:Hide()
self.highlight = highlight
 
local check = frame:CreateTexture("OVERLAY")
check:SetWidth(16)
check:SetHeight(16)
check:SetPoint("LEFT",frame,"LEFT",3,-1)
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
check:Hide()
self.check = check
 
local sub = frame:CreateTexture("OVERLAY")
sub:SetWidth(16)
sub:SetHeight(16)
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow")
sub:Hide()
self.sub = sub
 
button:SetScript("OnEnter", Frame_OnEnter)
button:SetScript("OnLeave", Frame_OnLeave)
 
self.OnAcquire = OnAcquire
self.OnRelease = OnRelease
 
self.SetPullout = SetPullout
self.GetText = GetText
self.SetText = SetText
self.SetDisabled = SetDisabled
 
self.SetPoint = SetPoint
self.Show = Show
self.Hide = Hide
 
self.SetOnLeave = SetOnLeave
self.SetOnEnter = SetOnEnter
 
self.button:SetScript("OnClick", Frame_OnClick)
self.speakerbutton:SetScript("OnClick", Speaker_OnClick)
 
self.SetValue = SetValue
 
AceGUI:RegisterAsWidget(self)
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Sound"
local widgetVersion = 2
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Sound_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local sortlist = {}
local function SetList(self, list)
self.list = list or Media:HashTable("sound")
self.pullout:Clear()
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
if self.multiselect then
AddCloseButton()
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetList = SetList
self.SetValue = AceGUISharedMediaWidgets.SetValue
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
Property changes : Added: svn:mime-type + text/plain Added: svn:eol-style + native
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua New file
0,0 → 1,95
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Statusbar_Item_Select"
local widgetVersion = 1
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('statusbar',text))
self.texture:SetVertexColor(.5,.5,.5)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
local texture = self.frame:CreateTexture(nil, "BACKGROUND")
texture:SetTexture(0,0,0,0)
texture:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",-4,1)
texture:SetPoint("TOPLEFT",self.frame,"TOPLEFT",6,-1)
self.texture = texture
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Statusbar"
local widgetVersion = 2
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('statusbar',text))
self.texture:SetVertexColor(.5,.5,.5)
end
self.text:SetText(text or "")
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Statusbar_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local sortlist = {}
local function SetList(self, list)
self.list = list or Media:HashTable("statusbar")
self.pullout:Clear()
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
if self.multiselect then
AddCloseButton()
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetText = SetText
self.SetList = SetList
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local left = _G[self.dropdown:GetName() .. "Left"]
local middle = _G[self.dropdown:GetName() .. "Middle"]
local right = _G[self.dropdown:GetName() .. "Right"]
 
local texture = self.dropdown:CreateTexture(nil, "ARTWORK")
texture:SetPoint("BOTTOMRIGHT", right, "BOTTOMRIGHT" ,-39, 26)
texture:SetPoint("TOPLEFT", left, "TOPLEFT", 24, -24)
self.texture = texture
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
Property changes : Added: svn:mime-type + text/plain Added: svn:eol-style + native
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua New file
0,0 → 1,55
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
LoadAddOn("LibSharedMedia-3.0")
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
AceGUISharedMediaWidgets = {}
do
AceGUIWidgetLSMlists = {
['font'] = Media:HashTable("font"),
['sound'] = Media:HashTable("sound"),
['statusbar'] = Media:HashTable("statusbar"),
['border'] = Media:HashTable("border"),
['background'] = Media:HashTable("background"),
}
 
local min, max, floor = math.min, math.max, math.floor
 
local function fixlevels(parent,...)
local i = 1
local child = select(i, ...)
while child do
child:SetFrameLevel(parent:GetFrameLevel()+1)
fixlevels(child, child:GetChildren())
i = i + 1
child = select(i, ...)
end
end
 
local function OnItemValueChanged(this, event, checked)
local self = this.userdata.obj
if self.multiselect then
self:Fire("OnValueChanged", this.userdata.value, checked)
else
if checked then
self:SetValue(this.userdata.value)
self:Fire("OnValueChanged", this.userdata.value)
else
this:SetValue(true)
end
self.pullout:Close()
end
end
 
local function SetValue(self, value)
if value then
self:SetText(value or "")
end
self.value = value
end
 
AceGUISharedMediaWidgets.fixlevels = fixlevels
AceGUISharedMediaWidgets.OnItemValueChanged = OnItemValueChanged
AceGUISharedMediaWidgets.SetValue = SetValue
end
Property changes : Added: svn:mime-type + text/plain Added: svn:eol-style + native
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua New file
0,0 → 1,153
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Border_Item_Select"
local widgetVersion = 1
 
local function Frame_OnEnter(this)
local self = this.obj
 
if self.useHighlight then
self.highlight:Show()
self.border:Show()
end
self:Fire("OnEnter")
 
if self.specialOnEnter then
self.specialOnEnter(self)
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.border:Hide()
self.highlight:Hide()
self:Fire("OnLeave")
 
if self.specialOnLeave then
self.specialOnLeave(self)
end
end
 
local function SetText(self, text)
if text and text ~= '' then
local backdropTable = self.border:GetBackdrop()
backdropTable.edgeFile = Media:Fetch('border',text)
self.border:SetBackdrop(backdropTable)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
local border = CreateFrame('Frame')
border:SetFrameStrata("TOOLTIP")
border:SetWidth(64)
border:SetHeight(32)
border:SetPoint("LEFT",self.frame,"RIGHT",5,0)
border:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
self.border = border
border:Hide()
self.frame:SetScript("OnEnter", Frame_OnEnter)
self.frame:SetScript("OnLeave", Frame_OnLeave)
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Border"
local widgetVersion = 2
 
local function Frame_OnEnter(this)
local self = this.obj
local text = self.text:GetText()
if text ~= nil and text ~= '' then
self.borderframe:Show()
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.borderframe:Hide()
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Border_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local sortlist = {}
local function SetList(self, list)
self.list = list or Media:HashTable("border")
self.pullout:Clear()
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
if self.multiselect then
AddCloseButton()
end
end
 
local function SetText(self, text)
if text and text ~= '' then
local backdropTable = self.borderframe:GetBackdrop()
backdropTable.edgeFile = Media:Fetch('border',text)
self.borderframe:SetBackdrop(backdropTable)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetList = SetList
self.SetText = SetText
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local left = _G[self.dropdown:GetName() .. "Left"]
local middle = _G[self.dropdown:GetName() .. "Middle"]
local right = _G[self.dropdown:GetName() .. "Right"]
 
local borderframe = CreateFrame('Frame')
borderframe:SetFrameStrata("TOOLTIP")
borderframe:SetWidth(64)
borderframe:SetHeight(32)
borderframe:SetPoint("LEFT",right,"RIGHT",-15,0)
borderframe:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
self.borderframe = borderframe
borderframe:Hide()
 
self.dropdown:EnableMouse(true)
self.dropdown:SetScript("OnEnter", Frame_OnEnter)
self.dropdown:SetScript("OnLeave", Frame_OnLeave)
 
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
Property changes : Added: svn:mime-type + text/plain Added: svn:eol-style + native
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
1,4 → 1,9
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Include file="AceGUI-3.0-SharedMediaWidgets\widget.xml" />
<Script file="SharedFunctions.lua" />
<Script file="FontWidget.lua" />
<Script file="SoundWidget.lua" />
<Script file="StatusbarWidget.lua" />
<Script file="BorderWidget.lua" />
<Script file="BackgroundWidget.lua" />
</Ui>
\ No newline at end of file
trunk/Plink!/Libs/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua New file
0,0 → 1,151
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Background_Item_Select"
local widgetVersion = 1
 
local function Frame_OnEnter(this)
local self = this.obj
 
if self.useHighlight then
self.highlight:Show()
self.texture:Show()
end
self:Fire("OnEnter")
 
if self.specialOnEnter then
self.specialOnEnter(self)
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.texture:Hide()
self.highlight:Hide()
self:Fire("OnLeave")
 
if self.specialOnLeave then
self.specialOnLeave(self)
end
end
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('background',text))
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
local textureframe = CreateFrame('Frame')
textureframe:SetFrameStrata("TOOLTIP")
textureframe:SetWidth(128)
textureframe:SetHeight(128)
textureframe:SetPoint("LEFT",self.frame,"RIGHT",5,0)
self.textureframe = textureframe
local texture = textureframe:CreateTexture(nil, "OVERLAY")
texture:SetTexture(0,0,0,0)
texture:SetAllPoints(textureframe)
texture:Hide()
self.texture = texture
self.frame:SetScript("OnEnter", Frame_OnEnter)
self.frame:SetScript("OnLeave", Frame_OnLeave)
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Background"
local widgetVersion = 2
 
local function Frame_OnEnter(this)
local self = this.obj
local text = self.text:GetText()
if text ~= nil and text ~= '' then
self.textureframe:Show()
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.textureframe:Hide()
end
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('background',text))
end
self.text:SetText(text or "")
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Background_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local sortlist = {}
local function SetList(self, list)
self.list = list or Media:HashTable("background")
self.pullout:Clear()
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
if self.multiselect then
AddCloseButton()
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetText = SetText
self.SetList = SetList
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local left = _G[self.dropdown:GetName() .. "Left"]
local middle = _G[self.dropdown:GetName() .. "Middle"]
local right = _G[self.dropdown:GetName() .. "Right"]
 
local textureframe = CreateFrame('Frame')
textureframe:SetFrameStrata("TOOLTIP")
textureframe:SetWidth(128)
textureframe:SetHeight(128)
textureframe:SetPoint("LEFT",right,"RIGHT",-15,0)
self.textureframe = textureframe
local texture = textureframe:CreateTexture(nil, "OVERLAY")
texture:SetTexture(0,0,0,0)
texture:SetAllPoints(textureframe)
textureframe:Hide()
self.texture = texture
 
self.dropdown:EnableMouse(true)
self.dropdown:SetScript("OnEnter", Frame_OnEnter)
self.dropdown:SetScript("OnLeave", Frame_OnLeave)
 
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
Property changes : Added: svn:eol-style + native Added: svn:mime-type + text/plain
trunk/Plink!/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
1,4 → 1,4
--[[ $Id: CallbackHandler-1.0.lua 60697 2008-02-09 16:51:20Z nevcairiel $ ]]
--[[ $Id: CallbackHandler-1.0.lua 504 2008-02-07 11:04:06Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 3
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
 
trunk/Plink!/Libs/AceEvent-3.0/AceEvent-3.0.lua
1,4 → 1,4
--[[ $Id: AceEvent-3.0.lua 60131 2008-02-03 13:03:56Z nevcairiel $ ]]
--[[ $Id: AceEvent-3.0.lua 494 2008-02-03 13:03:56Z nevcairiel $ ]]
local MAJOR, MINOR = "AceEvent-3.0", 3
local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)
 
trunk/Plink!/Libs/AceConsole-3.0/AceConsole-3.0.lua
1,4 → 1,4
--[[ $Id: AceConsole-3.0.lua 74633 2008-05-21 08:20:50Z nevcairiel $ ]]
--[[ $Id: AceConsole-3.0.lua 629 2008-04-22 08:26:12Z ammo $ ]]
local MAJOR,MINOR = "AceConsole-3.0", 6
 
local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
trunk/Plink!/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 679 2008-09-06 12:51:18Z nargiddley $ ]]--
local min, max, floor = math.min, math.max, math.floor
 
local AceGUI = LibStub("AceGUI-3.0")
344,7 → 344,7
 
do
local widgetType = "Dropdown"
local widgetVersion = 17
local widgetVersion = 18
 
--[[ Static data ]]--
 
359,7 → 359,10
end
 
local function Dropdown_OnHide(this)
this.obj.pullout:Close()
local self = this.obj
if self.open then
self.pullout:Close()
end
end
 
local function Dropdown_TogglePullout(this)
423,8 → 426,10
self:Fire("OnValueChanged", this.userdata.value)
else
this:SetValue(true)
end
self.pullout:Close()
end
if self.open then
self.pullout:Close()
end
end
end
 
443,7 → 448,9
 
-- exported, AceGUI callback
local function OnRelease(self)
self.pullout:Close()
if self.open then
self.pullout:Close()
end
AceGUI:Release(self.pullout)
 
self:SetText("")
476,7 → 483,9
 
-- exported
local function ClearFocus(self)
self.pullout:Close()
if self.open then
self.pullout:Close()
end
end
 
-- exported
553,6 → 562,7
self.list = list
self.pullout:Clear()
self.hasClose = nil
if not list then return end
 
for v in pairs(list) do
sortlist[#sortlist + 1] = v
trunk/Plink!/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 656 2008-05-31 11:47:08Z nargiddley $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
trunk/Plink!/Libs/AceGUI-3.0/widgets/AceGUIWidget-TreeGroup.lua
27,7 → 27,7
 
do
local Type = "TreeGroup"
local Version = 13
local Version = 16
 
local DEFAULT_TREE_WIDTH = 175
local DEFAULT_TREE_SIZABLE = true
143,7 → 143,7
 
local buttoncount = 1
local function CreateButton(self)
local button = CreateFrame("Button",("AceGUI30TreeButton%d"):format(buttoncount),self.treeframe, "InterfaceOptionsButtonTemplate")
local button = CreateFrame("Button",("AceGUI30TreeButton%d"):format(buttoncount),self.treeframe, "OptionsListButtonTemplate")
buttoncount = buttoncount + 1
button.obj = self
 
183,11 → 183,11
local line = button.line
button.level = level
if ( level == 1 ) then
button:SetTextFontObject("GameFontNormal")
button:SetNormalFontObject("GameFontNormal")
button:SetHighlightFontObject("GameFontHighlight")
button.text:SetPoint("LEFT", 8, 2)
else
button:SetTextFontObject("GameFontHighlightSmall")
button:SetNormalFontObject("GameFontHighlightSmall")
button:SetHighlightFontObject("GameFontHighlightSmall")
button.text:SetPoint("LEFT", 8 * level, 2)
end
287,7 → 287,9
}
]]
local function SetTree(self, tree)
assert(type(tree) == "table")
if tree then
assert(type(tree) == "table")
end
self.tree = tree
self:RefreshTree()
end
335,31 → 337,30
end
 
local function RefreshTree(self)
if not self.tree then return end
--Build the list of visible entries from the tree and status tables
local status = self.status or self.localstatus
local groupstatus = status.groups
local tree = self.tree
local buttons = self.buttons
local lines = self.lines
local buttons = self.buttons
 
local treeframe = self.treeframe
 
 
for i, v in ipairs(buttons) do
v:Hide()
end
while lines[1] do
local t = tremove(lines)
for k in pairs(t) do
t[k] = nil
end
del(t)
end
end
 
if not self.tree then return end
--Build the list of visible entries from the tree and status tables
local status = self.status or self.localstatus
local groupstatus = status.groups
local tree = self.tree
 
local treeframe = self.treeframe
 
self:BuildLevel(tree, 1)
 
for i, v in ipairs(buttons) do
v:Hide()
end
 
local numlines = #lines
 
local maxlines = (math.floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
471,11 → 472,10
end
 
local function OnWidthSet(self, width)
 
local content = self.content
local treeframe = self.treeframe
local status = self.status or self.localstatus
 
 
local contentwidth = width - status.treewidth - 20
if contentwidth < 0 then
contentwidth = 0
516,26 → 516,26
end
end
 
local function SetTreeWidth(self, treewidth, resizable)
if not resizable then
if type(treewidth) == 'number' then
resizable = false
elseif type(treewidth) == 'boolean' then
resizable = treewidth
treewidth = DEFAULT_TREE_WIDTH
else
resizable = false
treewidth = DEFAULT_TREE_WIDTH
end
end
self.treeframe:SetWidth(treewidth)
local function SetTreeWidth(self, treewidth, resizable)
if not resizable then
if type(treewidth) == 'number' then
resizable = false
elseif type(treewidth) == 'boolean' then
resizable = treewidth
treewidth = DEFAULT_TREE_WIDTH
else
resizable = false
treewidth = DEFAULT_TREE_WIDTH
end
end
self.treeframe:SetWidth(treewidth)
self.dragger:EnableMouse(resizable)
 
local status = self.status or self.localstatus
status.treewidth = treewidth
status.treesizable = resizable
end
 
status.treewidth = treewidth
status.treesizable = resizable
end
 
local function draggerLeave(this)
this:SetBackdropColor(1, 1, 1, 0)
end
560,10 → 560,10
treeframe:SetHeight(0)
treeframe:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
treeframe:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
 
local status = self.status or self.localstatus
status.treewidth = treeframe:GetWidth()
treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
 
local status = self.status or self.localstatus
status.treewidth = treeframe:GetWidth()
end
 
local createdcount = 0
592,7 → 592,7
treeframe:SetBackdropColor(0.1,0.1,0.1,0.5)
treeframe:SetBackdropBorderColor(0.4,0.4,0.4)
 
treeframe:SetResizable(true)
treeframe:SetResizable(true)
treeframe:SetMinResize(100, 1)
treeframe:SetMaxResize(400,1600)
local dragger = CreateFrame("Frame", nil, treeframe)
606,13 → 606,13
dragger:SetScript("OnEnter", draggerEnter)
dragger:SetScript("OnLeave", draggerLeave)
 
self.dragger = dragger
self.dragger = dragger
self.treeframe = treeframe
self.OnRelease = OnRelease
self.OnAcquire = OnAcquire
 
self.SetTree = SetTree
self.SetTreeWidth = SetTreeWidth
self.SetTreeWidth = SetTreeWidth
self.RefreshTree = RefreshTree
self.SetStatusTable = SetStatusTable
self.BuildLevel = BuildLevel
trunk/Plink!/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
29,7 → 29,7
 
local AceGUI = LibStub("AceGUI-3.0")
 
local Version = 6
local Version = 7
---------------------
-- Common Elements --
---------------------
120,11 → 120,15
self.disabled = disabled
if disabled then
self.editbox:EnableMouse(false)
self.scrollframe:EnableMouse(false)
self.editbox:ClearFocus()
self.editbox:SetTextColor(0.5, 0.5, 0.5)
self.label:SetTextColor(0.5,0.5,0.5)
else
self.editbox:EnableMouse(true)
self.scrollframe:EnableMouse(true)
self.editbox:SetTextColor(1, 1, 1)
self.label:SetTextColor(1,.82,0)
end
end
 
187,15 → 191,16
scrollframe:SetPoint("TOPLEFT", 5, -6)
scrollframe:SetPoint("BOTTOMRIGHT", -28, 6)
scrollframe.obj = self
self.scrollframe = scrollframe
 
local scrollchild = CreateFrame("Frame", nil, scrollframe)
scrollframe:SetScrollChild(scrollchild)
scrollchild:SetHeight(2)
scrollchild:SetWidth(2)
 
local label = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
label:SetPoint("TOPLEFT",frame,"TOPLEFT",14,0)
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",-14,0)
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,-2)
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,-2)
label:SetJustifyH("LEFT")
label:SetHeight(18)
self.label = label
trunk/Plink!/Libs/AceGUI-3.0/widgets/AceGUIWidget-TabGroup.lua
30,7 → 30,7
 
do
local Type = "TabGroup"
local Version = 14
local Version = 15
 
local PaneBackdrop = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
55,7 → 55,7
 
local function Tab_SetText(self, text)
self:_SetText(text)
PanelTemplates_TabResize(0, self)
PanelTemplates_TabResize(self, 0)
end
 
local function UpdateTabLook(self)
238,8 → 238,8
--equal padding for each tab to fill the available width
local padding = (width - rowwidths[row]) / (endtab - starttab+1)
for i = starttab, endtab do
PanelTemplates_TabResize(padding, tabs[i])
end
PanelTemplates_TabResize(tabs[i], padding)
end
starttab = endtab + 1
end
 
trunk/Plink!/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
3,9 → 3,10
--------------------------
-- Keybinding --
--------------------------
 
do
local Type = "Keybinding"
local Version = 8
local Version = 11
 
local ControlBackdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
73,14 → 74,15
end
end
 
this:EnableKeyboard(false)
self.msgframe:Hide()
this:UnlockHighlight()
self.waitingForKey = nil
 
if not self.disabled then
self:SetKey(keyPressed)
self:Fire("OnKeyChanged",keyPressed)
end
 
this:EnableKeyboard(false)
self.msgframe:Hide()
this:UnlockHighlight()
self.waitingForKey = nil
end
end
 
98,6 → 100,8
end
 
local function OnAcquire(self)
self:SetLabel("")
self:SetKey("")
end
 
local function OnRelease(self)
119,14 → 123,26
end
 
local function SetKey(self, key)
self.button:SetText(key or "")
if (key or "") == "" then
self.button:SetText(NOT_BOUND)
self.button:SetNormalFontObject("GameFontNormal")
else
self.button:SetText(key)
self.button:SetNormalFontObject("GameFontHighlight")
end
end
 
local function SetLabel(self, label)
self.label:SetText(label or "")
if (label or "") == "" then
self.alignoffset = nil
self:SetHeight(24)
else
self.alignoffset = 30
self:SetHeight(44)
end
end
 
 
local function Constructor()
local num = AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Frame",nil,UIParent)
trunk/Plink!/Libs/AceGUI-3.0/AceGUI-3.0.lua
1,10 → 1,10
--[[ $Id: AceGUI-3.0.lua 74633 2008-05-21 08:20:50Z nevcairiel $ ]]
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 13
--[[ $Id: AceGUI-3.0.lua 681 2008-09-06 13:01:59Z nargiddley $ ]]
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 16
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
 
local con = LibStub("AceConsole-3.0",true)
--local con = LibStub("AceConsole-3.0",true)
 
AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
99,6 → 99,12
if not objPools[type] then
objPools[type] = {}
end
for i,v in ipairs(objPools[type]) do
if v == obj then
error("Attempt to Release Widget that is already released")
return
end
end
tinsert(objPools[type],obj)
end
end
115,14 → 121,19
if reg[type] then
local widget = new(type,reg[type])
 
if widget.Acquire then
if rawget(widget,'Acquire') then
widget.OnAcquire = widget.Acquire
widget.Acquire = nil
elseif widget.Aquire then
elseif rawget(widget,'Aquire') then
widget.OnAcquire = widget.Aquire
widget.Aquire = nil
end
 
if rawget(widget,'Release') then
widget.OnRelease = rawget(widget,'Release')
widget.Release = nil
end
 
if widget.OnAcquire then
widget:OnAcquire()
else
138,23 → 149,19
safecall( widget.PauseLayout, widget )
widget:Fire("OnRelease")
safecall( widget.ReleaseChildren, widget )
 
if widget.OnRelease then
widget:OnRelease()
else
error(("Widget type %s doesn't supply an OnRelease Function"):format(type))
end
for k in pairs(widget.userdata) do
widget.userdata[k] = nil
end
for k in pairs(widget.events) do
widget.events[k] = nil
end
widget.width = nil
if widget.Release then
widget.OnRelease = widget.Release
widget.Release = nil
end
if widget.OnRelease then
widget:OnRelease()
else
error(("Widget type %s doesn't supply an OnRelease Function"):format(type))
end
 
widget.width = nil
--widget.frame:SetParent(nil)
widget.frame:ClearAllPoints()
widget.frame:Hide()
285,6 → 292,62
return self.frame:IsShown()
end
 
WidgetBase.Release = function(self)
AceGUI:Release(self)
end
 
WidgetBase.SetPoint = function(self, ...)
return self.frame:SetPoint(...)
end
 
WidgetBase.ClearAllPoints = function(self)
return self.frame:ClearAllPoints()
end
 
WidgetBase.GetNumPoints = function(self)
return self.frame:GetNumPoints()
end
 
WidgetBase.GetPoint = function(self, ...)
return self.frame:GetPoint(...)
end
 
WidgetBase.GetUserDataTable = function(self)
return self.userdata
end
 
WidgetBase.SetUserData = function(self, key, value)
self.userdata[key] = value
end
 
WidgetBase.GetUserData = function(self, key)
return self.userdata[key]
end
 
WidgetBase.IsFullHeight = function(self)
return self.height == "fill"
end
 
WidgetBase.SetFullHeight = function(self, isFull)
if isFull then
self.height = "fill"
else
self.height = nil
end
end
 
WidgetBase.IsFullWidth = function(self)
return self.width == "fill"
end
 
WidgetBase.SetFullWidth = function(self, isFull)
if isFull then
self.width = "fill"
else
self.width = nil
end
end
 
-- local function LayoutOnUpdate(this)
-- this:SetScript("OnUpdate",nil)
-- this.obj:PerformLayout()
trunk/Plink!/Libs/AceAddon-3.0/AceAddon-3.0.lua
1,4 → 1,4
--[[ $Id: AceAddon-3.0.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]]
--[[ $Id: AceAddon-3.0.lua 654 2008-05-21 13:43:29Z ammo $ ]]
local MAJOR, MINOR = "AceAddon-3.0", 5
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
trunk/Plink!/Libs/AceConfig-3.0/AceConfig-3.0.lua
1,4 → 1,4
--[[ $Id: AceConfig-3.0.lua 60131 2008-02-03 13:03:56Z nevcairiel $ ]]
--[[ $Id: AceConfig-3.0.lua 494 2008-02-03 13:03:56Z nevcairiel $ ]]
--[[
AceConfig-3.0
 
trunk/Plink!/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
3,7 → 3,7
 
]]
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 22
local MAJOR, MINOR = "AceConfigDialog-3.0", 25
local lib = LibStub:NewLibrary(MAJOR, MINOR)
 
if not lib then return end
12,6 → 12,9
lib.Status = lib.Status or {}
lib.frame = lib.frame or CreateFrame("Frame")
 
lib.frame.apps = lib.frame.apps or {}
lib.frame.closing = lib.frame.closing or {}
 
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
 
384,33 → 387,36
end
 
local function CleanUserData(widget, event)
local user = widget.userdata
 
local user = widget:GetUserDataTable()
 
if user.path then
del(user.path)
end
 
if widget.type == "TreeGroup" then
local tree = widget.tree
local tree = user.tree
widget:SetTree(nil)
if tree then
for i = 1, #tree do
DelTree(tree[i])
del(tree[i])
end
del(tree)
widget.tree = nil
end
end
 
if widget.type == "TabGroup" then
del(widget.tablist)
widget.tablist = nil
widget:SetTabs(nil)
if user.tablist then
del(user.tablist)
end
end
 
if widget.type == "DropdownGroup" then
if widget.dropdown.list then
del(widget.dropdown.list)
widget.dropdown.list = nil
widget:SetGroupList(nil)
if user.grouplist then
del(user.grouplist)
end
end
end
513,7 → 519,7
 
local function OptionOnMouseOver(widget, event)
--show a tooltip/set the status bar to the desc text
local user = widget.userdata
local user = widget:GetUserDataTable()
local opt = user.option
local options = user.options
local path = user.path
593,8 → 599,8
 
local function ActivateControl(widget, event, ...)
--This function will call the set / execute handler for the widget
--widget.userdata contains the needed info
local user = widget.userdata
--widget:GetUserDataTable() contains the needed info
local user = widget:GetUserDataTable()
local option = user.option
local options = user.options
local path = user.path
706,7 → 712,7
--call confirm func/method
if type(confirm) == "string" then
if handler and handler[confirm] then
success, confirm = safecall(handler[confirm],handler, info)
success, confirm = safecall(handler[confirm], handler, info, ...)
if success and type(confirm) == "string" then
confirmText = confirm
confirm = true
717,7 → 723,7
error(string.format("Method %s doesn't exist in handler for type confirm", confirm))
end
elseif type(confirm) == "function" then
success, confirm = safecall(confirm,info)
success, confirm = safecall(confirm, info, ...)
if success and type(confirm) == "string" then
confirmText = confirm
confirm = true
743,13 → 749,13
end
end
 
local iscustom = user.rootframe.userdata.iscustom
local iscustom = user.rootframe:GetUserData('iscustom')
local rootframe
 
if iscustom then
rootframe = user.rootframe
end
local basepath = user.rootframe.userdata.basepath
local basepath = user.rootframe:GetUserData('basepath')
if type(func) == "string" then
if handler and handler[func] then
confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...)
777,8 → 783,8
 
 
 
local iscustom = user.rootframe.userdata.iscustom
local basepath = user.rootframe.userdata.basepath
local iscustom = user.rootframe:GetUserData('iscustom')
local basepath = user.rootframe:GetUserData('basepath')
--full refresh of the frame, some controls dont cause this on all events
if option.type == "color" then
if event == "OnValueConfirmed" then
813,7 → 819,7
end
 
local function ActivateSlider(widget, event, value)
local option = widget.userdata.option
local option = widget:GetUserData('option')
local min, max, step = option.min or 0, option.max or 100, option.step
if step then
value = math.floor((value - min) / step + 0.5) * step + min
826,10 → 832,10
--called from a checkbox that is part of an internally created multiselect group
--this type is safe to refresh on activation of one control
local function ActivateMultiControl(widget, event, ...)
ActivateControl(widget, event, widget.userdata.value, ...)
local user = widget.userdata
local iscustom = user.rootframe.userdata.iscustom
local basepath = user.rootframe.userdata.basepath
ActivateControl(widget, event, widget:GetUserData('value'), ...)
local user = widget:GetUserDataTable()
local iscustom = user.rootframe:GetUserData('iscustom')
local basepath = user.rootframe:GetUserData('basepath')
if iscustom then
lib:Open(user.appName, user.rootframe, basepath and unpack(basepath))
else
838,10 → 844,10
end
 
local function MultiControlOnClosed(widget, event, ...)
local user = widget.userdata
local user = widget:GetUserDataTable()
if user.valuechanged then
local iscustom = user.rootframe.userdata.iscustom
local basepath = user.rootframe.userdata.basepath
local iscustom = user.rootframe:GetUserData('iscustom')
local basepath = user.rootframe:GetUserData('basepath')
if iscustom then
lib:Open(user.appName, user.rootframe, basepath and unpack(basepath))
else
851,7 → 857,7
end
 
local function FrameOnClose(widget, event)
local appName = widget.userdata.appName
local appName = widget:GetUserData('appName')
lib.OpenFrames[appName] = nil
gui:Release(widget)
end
997,7 → 1003,7
end
 
local function InjectInfo(control, options, option, path, rootframe, appName)
local user = control.userdata
local user = control:GetUserDataTable()
for i = 1, #path do
user[i] = path[i]
end
1172,8 → 1178,8
local text = values[value]
local check = gui:Create("CheckBox")
check:SetLabel(text)
check.userdata.value = value
check.userdata.text = text
check:SetUserData('value', value)
check:SetUserData('text', text)
check:SetDisabled(disabled)
check:SetTriState(v.tristate)
check:SetValue(GetOptionsMemberValue("get",v, options, path, appName, value))
1288,7 → 1294,7
 
 
local function TreeOnButtonEnter(widget, event, uniquevalue, button)
local user = widget.userdata
local user = widget:GetUserDataTable()
if not user then return end
local options = user.options
local option = user.option
1361,7 → 1367,7
 
local function GroupSelected(widget, event, uniquevalue)
 
local user = widget.userdata
local user = widget:GetUserDataTable()
 
local options = user.options
local option = user.option
1378,7 → 1384,6
for i = 1, #feedpath do
group = GetSubOption(group, feedpath[i])
end
 
widget:ReleaseChildren()
lib:FeedGroup(user.appName,options,widget,rootframe,feedpath)
 
1489,6 → 1494,7
 
local tabs = BuildGroups(group, options, path, appName)
tab:SetTabs(tabs)
tab:SetUserData("tablist", tabs)
 
for i = 1, #tabs do
local entry = tabs[i]
1512,6 → 1518,7
select:SetStatusTable(status.groups)
local grouplist = BuildSelect(group, options, path, appName)
select:SetGroupList(grouplist)
select:SetUserData("grouplist", grouplist)
local firstgroup
for k, v in pairs(grouplist) do
if not firstgroup or k < firstgroup then
1550,6 → 1557,7
tree:SetStatusTable(status.groups)
 
tree:SetTree(treedefinition)
tree:SetUserData("tree",treedefinition)
 
for i = 1, #treedefinition do
local entry = treedefinition[i]
1566,33 → 1574,32
 
local old_CloseSpecialWindows
 
function lib:CloseAll()
local closed
for k, v in pairs(self.OpenFrames) do
v:Hide()
closed = true
end
return closed
end
 
function lib:Close(appName)
if self.OpenFrames[appName] then
self.OpenFrames[appName]:Hide()
return true
local function RefreshOnUpdate(this)
for appName in pairs(this.closing) do
if lib.OpenFrames[appName] then
lib.OpenFrames[appName]:Hide()
end
this.closing[appName] = nil
end
end
 
local function RefreshOnUpdate(this)
 
if this.closeAll then
for k, v in pairs(lib.OpenFrames) do
v:Hide()
end
this.closeAll = nil
end
 
for appName in pairs(this.apps) do
if lib.OpenFrames[appName] then
local user = lib.OpenFrames[appName].userdata
local user = lib.OpenFrames[appName]:GetUserDataTable()
lib:Open(appName, user.basepath and unpack(user.basepath))
end
if lib.BlizOptions and lib.BlizOptions[appName] then
local widget = lib.BlizOptions[appName]
local user = widget.userdata
if widget.frame:IsVisible() then
lib:Open(widget.userdata.appName, widget, user.basepath and unpack(user.basepath))
local user = widget:GetUserDataTable()
if widget:IsVisible() then
lib:Open(widget:GetUserData('appName'), widget, user.basepath and unpack(user.basepath))
end
end
this.apps[appName] = nil
1600,10 → 1607,23
this:SetScript("OnUpdate", nil)
end
 
function lib:CloseAll()
lib.frame.closeAll = true
lib.frame:SetScript("OnUpdate", RefreshOnUpdate)
if next(self.OpenFrames) then
return true
end
end
 
function lib:Close(appName)
if self.OpenFrames[appName] then
lib.frame.closing[appName] = true
lib.frame:SetScript("OnUpdate", RefreshOnUpdate)
return true
end
end
 
function lib:ConfigTableChanged(event, appName)
if not lib.frame.apps then
lib.frame.apps = {}
end
lib.frame.apps[appName] = true
lib.frame:SetScript("OnUpdate", RefreshOnUpdate)
end
1652,10 → 1672,10
if container then
f = container
f:ReleaseChildren()
f.userdata.appName = appName
f.userdata.iscustom = true
f:SetUserData('appName', appName)
f:SetUserData('iscustom', true)
if #path > 0 then
f.userdata.basepath = copy(path)
f:SetUserData('basepath', copy(path))
end
local status = lib:GetStatusTable(appName)
if not status.width then
1676,9 → 1696,9
end
f:ReleaseChildren()
f:SetCallback("OnClose", FrameOnClose)
f.userdata.appName = appName
f:SetUserData('appName', appName)
if #path > 0 then
f.userdata.basepath = copy(path)
f:SetUserData('basepath', copy(path))
end
f:SetTitle(name or "")
local status = lib:GetStatusTable(appName)
1695,8 → 1715,8
lib.BlizOptions = lib.BlizOptions or {}
 
local function FeedToBlizPanel(widget, event)
local path = widget.userdata.path
lib:Open(widget.userdata.appName, widget, path and unpack(path))
local path = widget:GetUserData('path')
lib:Open(widget:GetUserData('appName'), widget, path and unpack(path))
end
 
local function ClearBlizPanel(widget, event)
1717,13 → 1737,13
group:SetName(name or appName, parent)
 
group:SetTitle(name or appName)
group.userdata.appName = appName
group:SetUserData('appName', appName)
if select('#', ...) > 0 then
local path = {}
for n = 1, select('#',...) do
tinsert(path, (select(n, ...)))
end
group.userdata.path = path
group:SetUserData('path', path)
end
group:SetCallback("OnShow", FeedToBlizPanel)
group:SetCallback("OnHide", ClearBlizPanel)
trunk/Plink!/Libs/AceDB-3.0/AceDB-3.0.lua
1,5 → 1,5
--[[ $Id: AceDB-3.0.lua 69511 2008-04-13 10:10:53Z nevcairiel $ ]]
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 7
--[[ $Id: AceDB-3.0.lua 667 2008-06-11 14:34:58Z nevcairiel $ ]]
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 8
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
 
if not AceDB then return end -- No upgrade needed
95,7 → 95,7
for key, value in pairs(db) do
if type(value) == "table" then
-- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables
if defaults[key] == nil then
if defaults[key] == nil and (not blocker or blocker[key] == nil) then
removeDefaults(value, v)
-- if the table is empty afterwards, remove it
if not next(value) then
trunk/Plink!/plink.lua
4,7 → 4,7
end
 
local reflect = 23920 --Spell Reflect buff ID
local dur = 4.8 --Spell Reflect duration
local dur = 4.9 --Spell Reflect duration
local counter = 0 --timer var
local player = UnitName("player")
local timerFrame = CreateFrame("Frame")
37,8 → 37,13
name = "Standby",
desc = "Puts the addon into standby mode, so no sounds are heard.",
type = "toggle",
get = function() return Plink.db.profile.standby end,
set = function() Plink.db.profile.standby = not Plink.db.profile.standby end
get = function()
return Plink.db.profile.standby
end,
set = function()
Plink.db.profile.standby = not Plink.db.profile.standby
Plink:AddMessage("Standby mode is now set to: "..Plink.db.profile.standby)
end
},
config = {
name = "Config",
trunk/Plink!/Plink!.toc
1,6 → 1,6
## Interface: 20400
## Interface: 30000
## Title: Plink!
## Version: 1.0
## Version: 1.1
## Author: Seerah
## Notes: Plays a sound when your Spell Reflect buff gets used
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets