From 1046823cfbc1376ffa4ead158ab5facb7a0242d2 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Fri, 26 Mar 2010 00:48:52 -0400 Subject: [PATCH] In ExpandTrainerData(), ExpandVendorData(), ExpandMobData(), and ExpandQuestData(): Changed behavior of "hide_location" parameter to display the coordinates on their own line. --- Frame.lua | 48 ++++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/Frame.lua b/Frame.lua index 2ce695b..1bb1687 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2979,18 +2979,16 @@ do end local t = AcquireTable() - t.text = string.format("%s%s %s %s", PADDING, hide_type and "" or addon:Trainer(L["Trainer"])..":", name, hide_location and coord_text or "") + t.text = string.format("%s%s %s", PADDING, hide_type and "" or addon:Trainer(L["Trainer"])..":", name) t.recipe_id = recipe_id entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - if not hide_location then - t = AcquireTable() - t.text = string.format("%s%s%s %s", PADDING, PADDING, trainer.location, coord_text) - t.recipe_id = recipe_id + t = AcquireTable() + t.text = string.format("%s%s%s %s", PADDING, PADDING, hide_location and "" or trainer.location, coord_text) + t.recipe_id = recipe_id - entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - end + entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) return entry_index end @@ -3012,18 +3010,16 @@ do end local t = AcquireTable() - t.text = string.format("%s%s %s %s", PADDING, hide_type and "" or addon:Vendor(L["Vendor"])..":", name, hide_location and coord_text or "") + t.text = string.format("%s%s %s", PADDING, hide_type and "" or addon:Vendor(L["Vendor"])..":", name) t.recipe_id = recipe_id entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - if not hide_location then - t = AcquireTable() - t.text = string.format("%s%s%s %s", PADDING, PADDING, hide_location and "" or vendor.location, coord_text) - t.recipe_id = recipe_id + t = AcquireTable() + t.text = string.format("%s%s%s %s", PADDING, PADDING, hide_location and "" or vendor.location, coord_text) + t.recipe_id = recipe_id - entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - end + entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) return entry_index end @@ -3039,18 +3035,16 @@ do end local t = AcquireTable() - t.text = string.format("%s%s %s %s", PADDING, hide_type and "" or addon:MobDrop(L["Mob Drop"])..":", addon:Red(mob.name), hide_location and coord_text or "") + t.text = string.format("%s%s %s", PADDING, hide_type and "" or addon:MobDrop(L["Mob Drop"])..":", addon:Red(mob.name)) t.recipe_id = recipe_id entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - if not hide_location then - t = AcquireTable() - t.text = PADDING .. PADDING .. mob.location .. " " .. coord_text - t.recipe_id = recipe_id + t = AcquireTable() + t.text = string.format("%s%s%s %s", PADDING, PADDING, hide_location and "" or mob.location, coord_text) + t.recipe_id = recipe_id - entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - end + entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) return entry_index end @@ -3069,18 +3063,16 @@ do end local t = AcquireTable() - t.text = string.format("%s%s %s %s", PADDING, hide_type and "" or addon:Quest(L["Quest"])..":", name, hide_location and coord_text or "") + t.text = string.format("%s%s %s", PADDING, hide_type and "" or addon:Quest(L["Quest"])..":", name) t.recipe_id = recipe_id entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - if not hide_location then - t = AcquireTable() - t.text = PADDING .. PADDING .. quest.location .. " " .. coord_text - t.recipe_id = recipe_id + t = AcquireTable() + t.text = string.format("%s%s%s %s", PADDING, PADDING, hide_location and "" or quest.location, coord_text) + t.recipe_id = recipe_id - entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) - end + entry_index = MainPanel.scroll_frame:InsertEntry(t, parent_entry, entry_index, entry_type, true) return entry_index end -- 1.7.9.5