- adapted to new Chat API
- fixed broken size calucation - fixed Import message
This commit is contained in:
+3
-3
@@ -886,10 +886,10 @@ function Grichelde:CheckAndExtractMessageTypeTarget(message)
|
||||
-- special reply handling
|
||||
if ("/r" == chatCmd) or ("/reply" == chatCmd) then
|
||||
-- reuse last type and target if possible
|
||||
-- TODO: add the Retail 12.x replacement of ChatEdit_GetLastToldTarget once confirmed in-game
|
||||
local getLastToldTarget = (_G.ChatFrameUtil and _G.ChatFrameUtil.GetLastToldTarget) or _G.ChatEdit_GetLastToldTarget
|
||||
local lastTold, lastToldType
|
||||
if (_G.ChatEdit_GetLastToldTarget ~= nil) then
|
||||
lastTold, lastToldType = _G.ChatEdit_GetLastToldTarget()
|
||||
if (getLastToldTarget ~= nil) then
|
||||
lastTold, lastToldType = getLastToldTarget()
|
||||
end
|
||||
self:DebugPrint("CheckAndExtractMessageTypeTarget : lastTell, lastTellType =", lastTold, lastToldType)
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ end
|
||||
|
||||
function Grichelde:SyncToDatabase(info, val)
|
||||
self:TracePrint("SyncToDatabase : info")
|
||||
local n = tSize(info)
|
||||
local n = #info
|
||||
for i = 0, n do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
@@ -104,7 +104,7 @@ end
|
||||
|
||||
function Grichelde:ReadFromDatabase(info)
|
||||
self:TracePrint("ReadFromDatabase : info")
|
||||
local n = tSize(info)
|
||||
local n = #info
|
||||
for i = 0, n do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
+8
-14
@@ -507,8 +507,7 @@ end
|
||||
-- @return (boolean)
|
||||
function Grichelde:IsMappingActive(info)
|
||||
self:TracePrint("IsMappingActive : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("IsMappingActive : info[%d] = %s", i, info[i])
|
||||
end
|
||||
|
||||
@@ -584,6 +583,7 @@ function Grichelde:ImportExample(num)
|
||||
self:TracePrint("ImportExample : number is: %d", num)
|
||||
if (self.L.Options_Help_Examples[num] == nil) or (tSize(self.L.Options_Help_Examples) < num) then
|
||||
self:DebugPrint("ImportExample : invalid number: %d", num)
|
||||
return
|
||||
end
|
||||
|
||||
local profileName = self.L.Options_Help_Examples[num].name
|
||||
@@ -671,8 +671,7 @@ end
|
||||
|
||||
function Grichelde:MoveUp(info)
|
||||
self:TracePrint("MoveUp : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
@@ -706,8 +705,7 @@ end
|
||||
|
||||
function Grichelde:MoveDown(info)
|
||||
self:TracePrint("MoveDown : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
@@ -750,8 +748,7 @@ end
|
||||
|
||||
function Grichelde:GetMoveUpImage(info)
|
||||
self:TracePrint("GetMoveUpImage : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
@@ -770,8 +767,7 @@ end
|
||||
|
||||
function Grichelde:GetMoveDownImage(info)
|
||||
self:TracePrint("GetMoveDownImage : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
@@ -799,8 +795,7 @@ end
|
||||
|
||||
function Grichelde:GetDeleteImage(info)
|
||||
self:TracePrint("GetDeleteImage : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
@@ -813,8 +808,7 @@ end
|
||||
|
||||
function Grichelde:DeleteMapping(info)
|
||||
self:TracePrint("DeleteMapping : info")
|
||||
local n = tSize(info)
|
||||
for i = 0, n do
|
||||
for i = 0, #info do
|
||||
self:TracePrint("%d = %s", i, info[i])
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -802,7 +802,7 @@ function Grichelde:RunTests()
|
||||
searchText = "ü",
|
||||
replaceText = "ue",
|
||||
exactCase = false,
|
||||
consolidate = false,
|
||||
consolidate = true,
|
||||
matchWhen = 2,
|
||||
stopOnMatch = false,
|
||||
},
|
||||
@@ -819,7 +819,7 @@ function Grichelde:RunTests()
|
||||
{
|
||||
["Hallä"] = "Hallae",
|
||||
["Ätsch"] = "Aetsch",
|
||||
["Hällöleü"] = "Haelloeleue",
|
||||
["Hällöluü"] = "Haelloelue",
|
||||
["ÜöÄ"] = "UeoeAe",
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -93,7 +93,7 @@ function Grichelde:Format(message, ...)
|
||||
--print("...: ", ...)
|
||||
return message, ...
|
||||
else
|
||||
local l = tSize(...)
|
||||
local l = select("#", ...)
|
||||
if (l > 0) then
|
||||
-- sanitize nil values in vararg
|
||||
local packed = { ... }
|
||||
@@ -144,7 +144,7 @@ function Grichelde:LogPrint(printFunc, obj, ...)
|
||||
printF("<nil>")
|
||||
else
|
||||
if type(obj) == "string" then
|
||||
local l = tSize(...)
|
||||
local l = select("#", ...)
|
||||
if (l == 0) or (find(obj, "%%") == nil) then
|
||||
printF(obj, ...)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user