WoWInterface SVN Torta

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 29 to Rev 30
    Reverse comparison

Rev 29 → Rev 30

trunk/Torta/DataHandler.lua
5,129 → 5,7
cfg = {
loadedList = false -- No more ListInUse/ListLastUsed madness like before.
},
lists = {
[1] = {
meta = {
listName = "CL3 Test List"
},
text = {
[1] = "Hello, world from Lua!"
},
stat = {
[1] = true
}
},
[2] = {
meta = {
listName = "Hello, world!"
},
text = {
[1] = "Peter Piper picked a peck of pickled pepper.",
[2] = "She sells seashells on the seashore",
[3] = "",
[4] = "",
[5] = "Hello, Torta!",
[6] = "",
[7] = "",
[8] = "",
[9] = "",
[10] = "Hello, Checklist!",
[11] = "",
[12] = "",
[13] = "",
[14] = "",
[15] = "Hello, Notebook!",
[16] = "",
[17] = "",
[18] = "",
[19] = "",
[20] = "This addon was made using Notepad++.",
[21] = "",
[22] = "",
[23] = ":D",
},
stat = {
[1] = true,
[2] = false,
[3] = true,
[4] = false,
[5] = false,
[6] = false,
[7] = true,
[8] = true,
[9] = true,
[10] = true,
[11] = false,
[12] = false,
[13] = false,
[14] = false,
[15] = false,
[16] = false,
[17] = false,
[18] = false,
[19] = false,
[20] = false,
[21] = false,
[22] = false,
[23] = false,
}
},
[3] = {
meta = {
listName = "Hello, cruel world!"
},
text = {
[1] = "Peter Piper picked a peck of pickled pepper.",
[2] = "She sells seashells on the seashore",
[3] = "",
[4] = "",
[5] = "Hello, Torta!",
[6] = "",
[7] = "",
[8] = "I like xkcd. Do you?",
[9] = "",
[10] = "Hello, Checklist!",
[11] = "",
[12] = "",
[13] = "Hello, Notebook!",
[14] = "",
[15] = "This addon was created using Notepad++.",
[16] = "",
[17] = "",
[18] = "",
[19] = "",
[20] = "",
[21] = "",
[22] = "",
[23] = ":D",
},
stat = {
[1] = true,
[2] = false,
[3] = true,
[4] = false,
[5] = false,
[6] = false,
[7] = true,
[8] = true,
[9] = true,
[10] = true,
[11] = false,
[12] = false,
[13] = false,
[14] = false,
[15] = false,
[16] = false,
[17] = false,
[18] = false,
[19] = false,
[20] = false,
[21] = false,
[22] = false,
[23] = false,
}
}
},
lists = {},
notes = {}
}
}
trunk/Torta/UIManager.lua
14,7 → 14,9
local editTaskEB = TortaParentFrameMainPageTaskEditorSubWindowScrollFrameEditBox;
local uncheckAllButton = TortaParentFrameMainPageTaskbarUncheckAllButton;
local checkAllButton = TortaParentFrameMainPageTaskbarCheckAllButton;
local addTaskButton = TortaParentFrameMainPageTaskbarAddTaskButton;
local removeTaskButton = TortaParentFrameMainPageTaskbarRemoveTaskButton;
local explorerNoListsText = TortaParentFrameMainPageExplorerSubWindowNoListsText;
 
local EXPLORER_LISTBUTTON_HEIGHT = 16;
local Torta = Torta;
33,21 → 35,23
----------------------------------------------------------------------------------------
Torta.gui.elements = {};
local e = Torta.gui.elements;
e.mainWindow = mainWindow;
e.startPage = startPage;
e.explorerWindow = explorerWindow;
e.explorerScrollBar = explorerScrollBar;
e.clDisplayWindow = clDisplayWindow;
e.clScrollBar = clScrollBar;
e.noLoadedListText = noLoadedListText;
e.clTopButton = clTopButton;
e.cl3HeaderText = cl3HeaderText;
e.taskEditor = taskEditor;
e.taskBar = taskBar;
e.editTaskEB = editTaskEB;
e.uncheckAllButton = uncheckAllButton;
e.checkAllButton = checkAllButton;
e.removeTaskButton = removeTaskButton;
e.mainWindow = mainWindow;
e.startPage = startPage;
e.explorerWindow = explorerWindow;
e.explorerScrollBar = explorerScrollBar;
e.clDisplayWindow = clDisplayWindow;
e.clScrollBar = clScrollBar;
e.noLoadedListText = noLoadedListText;
e.clTopButton = clTopButton;
e.cl3HeaderText = cl3HeaderText;
e.taskEditor = taskEditor;
e.taskBar = taskBar;
e.editTaskEB = editTaskEB;
e.uncheckAllButton = uncheckAllButton;
e.checkAllButton = checkAllButton;
e.addTaskButton = addTaskButton;
e.removeTaskButton = removeTaskButton;
e.explorerNoListsText = explorerNoListsText;
e = nil;
----------------------------------------------------------------------------------------
function Torta.gui.scalingFinishedFunc(frame)
142,6 → 146,7
self = Torta.gui;
local lineplusoffset;
local button;
explorerNoListsText:Hide();
if #Torta.db.profile.lists > 0 then
local lists = Torta.db.profile.lists;
FauxScrollFrame_Update(explorerScrollBar, #Torta.db.profile.lists, #self.exListButtons, 16, nil, nil, nil, nil, nil, nil, true)
166,7 → 171,11
end
end
else
 
explorerScrollBar:Hide();
explorerNoListsText:Show();
for i = 1, #self.exListButtons do
self.exListButtons[i]:Hide();
end
end
end
 
341,11 → 350,11
},
{
text = "Rename this list",
func = function() end
func = function() end
},
{
text = "Delete this list",
func = function() end
func = function() Torta.cl3:DeleteList(Torta.gui.selectedExplorerButton:GetID()); end
},
{
text = "",
360,6 → 369,7
 
function Torta.gui:clShowButtonDropdown(button)
assert(button);
self.selectedExplorerButton = button;
clListDropdownInfo[1].text = button:GetText();
EasyMenu(clListDropdownInfo, dropdown, "cursor", 0, 0, "MENU", 3);
end
trunk/Torta/Windows/Explorer.xml
17,6 → 17,18
<Anchor point="RIGHT" relativeTo="$parentHeaderTexture"/>
</Anchors>
</FontString>
<FontString name="$parentNoListsText" inherits="GameFontHighlight" text="You do not appear to have any lists. Right-click here to open up a context menu to create one.">
<Anchors>
<Anchor point="LEFT">
<Offset x="5"/>
</Anchor>
<Anchor point="RIGHT">
<Offset x="-5"/>
</Anchor>
<Anchor point="TOP"/>
<Anchor point="BOTTOM"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
trunk/Torta/CL3.lua
7,6 → 7,8
local dispWnd = widgets.clDisplayWindow;
local tEditor = widgets.taskEditor;
 
local newListCount = 0;
 
function Checklist3:InitializeChecklist()
if type(Torta.db.profile.cfg.loadedList) == "number" then
self:LoadList(Torta.db.profile.cfg.loadedList);
56,9 → 58,11
if not self:GetLoadedList() then
widgets.checkAllButton:Disable();
widgets.uncheckAllButton:Disable();
widgets.addTaskButton:Disable();
else
widgets.checkAllButton:Enable();
widgets.uncheckAllButton:Enable();
widgets.addTaskButton:Enable();
end
end
 
163,9 → 167,10
 
 
function Checklist3:CreateList()
newListCount = newListCount + 1;
tinsert(Torta.db.profile.lists, {
meta = {
listName = "New List"
listName = "New List " .. newListCount
},
text = {},
stat = {}
174,7 → 179,20
end
 
function Checklist3:DeleteList(index)
 
assert(index);
local loadedListIndex = Torta.db.profile.cfg.loadedList;
tremove(Torta.db.profile.lists, index);
-- print(index, loadedListIndex);
if loadedListIndex then
if index < loadedListIndex then
self:LoadList(loadedListIndex - 1);
end
end
gui:UpdateExplorerScrollBar();
if not Torta.db.profile.lists[Torta.db.profile.cfg.loadedList] then
Torta.db.profile.cfg.loadedList = false;
gui:UpdateCLScrollBar();
end
end
 
function Checklist3:RestoreList()