WoWInterface SVN Torta

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 24 to Rev 25
    Reverse comparison

Rev 24 → Rev 25

Torta/CL3.lua
8,7 → 8,15
local tEditor = widgets.taskEditor;
 
function Checklist3:InitializeChecklist()
self:LoadList(nil);
if type(Torta.db.profile.cfg.loadedList) == "number" then
self:LoadList(Torta.db.profile.cfg.loadedList);
else
self:LoadList(nil)
end
self:ListLoadedCheck();
if not self:IsEditTaskDialogOpen() then
widgets.removeTaskButton:Disable();
end
end
 
 
33,9 → 41,26
end
gui:UpdateCLScrollBar();
gui:UpdateExplorerScrollBar();
self:ListLoadedCheck()
end
 
 
function Checklist3:GetLoadedList()
return Torta.db.profile.lists[Torta.db.profile.cfg.loadedList];
end
 
 
function Checklist3:ListLoadedCheck()
if not self:GetLoadedList() then
widgets.checkAllButton:Disable();
widgets.uncheckAllButton:Disable();
else
widgets.checkAllButton:Enable();
widgets.uncheckAllButton:Enable();
end
end
 
 
function Checklist3:EditTask(taskID)
if self.openTask and self.openTask == taskID then
-- close the task editor
69,6 → 94,7
dispWnd:SetPoint("BOTTOMRIGHT", widgets.taskBar, "TOPRIGHT");
tEditor:Hide();
self.openTask = nil;
widgets.removeTaskButton:Disable();
end
 
 
78,14 → 104,32
dispWnd:SetPoint(unpack(displayWindowPoints));
dispWnd:SetPoint("BOTTOMRIGHT", tEditor, "TOPRIGHT");
getglobal(tEditor:GetName() .. "HeaderText"):SetText("Task Editor: " .. (taskID or "|cffff0000No task ID|r"))
widgets.removeTaskButton:Enable();
end
 
 
function Checklist3:UncheckAll()
 
function Checklist3:UncheckAllTasks()
local list = self:GetLoadedList();
for i = 1, #list.stat do
list.stat[i] = false;
end
gui:UpdateCLScrollBar();
end
 
function Checklist3:CheckAll()
 
function Checklist3:CheckAllTasks()
local list = self:GetLoadedList();
for i = 1, #list.stat do
list.stat[i] = true;
end
gui:UpdateCLScrollBar();
end
 
 
function Checklist3:OnCheckClicked(id)
local list = self:GetLoadedList()
if list then
list.stat[id] = not list.stat[id];
end
gui:UpdateCLScrollBar();
end
 
Torta/Core.lua
16,6 → 16,15
SlashCmdList["TORTA_RLUI"] = ReloadUI;
SLASH_TORTA_RLUI1 = "/rl";
 
SlashCmdList["TORTA_GETWIDGETNAME"] = function()
if GetMouseFocus() then
print(GetMouseFocus():GetName());
else
print("The cursor is not over a UI element.");
end
end
SLASH_TORTA_GETWIDGETNAME1 = "/getname";
 
function Torta:OnInitialize()
local aboutLabel = TortaParentFrameStartPageSidebarAboutText;
aboutLabel:SetText("Torta is an addon written by Quezacolt of Aman'Thul based on the Checklist project.\n\nYour suggestions for Torta are always welcome :)");
Torta/UIManager.lua
3,17 → 3,19
local mainPage = TortaParentFrameMainPage;
local explorerWindow = TortaParentFrameMainPageExplorerSubWindow;
local explorerScrollBar = TortaParentFrameMainPageExplorerSubWindowScrollBar;
local EXPLORER_LISTBUTTON_HEIGHT = 16;
local clDisplayWindow = TortaParentFrameMainPageDisplaySubWindow;
local clScrollBar = TortaParentFrameMainPageDisplaySubWindowScrollBar;
local noLoadedListText = TortaParentFrameMainPageDisplaySubWindowNoLoadedListText;
local clTopButton = TortaParentFrameMainPageDisplaySubWindowTaskButton1;
local cl3HeaderText = TortaParentFrameMainPageDisplaySubWindowHeaderText;
local taskEditor = TortaParentFrameMainPageTaskEditorSubWindow;
local taskBar = TortaParentFrameMainPageTaskbar;
local editTaskEB = TortaParentFrameMainPageTaskEditorSubWindowScrollFrameEditBox;
local uncheckAllButton = TortaParentFrameMainPageTaskbarUncheckAllButton;
local checkAllButton = TortaParentFrameMainPageTaskbarCheckAllButton;
local removeTaskButton = TortaParentFrameMainPageTaskbarRemoveTaskButton;
 
local cl3HeaderText = TortaParentFrameMainPageDisplaySubWindowHeaderText;
 
local EXPLORER_LISTBUTTON_HEIGHT = 16;
local Torta = Torta;
 
-- Explorer subwindow stuff
43,6 → 45,9
e.taskEditor = taskEditor;
e.taskBar = taskBar;
e.editTaskEB = editTaskEB;
e.uncheckAllButton = uncheckAllButton;
e.checkAllButton = checkAllButton;
e.removeTaskButton = removeTaskButton;
e = nil;
----------------------------------------------------------------------------------------
function Torta.gui.scalingFinishedFunc(frame)
228,6 → 233,7
button.text:SetFormattedText("|cffffd000%i.)|r %s", lineplusoffset, self.data.text[lineplusoffset]);
button.check:SetChecked(self.data.stat[lineplusoffset]);
button:SetID(lineplusoffset);
button.check:SetID(lineplusoffset);
 
if lineplusoffset ~= Torta.cl3.openTask then
button:UnlockHighlight();
Torta/Windows/Taskbar.xml
41,12 → 41,22
<Offset x="5"/>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Torta.cl3:UncheckAllTasks();
</OnClick>
</Scripts>
</Button>
<Button name="$parentCheckAllButton" inherits="UIPanelButtonTemplate" text="Check All">
<Size x="100" y="22"/>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentUncheckAllButton" relativePoint="RIGHT"/>
</Anchors>
<Scripts>
<OnClick>
Torta.cl3:CheckAllTasks();
</OnClick>
</Scripts>
</Button>
<Button name="$parentAddTaskButton" inherits="UIPanelButtonTemplate" text="Add A Task">
<Size x="100" y="22"/>
Torta/Windows/Templates.xml
125,9 → 125,13
</OnLoad>
<OnUpdate>
-- This is retardedly hackish, but the anchors trick doesnt work for some reason (WTF!)
-- This is roughly how Checklist2 does it.
-- This is roughly how Checklist2 does it, except because its window cannot be resized,
-- it only does this once, at load time.
self:GetParent().text:SetWidth(self:GetParent():GetWidth() - 38);
</OnUpdate>
<OnClick>
Torta.cl3:OnCheckClicked(self:GetID());
</OnClick>
</Scripts>
</CheckButton>
</Frames>
Torta/Windows/TortaParentFrame.xml
113,7 → 113,7
</Anchor>
</Anchors>
</Button>
<Button name="$parentTab3" inherits="TortaTabTemplate" text="Torta Notebook" id="3">
<Button name="$parentTab3" inherits="TortaTabTemplate" text="Torta Notebook (NYI)" id="3">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTab2" relativePoint="RIGHT">
<Offset x="-15"/>