Quantcast

Adjusted position of buttons in main window.

Paul Schifferer [12-12-10 - 22:43]
Adjusted position of buttons in main window.
Enabled the link button.
Adjusted position of the 'clear queue' button in the queue window.
Started storing item type and subtype and description in skill info.
Filename
CauldronMain.xml
CauldronMainUI.lua
CauldronQueue.xml
CauldronTradeskill.lua
diff --git a/CauldronMain.xml b/CauldronMain.xml
index 801b900..beef364 100755
--- a/CauldronMain.xml
+++ b/CauldronMain.xml
@@ -827,7 +827,7 @@
 			<Button name="CauldronQueueAllButton" inherits="CauldronButtonTemplate" text="Queue All">
 				<Anchors>
 					<Anchor point="BOTTOMLEFT">
-						<Offset x="0" y="5" />
+						<Offset x="2" y="5" />
 					</Anchor>
 				</Anchors>
 				<Scripts>
diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua
index 9c911d4..b4ae009 100644
--- a/CauldronMainUI.lua
+++ b/CauldronMainUI.lua
@@ -1863,6 +1863,62 @@ function Cauldron:FilterDropDown_SetSubclass(subclass, subslot)

 end

+function CauldronLinkDropDown_LinkPost(self, chan)
+	local link = GetTradeSkillListLink();
+	if link then
+		ChatFrame_OpenChat(chan.." "..link, DEFAULT_CHAT_FRAME);
+	end
+end
+
+
+function CauldronLinkDropDown_OnLoad(self)
+	UIDropDownMenu_Initialize(self, CauldronLinkDropDown_Init, "MENU");
+end
+
+function CauldronLinkDropDown_Init(self, level)
+
+	local info = UIDropDownMenu_CreateInfo();
+	info.notCheckable = true;
+	info.text = TRADESKILL_POST;
+	info.isTitle = 1;
+	UIDropDownMenu_AddButton(info);
+	info.isTitle = nil;
+
+	info = UIDropDownMenu_CreateInfo();
+	info.notCheckable = true;
+	info.func = CauldronLinkDropDown_LinkPost
+
+	info.text = GUILD;
+	info.arg1 = SLASH_GUILD1;
+	info.disabled = not IsInGuild();
+	UIDropDownMenu_AddButton(info);
+
+	info.text = PARTY;
+	info.arg1 = SLASH_PARTY1;
+	info.disabled = GetNumPartyMembers() == 0;
+	UIDropDownMenu_AddButton(info);
+
+	info.text = RAID;
+	info.disabled = GetNumRaidMembers() == 0;
+	info.arg1 = SLASH_RAID1;
+	UIDropDownMenu_AddButton(info);
+	-- info.text = SAY;
+	-- info.arg1 = SLASH_SAY1;
+	-- UIDropDownMenu_AddButton(info);
+
+	info.disabled = false
+	local name;
+	local chanels = {GetChannelList()};
+	local channelCount = #chanels/2;
+	for i=1, MAX_CHANNEL_BUTTONS, 1 do
+		if ( i <= channelCount) then
+			info.text = chanels[i*2];
+			info.arg1 = "/"..chanels[(i-1)*2 + 1];
+			UIDropDownMenu_AddButton(info);
+		end
+	end
+end
+
 function Cauldron:ReagentsFilterNormalCheck()

 	local skillName = CURRENT_TRADESKILL;
diff --git a/CauldronQueue.xml b/CauldronQueue.xml
index eebb84f..422e94d 100644
--- a/CauldronQueue.xml
+++ b/CauldronQueue.xml
@@ -563,7 +563,7 @@

             <!-- Buttons frame -->
             <Frame name="CauldronQueueButtonsFrame">
-                <Size x="328" y="25" />
+                <Size x="330" y="25" />
                 <Anchors>
                     <Anchor point="BOTTOMLEFT" relativeTo="CauldronQueueWindowFrame" relativePoint="BOTTOMLEFT">
                         <Offset x="2" y="0" />
diff --git a/CauldronTradeskill.lua b/CauldronTradeskill.lua
index 0569b25..da30155 100644
--- a/CauldronTradeskill.lua
+++ b/CauldronTradeskill.lua
@@ -198,7 +198,7 @@ function Cauldron:UpdateSkills()
 					-- add the recipe info and other miscellaneous info
 					local itemLink = GetTradeSkillItemLink(i);
 					local recipeLink = GetTradeSkillRecipeLink(i);
-					local _, _, _, _, _, _, _, _, slot, _ = GetItemInfo(itemLink);
+					local _, _, _, _, _, itemType, itemSubType, _, slot, _ = GetItemInfo(itemLink);

 					local keywords = name;

@@ -206,6 +206,7 @@ function Cauldron:UpdateSkills()
 					skillDB.recipes[name] = {
 						['index'] = i,
 						['name'] = name,
+						['description'] = GetTradeSkillDescription(i),
 						['itemLink'] = itemLink,
 						['recipeLink'] = recipeLink,
 						['icon'] = GetTradeSkillIcon(i),
@@ -217,8 +218,10 @@ function Cauldron:UpdateSkills()
 						['numSkillUps'] = numSkillUps,

 						-- filter information
-						['slot'] = slot,
+						['slot'] = _G[slot],
 						['defaultCategory'] = category,
+						['type'] = itemType,
+						['subtype'] = itemSubType,

 						['reagents'] = {},
 					};
@@ -326,6 +329,8 @@ function Cauldron:UpdateSkills()
 					if not expanded then
 						ExpandTradeSkillSubClass(i);
 					end
+				else
+					category = "Uncategorized";
 				end
 			end
 		end
@@ -507,7 +512,8 @@ function Cauldron:GetSkillList(playername, skillName)
 		end

 		-- check categories
-		local catInfo = self.db.realm.userdata[playername].skills[skillName].window.categories[recipe.defaultCategory];
+		local categories = self.db.realm.userdata[playername].skills[skillName].window.categories;
+		local catInfo = categories[recipe.defaultCategory] or categories[recipe.type] or categories[recipe.subtype];
 		if catInfo and (not catInfo.shown) then
 			self:debug("skipping recipe: "..name.." (category: "..recipe.defaultCategory..")");
 			add = false;