-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBulkMailFu.lua
More file actions
44 lines (39 loc) · 1.26 KB
/
BulkMailFu.lua
File metadata and controls
44 lines (39 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
if BulkMailFu then return end
BulkMailFu = AceLibrary("AceAddon-2.0"):new("AceDB-2.0", "FuBarPlugin-2.0")
local L = BulkMail and BulkMail.L or BulkMailInbox.L
function BulkMailFu:OnInitialize()
self:RegisterDB(BulkMail and "BulkMail2DB" or "BulkMail2InboxDB")
self:RegisterDefaults('profile', {})
self.hasIcon = true
self.hideWithoutStandby = true
self.hasNoText = true
self.hasNoColor = true
self.blizzardTooltip = true
self.defaultPosition = "RIGHT"
self.independentProfile = true
self:SetIcon(true)
end
function BulkMailFu:OnEnable()
self.opts = {}
if BulkMail then self.opts = BulkMail.opts end
if BulkMailInbox then
if BulkMail then
self.opts.args.inbox = { type = 'group', handler = BulkMailInbox, name = L["Inbox"], desc = L["BulkMailInbox Options"], args = BulkMailInbox.opts.args }
else
self.opts = BulkMailInbox.opts
end
end
self.opts.args.profile.hidden = true
self.opts.args.standby.hidden = true
end
function BulkMailFu:OnMenuRequest()
AceLibrary('Dewdrop-2.0'):FeedAceOptionsTable(self.opts)
end
function BulkMailFu:OnClick()
if BulkMail then BulkMail:OpenAutoSendEditTablet() end
end
function BulkMailFu:OnTooltipUpdate()
if BulkMail then
GameTooltip:AddLine(L["Hint: Click to show the AutoSend Rules editor."], 0, 1, 0, 1)
end
end