Quantcast
WoWInterface: SVN - Cellular - Path Comparison - / Rev 58 and / Rev 57

WoWInterface SVN Cellular

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 58 to Rev 57
    Reverse comparison

Rev 58 → Rev 57

trunk/Cellular.toc
2,7 → 2,7
## Title: Cellular (Shadowlands)
## Notes: Instant messenger for whispers
## Author: TotalPackage, Shexyriar
## Version: 9.0.4
## Version: 9.0.3
 
## SavedVariables: CellularDB
## SavedVariablesPerCharacter: CellularCharDB, Cellular_History
trunk/core.lua
1,5 → 1,3
local ADDON_NAME,namespace=...
local L=namespace.L
local Cellular=CreateFrame("Frame","Cellular",UIParent,BackdropTemplateMixin and "BackdropTemplate")
local a=Cellular
local smed=LibStub("LibSharedMedia-3.0")
40,7 → 38,7
bordercolor={0.7,0.7,0.7,1,},
incolor={1,0,1,1,},
outcolor={0,1,1,1,},
busymessage=L["Sorry, I am busy right now...I will chat with you later."],
busymessage="Sorry, I'm busy right now...I'll chat with you later.",
history=true,enabletabs=false,char=false,
maxwindows=8,
fade=true,
72,7 → 70,7
t2:SetPoint("TOPLEFT",t1,"BOTTOMLEFT",0,-8)
t2:SetPoint("RIGHT",this,"RIGHT",-32,0)
t2:SetNonSpaceWrap(true)
t2:SetFormattedText("" .. L["Notes"] .. ": %s\n" .. L["Author"] .. ": %s\n" .. L["Version"] .. ": %s",
t2:SetFormattedText("Notes: %s\nAuthor: %s\nVersion: %s",
GetAddOnMetadata("Cellular","Notes"),
GetAddOnMetadata("Cellular","Author"),
GetAddOnMetadata("Cellular","Version"))
98,7 → 96,7
CONFIGMODE_CALLBACKS=CONFIGMODE_CALLBACKS or{}
CONFIGMODE_CALLBACKS.Cellular=function(action,mode)
if action=="ON"then
SendChatMessage(L["Hey self, entering cheap config mode."],"WHISPER",nil,you)
SendChatMessage("Hey self, entering cheap config mode.","WHISPER",nil,you)
end
end
if not db.chatshow then
164,13 → 162,13
end
end
function a:CHAT_MSG_AFK(a1,a2)
a:IncomingMessage(a2,a2..L[" is AFK: "]..a1,nil,2)
a:IncomingMessage(a2,a2.." is AFK: "..a1,nil,2)
end
function a:CHAT_MSG_DND(a1,a2)
a:IncomingMessage(a2,a2..L[" is DND: "]..a1,nil,3)
a:IncomingMessage(a2,a2.." is DND: "..a1,nil,3)
end
function a:CHAT_MSG_IGNORED(_,a2)
a:IncomingMessage(a2,a2..L[" is ignoring you."],nil,4)
a:IncomingMessage(a2,a2.." is ignoring you.",nil,4)
end
local parstrings
function a:CHAT_MSG_SYSTEM(text)
328,7 → 326,7
local n=#history
local numlines=(showmore and 50)or 15
if n>numlines then
t.msg:AddMessage(L["See Cellular.lua in SavedVariables for more"],1,1,0)
t.msg:AddMessage("**See ..\\WTF \\Account \\<Account Name> \\<Server> \\<Character> \\SavedVariables \\Cellular.lua for more**",1,1,0)
end
for i=max(1,n-numlines),n,1 do
t.msg:AddMessage(history[i],0.6,0.6,0.6)
338,7 → 336,7
UpdateAddOnMemoryUsage()
local mem=GetAddOnMemoryUsage("Cellular")
if mem and mem>490 then
t.msg:AddMessage(format("( +%d KB ): "..L["History usage is high"],mem-85),0.7,0.5,0.5)
t.msg:AddMessage(format("History usage is high ( +%d KB ). Consider cleaning it.",mem-85),0.7,0.5,0.5)
end
end
a.memchecked=true
380,7 → 378,7
local id=GetWindow(name,special,nil,battleTag)
if not id then
if not special then
print(format("|cff88ff88Cellular|r: " .. L["Max windows reached"] .. " - [%s] %s",name,text))
print(format("|cff88ff88Cellular|r: Max windows reached - [%s] %s",name,text))
end
return
end
518,11 → 516,11
if not IsShiftKeyDown()then return end
local b,n=this.text,tabs[this:GetParent().tab].name
if b==_G.CHAT_INVITE_SEND then
C_PartyInfo.InviteUnit(n)
InviteUnit(n)
elseif b==_G.ADD_FRIEND then
C_FriendList.AddFriend(n)
AddFriend(n)
elseif b==_G.IGNORE_PLAYER then
C_FriendList.AddIgnore(n)
AddIgnore(n)
end
end
local function Scroll(this)
632,7 → 630,7
end
buttons={
[_G.WHO]={p="TOPLEFT",x=6,y=-22,tt=1,path="Interface\\Icons\\INV_Misc_QuestionMark",func=Who,side=true,},
[""..L["I am Busy!"]..""]={p="TOPLEFT",x=6,y=-42,tt=1,path="Interface\\Icons\\Spell_Holy_Silence",func=Busy,side=true,},
["\"I'm Busy!\""]={p="TOPLEFT",x=6,y=-42,tt=1,path="Interface\\Icons\\Spell_Holy_Silence",func=Busy,side=true,},
[_G.CHAT_INVITE_SEND]={p="TOPLEFT",x=6,y=-59,tt=2,path="Interface\\Icons\\Spell_Holy_PrayerofSpirit",func=Social,side=true,},
[_G.ADD_FRIEND]={p="TOPLEFT",x=6,y=-76,tt=2,path="Interface\\Icons\\Spell_ChargePositive",func=Social,side=true,},
[_G.IGNORE_PLAYER]={p="TOPLEFT",x=6,y=-95,tt=2,path="Interface\\Icons\\Spell_ChargeNegative",func=Social,side=true,},
700,9 → 698,9
gtt:SetText(this.text,1,1,1)
if this.tt then
if this.tt==2 then
gtt:AddLine(L[" Shift-click to execute"],0,1,0)
gtt:AddLine(" Shift-click to execute",0,1,0)
elseif not db.history and this.tt==3 then
gtt:AddLine(L[" History must be enabled"],0,1,0)
gtt:AddLine(" History must be enabled",0,1,0)
end
end
gtt:Show()
713,7 → 711,7
local function ResizeStart(this)
if not IsShiftKeyDown()then
if not a.shiftsaid2 then
print("|cff00ff00Cellular|r: " .. L["Hold shift and drag to resize."] .. "")
print("|cff00ff00Cellular|r: Hold shift and drag to resize.")
a.shiftsaid2=true
end
return
731,7 → 729,7
local function DragStart(this)
if not IsShiftKeyDown()then
if not a.shiftsaid then
print("|cff00ff00Cellular|r: " .. L["Hold shift and drag to move."] .. "")
print("|cff00ff00Cellular|r: Hold shift and drag to move.")
a.shiftsaid=true
end
return
964,10 → 962,10
UpdatePosition(f,true)
end
elseif k=="movehelp"then
print("|cff00ff00Cellular|r: " .. L["Hold shift and drag empty space."] .. "")
print("|cff00ff00Cellular|r: Hold shift and drag empty space to move or bottom-right corner to resize windows.")
elseif k=="busymessage"then
StaticPopupDialogs["CellularBusy"]=StaticPopupDialogs["CellularBusy"]or{
text=L["Set Busy Message"],
text="Set your busy message.",
button1=ACCEPT,button2=CANCEL,
hasEditBox=1,maxLetters=60,editBoxWidth=350,
OnAccept=function(this)
994,7 → 992,7
for name in pairs(svar)do
svar[name]=nil
end
print("|cff00ff00Cellular|r: "..L["history cleared."].."")
print("|cff00ff00Cellular|r: History cleared.")
elseif k=="clearold"and IsShiftKeyDown()then
local cdays=tonumber(date("%y"))*365.25+tonumber(date("%m"))*30.4+tonumber(date("%d"))
local cleared=0
1018,7 → 1016,7
end
end
end
print("|cff00ff00Cellular|r: " ..cleared.. " " .. L["history entries removed"] .."")
print("|cff00ff00Cellular|r: "..cleared.." history entries removed.")
end
end
local function Set(b,k)
1056,7 → 1054,7
UpdateTabOrder(lastwindow or taborder[1])
ChatEdit_DeactivateChat(cfeb)
elseif k=="char"or k=="chatshow"or k=="nobn"then
print("|cff00ff00Cellular|r: "..L["This setting requires a reload and will effect all characters."].."")
print("|cff00ff00Cellular|r: This setting requires a reload and will effect all characters.")
else
UpdateSettings()
end
1188,62 → 1186,62
CellularDD.initialize=function(self,lvl)
if lvl==1 then
if showid then
AddExecute(lvl,L["Show Message (or left-click)"],"showtab",showid)
AddExecute(lvl,L["Close Tab (or middle-click)"],"removetab",showid)
AddExecute(lvl,"Show Message (or left-click)","showtab",showid)
AddExecute(lvl,"Close Tab (or middle-click)","removetab",showid)
info.isTitle=true
AddButton(lvl," ")
AddExecute(lvl,L["Options"],"showoptions")
AddExecute(lvl,"Options","showoptions")
else
info.isTitle=true
info.notCheckable=1
AddButton(lvl,"|cff5555ffCellular|r")
AddList(lvl,L["Frame"],"frame")
AddList(lvl,L["Text"],"text")
AddList(lvl,L["Behavior"],"behave")
AddList(lvl,L["History"],"history")
AddList(lvl,"Frame","frame")
AddList(lvl,"Text","text")
AddList(lvl,"Behavior","behave")
AddList(lvl,"History","history")
end
elseif lvl==2 then
local sub=UIDROPDOWNMENU_MENU_VALUE
if sub=="frame"then
AddList(lvl,L["Texture Group"],"bglist")
AddList(lvl,L["Background Texture"],"bg")
AddColor(lvl,L["Background Color"],"bgcolor")
AddList(lvl,L["Border"],"border")
AddColor(lvl,L["Border Color"],"bordercolor")
AddToggle(lvl,L["Show Side Buttons"],"showside")
AddList(lvl,L["Frame Opacity"],"alpha")
AddList(lvl,L["Frame Strata"],"strata")
AddExecute(lvl,L["Reset Size and Position"],"resetsizes")
AddExecute(lvl,L["How to Move-Resize"],"movehelp")
AddList(lvl,"Texture Group","bglist")
AddList(lvl,"Background Texture","bg")
AddColor(lvl,"Background Color","bgcolor")
AddList(lvl,"Border","border")
AddColor(lvl,"Border Color","bordercolor")
AddToggle(lvl,"Show Side Buttons","showside")
AddList(lvl,"Frame Opacity","alpha")
AddList(lvl,"Frame Strata","strata")
AddExecute(lvl,"Reset Size and Position","resetsizes")
AddExecute(lvl,"How to Move/Resize","movehelp")
elseif sub=="text"then
AddToggle(lvl,L["Show Name"],"showname")
AddToggle(lvl,L["Show Timestamp"],"showtime")
AddToggle(lvl,L["Fade Old Messages"],"fade")
AddList(lvl,L["Title Font"],"fonttitle")
AddList(lvl,L["Title Style"],"fonttitlestyle")
AddList(lvl,L["Message Font"],"fontmsg")
AddList(lvl,L["Message Style"],"fontmsgstyle")
AddList(lvl,L["Message Font Size"],"fontsize")
AddColor(lvl,L["Incoming Font Color"],"incolor")
AddColor(lvl,L["Outgoing Font Color"],"outcolor")
AddToggle(lvl,"Show Name","showname")
AddToggle(lvl,"Show Timestamp","showtime")
AddToggle(lvl,"Fade Old Messages","fade")
AddList(lvl,"Title Font","fonttitle")
AddList(lvl,"Title Style","fonttitlestyle")
AddList(lvl,"Message Font","fontmsg")
AddList(lvl,"Message Style","fontmsgstyle")
AddList(lvl,"Message Font Size","fontsize")
AddColor(lvl,"Incoming Font Color","incolor")
AddColor(lvl,"Outgoing Font Color","outcolor")
elseif sub=="behave"then
AddToggle(lvl,L["Use Tabs"],"enabletabs")
AddToggle(lvl,L["No battle.net"],"nobn")
AddToggle(lvl,L["Combat Auto-Minimize"],"automin")
AddToggle(lvl,L["Always Auto-Minimize"],"autominalways")
AddToggle(lvl,L["Editbox Top Anchor"],"showtop")
AddToggle(lvl,L["Disable EditBox Move"],"noattach")
AddToggle(lvl,L["Disable Block to Default"],"chatshow")
AddList(lvl,L["Maximum Windows-Tabs"],"maxwindows")
AddExecute(lvl,L["Set Busy Message"],"busymessage")
AddToggle(lvl,L["Save Settings Per Character"],"char")
AddToggle(lvl,"Use Tabs","enabletabs")
AddToggle(lvl,"No battle.net","nobn")
AddToggle(lvl,"Combat Auto-Minimize","automin")
AddToggle(lvl,"Always Auto-Minimize","autominalways")
AddToggle(lvl,"Editbox Top Anchor","showtop")
AddToggle(lvl,"Disable EditBox Move","noattach")
AddToggle(lvl,"Disable Block to Default","chatshow")
AddList(lvl,"Maximum Windows/Tabs","maxwindows")
AddExecute(lvl,"Set Busy Message","busymessage")
AddToggle(lvl,"Save Settings Per Character","char")
elseif sub=="history"then
AddToggle(lvl,L["Enable History"],"history")
AddList(lvl,L["Show Recent"],"recent")
AddList(lvl,L["Show Entry"],"show")
AddList(lvl,L["Clear Entry (hold shift)"],"clear")
AddExecute(lvl,L["Clear +6 Weeks (hold shift)"],"clearold")
AddExecute(lvl,L["Clear All (hold shift)"],"clearall")
AddToggle(lvl,"Enable History","history")
AddList(lvl,"Show Recent","recent")
AddList(lvl,"Show Entry","show")
AddList(lvl,"Clear Entry (hold shift)","clear")
AddExecute(lvl,"Clear +6 Weeks (hold shift)","clearold")
AddExecute(lvl,"Clear All (hold shift)","clearall")
end
elseif lvl==3 then
local sub=UIDROPDOWNMENU_MENU_VALUE
1262,19 → 1260,19
elseif sub=="fontsize"then
AddFakeSlider(lvl,sub,4,30,1)
elseif sub=="fonttitlestyle"or sub=="fontmsgstyle"then
AddSelect(lvl,L["None"],sub,"None")
AddSelect(lvl,L["Shadow"],sub,"Shadow")
AddSelect(lvl,L["Outline"],sub,"OUTLINE")
AddSelect(lvl,L["Thick Outline"],sub,"THICKOUTLINE")
AddSelect(lvl,L["Monochrome"],sub,"MONOCHROME")
AddSelect(lvl,"None",sub,"None")
AddSelect(lvl,"Shadow",sub,"Shadow")
AddSelect(lvl,"Outline",sub,"OUTLINE")
AddSelect(lvl,"Thick Outline",sub,"THICKOUTLINE")
AddSelect(lvl,"Monochrome",sub,"MONOCHROME")
elseif sub=="alpha"then
AddFakeSlider(lvl,sub,0,1,0.1)
elseif sub=="strata"then
AddSelect(lvl,L["BACKGROUND"],sub,"BACKGROUND")
AddSelect(lvl,L["LOW"],sub,"LOW")
AddSelect(lvl,L["MEDIUM"],sub,"MEDIUM")
AddSelect(lvl,L["HIGH"],sub,"HIGH")
AddSelect(lvl,L["DIALOG"],sub,"DIALOG")
AddSelect(lvl,"BACKGROUND",sub,"BACKGROUND")
AddSelect(lvl,"LOW",sub,"LOW")
AddSelect(lvl,"MEDIUM",sub,"MEDIUM")
AddSelect(lvl,"HIGH",sub,"HIGH")
AddSelect(lvl,"DIALOG",sub,"DIALOG")
elseif sub=="maxwindows"then
AddFakeSlider(lvl,sub,4,20,1)
elseif sub=="recent"or sub=="show"or sub=="clear"then