From d97503aab47269433b15390b45618596598ae720 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 15 Dec 2006 22:32:58 +0000 Subject: [PATCH] Clique: * Change API to reflect changes to Dongle --- Clique.lua | 19 ++++--------------- CliqueOptions.lua | 6 +++--- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/Clique.lua b/Clique.lua index 95c5929..166f033 100644 --- a/Clique.lua +++ b/Clique.lua @@ -4,20 +4,9 @@ Clique = {Locals = {}} -DongleStub("Dongle"):New(Clique, "Clique") +DongleStub("Dongle"):New("Clique", Clique) local L = Clique.Locals --- Create a frame for event registration -local eventFrame = CreateFrame("Frame") -local elapsed = 0 -eventFrame:SetScript("OnUpdate", function() - elapsed = elapsed + arg1 - if elapsed >= 2.0 then - elapsed = 0 - Clique:ClearQueue() - end -end) -eventFrame:Hide() function Clique:Enable() -- Grab the localisation header @@ -249,7 +238,7 @@ function Clique:RegisterFrame(frame) if frame:GetAttribute("Clique-test") then frame:SetAttribute("Clique-test", nil) else - self:Print("Cannot register frame %s", tostring(name)) + self:PrintF("Cannot register frame %s", tostring(name)) end if self.profile.blacklist[name] then @@ -321,7 +310,7 @@ end function Clique:DONGLE_PROFILE_CHANGED(event, addon, svname, name) if addon == "Clique" then - self:Print(L.PROFILE_CHANGED, name) + self:PrintF(L.PROFILE_CHANGED, name) for name,set in pairs(self.clicksets) do for modifier,entry in pairs(set) do self:DeleteAction(entry) @@ -346,7 +335,7 @@ end function Clique:DONGLE_PROFILE_DELETED(event, addon, svname, name) if addon == "Clique" then - self:Print(L.PROFILE_DELETED, name) + self:PrintF(L.PROFILE_DELETED, name) self.textlistSelected = nil self:TextListScrollUpdate() diff --git a/CliqueOptions.lua b/CliqueOptions.lua index 776d9aa..b982a2a 100644 --- a/CliqueOptions.lua +++ b/CliqueOptions.lua @@ -1146,7 +1146,7 @@ function Clique:ButtonOnClick(button) local offset = FauxScrollFrame_GetOffset(CliqueTextListScroll) local selected = self.textlistSelected - offset local button = getglobal("CliqueTextList"..selected) - self:DeleteProfile(button.name:GetText()) + self.db:DeleteProfile(button.name:GetText()) elseif this == CliqueButtonEdit then -- Make a copy of the entry self.customEntry = {} @@ -1567,7 +1567,7 @@ StaticPopupDialogs["CLIQUE_DELETE_PROFILE"] = { button1 = TEXT(OKAY), button2 = TEXT(CANCEL), OnAccept = function() - Clique:DeleteProfile(getglobal(this:GetName().."EditBox"):GetText()) + Clique.db:DeleteProfile(getglobal(this:GetName().."EditBox"):GetText()) Clique:DropDownProfile_OnShow() end, timeout = 0, @@ -1589,7 +1589,7 @@ StaticPopupDialogs["CLIQUE_DELETE_PROFILE"] = { end, EditBoxOnEnterPressed = function() if ( getglobal(this:GetParent():GetName().."Button1"):IsEnabled() == 1 ) then - Clique:DeleteProfile(this:GetText()) + Clique.db:DeleteProfile(this:GetText()) Clique:DropDownProfile_OnShow() this:GetParent():Hide(); end -- 1.7.9.5