- memory usage decreased in approximately 20%.

- small parser speed improvement, approximately 4%.
- fixed some memory leaks.
- fixed issues were details doesn't open with /details new.
- added feedback options for details report.
This commit is contained in:
Tercio
2013-10-14 16:31:35 -03:00
parent 6afc2ad758
commit 6f8d9b7ccc
55 changed files with 355 additions and 292 deletions
@@ -1,54 +1,67 @@
--localization
--> english
do
local Loc = LibStub("AceLocale-3.0"):NewLocale("DetailsErrorReport", "enUS", true)
Loc ["STRING_PLUGIN_NAME"] = "Error Report"
Loc ["STRING_TOOLTIP"] = "Did you found a bug? Report here!"
Loc ["STRING_REPORT"] = "Details Report"
Loc ["STRING_PROBLEM"] = "problem"
Loc ["STRING_SUGESTION"] = "sugestion"
Loc ["STRING_LUAERROR_DESC"] = "send a report about occurrence of lua errors"
Loc ["STRING_ACCURACY_DESC"] = "you found something which isn't the amount that should be\nfor instance, some healing or damage spell doesn't have the correct amount calculated."
Loc ["STRING_NOTWORK_DESC"] = "anything which should be doing something and actually isn't"
Loc ["STRING_OTHER_DESC"] = "any other problem or perhaps a suggesting not involving the subjects above, can be reported here"
Loc ["STRING_LUA_ERROR"] = "Lua Error"
Loc ["STRING_ACCURACY_ERROR"] = "Instable Accuracy"
Loc ["STRING_NOTWORK_ERROR"] = "Isn't Working"
Loc ["STRING_OTHER_ERROR"] = "Other"
Loc ["STRING_DEFAULT_TEXT_LUA"] = "You can copy and paste here the first 20 lines from the lua error window, also, is important a small description about the error, when it occurs and with what frequency it occurs."
Loc ["STRING_DEFAULT_TEXT_ACCURACY"] = "A miss accuracy is normal and happen all the time, but when the problem happen with frequency it's important tell to us. A good way to report is analyzing when the instability occurs, if is caused by a spell or if is a untracked pet."
Loc ["STRING_DEFAULT_TEXT_NOTWORK"] = "When you click in something and the result isn't the expected, could be a bug. If thing like this occurs more then once, report the problem to us, dont forget to mention which button is and the frequency."
Loc ["STRING_DEFAULT_TEXT_OTHER"] = "Any other problem not mentioned in the other 3 options should be reported here."
local Loc = LibStub("AceLocale-3.0"):NewLocale ("DetailsErrorReport", "enUS", true)
if (Loc) then
Loc ["STRING_PLUGIN_NAME"] = "Error Report"
Loc ["STRING_TOOLTIP"] = "Did you found a bug? Report here!"
Loc ["STRING_REPORT"] = "Details Report"
Loc ["STRING_PROBLEM"] = "problem"
Loc ["STRING_SUGESTION"] = "sugestion"
Loc ["STRING_LUAERROR_DESC"] = "send a report about occurrence of lua errors"
Loc ["STRING_ACCURACY_DESC"] = "you found something which isn't the amount that should be\nfor instance, some healing or damage spell doesn't have the correct amount calculated."
Loc ["STRING_NOTWORK_DESC"] = "anything which should be doing something and actually isn't"
Loc ["STRING_OTHER_DESC"] = "any other problem or perhaps a suggesting not involving the subjects above, can be reported here"
Loc ["STRING_LUA_ERROR"] = "Lua Error"
Loc ["STRING_ACCURACY_ERROR"] = "Instable Accuracy"
Loc ["STRING_NOTWORK_ERROR"] = "Isn't Working"
Loc ["STRING_OTHER_ERROR"] = "Other"
Loc ["STRING_DEFAULT_TEXT_LUA"] = "You can copy and paste here the first 20 lines from the lua error window, also, is important a small description about the error, when it occurs and with what frequency it occurs."
Loc ["STRING_DEFAULT_TEXT_ACCURACY"] = "A miss accuracy is normal and happen all the time, but when the problem happen with frequency it's important tell to us. A good way to report is analyzing when the instability occurs, if is caused by a spell or if is a untracked pet."
Loc ["STRING_DEFAULT_TEXT_NOTWORK"] = "When you click in something and the result isn't the expected, could be a bug. If thing like this occurs more then once, report the problem to us, dont forget to mention which button is and the frequency."
Loc ["STRING_DEFAULT_TEXT_OTHER"] = "Any other problem not mentioned in the other 3 options should be reported here."
Loc ["STRING_WELCOME_TEXT"] = "Details are in early alpha stages and many errors can occur,\nto try make this report process faster, we'll use this small plug in,\nat least on alpha stage."
Loc ["STRING_SEND"] = "Send"
Loc ["STRING_CANCELLED"] = "Cancelled."
Loc ["STRING_EMPTY"] = "Text field is empty"
Loc ["STRING_TOOBIG"] = "1024 Text characters limit reached"
Loc ["STRING_WELCOME_TEXT"] = "Details are in early alpha stages and many errors can occur,\nto try make this report process faster, we'll use this small plug in,\nat least on alpha stage."
Loc ["STRING_SEND"] = "Send"
Loc ["STRING_CANCELLED"] = "Cancelled."
Loc ["STRING_EMPTY"] = "Text field is empty"
Loc ["STRING_TOOBIG"] = "1024 Text characters limit reached"
Loc ["STRING_FEEDBACK_DESC"] = "Give your opinion about Details!"
Loc ["STRING_FEEDBACK"] = "Feedback"
Loc ["STRING_DEFAULT_TEXT_FEEDBACK"] = "Talk about your experience using details, tell us what could be improved or what new features should be implemented."
end
end
--> português
do
--[[
local Loc = LibStub("AceLocale-3.0"):NewLocale("DetailsErrorReport", "ptBR")
Loc ["STRING_PLUGIN_NAME"] = "Relatorio de Erros"
Loc ["STRING_TOOLTIP"] = "Encontrou um bug? reporte aqui"
Loc ["STRING_REPORT"] = "Details Relatorio de Erros"
Loc ["STRING_PROBLEM"] = "problema"
Loc ["STRING_SUGESTION"] = "sugestao"
Loc ["STRING_LUAERROR_DESC"] = "envia um relatorio sobre erros de lua que estao ocorrendo"
Loc ["STRING_ACCURACY_DESC"] = "caso voce encontre problemas na quantidade de dano ou healing que esta mais baixo do que deveria ser"
Loc ["STRING_NOTWORK_DESC"] = "qualquer coisa que voce clique e deveria efetuar uma funcao mas que nao esta"
Loc ["STRING_OTHER_DESC"] = "outros problemas e por que nao, sugestoes, podem ser enviadas usando este assunto"
Loc ["STRING_LUA_ERROR"] = "Erro de Lua"
Loc ["STRING_ACCURACY_ERROR"] = "Precisao dos Dados"
Loc ["STRING_NOTWORK_ERROR"] = "Algo Nao Funciona"
Loc ["STRING_OTHER_ERROR"] = "Outro"
Loc ["STRING_WELCOME_TEXT"] = "Detalhes esta apenas comecando a caminhar e muitos erros podem surgir, para que o erros chegem a nos mais rapidamente estaremos usando este plugin pelo menos na etapa Alfa do projeto."
Loc ["STRING_SEND"] = "Enviar"
--[
local Loc = LibStub("AceLocale-3.0"):NewLocale ("DetailsErrorReport", "ptBR")
if (Loc) then
Loc ["STRING_PLUGIN_NAME"] = "Relatorio de Erros"
Loc ["STRING_TOOLTIP"] = "Encontrou um bug? reporte aqui"
Loc ["STRING_REPORT"] = "Details Relatorio de Erros"
Loc ["STRING_PROBLEM"] = "problema"
Loc ["STRING_SUGESTION"] = "sugestao"
Loc ["STRING_LUAERROR_DESC"] = "envia um relatorio sobre erros de lua que estao ocorrendo"
Loc ["STRING_ACCURACY_DESC"] = "caso voce encontre problemas na quantidade de dano ou healing que esta mais baixo do que deveria ser"
Loc ["STRING_NOTWORK_DESC"] = "qualquer coisa que voce clique e deveria efetuar uma funcao mas que nao esta"
Loc ["STRING_OTHER_DESC"] = "outros problemas e por que nao, sugestoes, podem ser enviadas usando este assunto"
Loc ["STRING_LUA_ERROR"] = "Erro de Lua"
Loc ["STRING_ACCURACY_ERROR"] = "Precisao dos Dados"
Loc ["STRING_NOTWORK_ERROR"] = "Algo Nao Funciona"
Loc ["STRING_OTHER_ERROR"] = "Outro"
Loc ["STRING_WELCOME_TEXT"] = "Detalhes esta apenas comecando a caminhar e muitos erros podem surgir, para que o erros chegem a nos mais rapidamente estaremos usando este plugin pelo menos na etapa Alfa do projeto."
Loc ["STRING_SEND"] = "Enviar"
Loc ["STRING_CANCELLED"] = "Cancelado."
Loc ["STRING_EMPTY"] = "O campo do texto esta em branco."
Loc ["STRING_TOOBIG"] = "Limite de 1024 caracteres alcancado."
Loc ["STRING_FEEDBACK_DESC"] = "De sua opiniao sobre o Details!"
Loc ["STRING_FEEDBACK"] = "Feedback"
Loc ["STRING_DEFAULT_TEXT_FEEDBACK"] = ""
end
--]]
end
@@ -114,7 +127,7 @@
DetailsFrameWork:NewLabel (bg, _, _, "welcomelabel", Loc ["STRING_WELCOME_TEXT"], "GameFontHighlightSmall", 9)
bg.welcomelabel:SetPoint (10, -25)
local textArray = {Loc ["STRING_DEFAULT_TEXT_LUA"], Loc ["STRING_DEFAULT_TEXT_ACCURACY"], Loc ["STRING_DEFAULT_TEXT_NOTWORK"], Loc ["STRING_DEFAULT_TEXT_OTHER"]}
local textArray = {Loc ["STRING_DEFAULT_TEXT_FEEDBACK"], Loc ["STRING_DEFAULT_TEXT_LUA"], Loc ["STRING_DEFAULT_TEXT_ACCURACY"], Loc ["STRING_DEFAULT_TEXT_NOTWORK"], Loc ["STRING_DEFAULT_TEXT_OTHER"]}
--text field background
DetailsFrameWork:NewPanel (bg, _, "DetailsErrorReportTextFieldBackground", "textfieldBackground", 390, 260)
@@ -127,7 +140,7 @@
bg.textfield:SetBackdrop (nil)
bg.textfield:SetPoint (10, -90) -- topleft anchor and parent will be use in this case
bg.textfield:SetFrameLevel (1, bg.textfieldBackground) -- +1 relative to other frame
bg.textfield.text = Loc ["STRING_DEFAULT_TEXT_LUA"]
bg.textfield.text = Loc ["STRING_DEFAULT_TEXT_FEEDBACK"]
bg.textfield.multiline = true
bg.textfield.align = "left"
@@ -153,10 +166,11 @@
end
local options = {
{onclick = selected, desc = Loc ["STRING_LUAERROR_DESC"], value = 1, icon = "Interface\\ICONS\\INV_Pet_Cockroach", label = Loc ["STRING_LUA_ERROR"], color = "yellow", selected = true },
{onclick = selected, desc = Loc ["STRING_ACCURACY_DESC"], value = 2, icon = "Interface\\ICONS\\Ability_Hunter_FocusedAim", label = Loc ["STRING_ACCURACY_ERROR"], color = "skyblue" },
{onclick = selected, desc = Loc ["STRING_NOTWORK_DESC"], value = 3, icon = "Interface\\ICONS\\INV_Misc_ScrewDriver_01", label = Loc ["STRING_NOTWORK_ERROR"], color = "pink" },
{onclick = selected, desc = Loc ["STRING_OTHER_DESC"], value = 4, icon = "Interface\\ICONS\\Achievement_Reputation_01", label = Loc ["STRING_OTHER_ERROR"], color = "white" },
{onclick = selected, desc = Loc ["STRING_FEEDBACK_DESC"], value = 1, icon = "Interface\\ICONS\\INV_Misc_Note_05", label = Loc ["STRING_FEEDBACK"], color = "white", selected = true },
{onclick = selected, desc = Loc ["STRING_LUAERROR_DESC"], value = 2, icon = "Interface\\ICONS\\INV_Pet_Cockroach", label = Loc ["STRING_LUA_ERROR"], color = "white" },
{onclick = selected, desc = Loc ["STRING_ACCURACY_DESC"], value = 3, icon = "Interface\\ICONS\\Ability_Hunter_FocusedAim", label = Loc ["STRING_ACCURACY_ERROR"], color = "white" },
{onclick = selected, desc = Loc ["STRING_NOTWORK_DESC"], value = 4, icon = "Interface\\ICONS\\INV_Misc_ScrewDriver_01", label = Loc ["STRING_NOTWORK_ERROR"], color = "white" },
{onclick = selected, desc = Loc ["STRING_OTHER_DESC"], value = 5, icon = "Interface\\ICONS\\Achievement_Reputation_01", label = Loc ["STRING_OTHER_ERROR"], color = "white" },
}
local buildMenu = function()
return options
@@ -189,10 +203,10 @@
end
local subject = {
"LuaError", "InstableAccuracy", "IsntWorking", "Other"
"Feedback", "LuaError", "InstableAccuracy", "IsntWorking", "Other"
}
local url = "http://reporttodevs.hol.es/sendtodev.php?dev=detailsaddon&subject=" .. subject [bg.type.value] .. "&text=" .. bg.textfield.text:gsub (" ", "%%20")
local url = "http://reporttodevs.hol.es/sendtodev.php?dev=detailsaddon&subject=" .. subject [bg.type.value] .. "&text=v" .. _detalhes.userversion .. "-" .. bg.textfield.text:gsub (" ", "%%20")
ErrorReport:CopyPaste (url)
mainFrame:Hide()