-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5f642dd
Showing
150 changed files
with
66,291 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Interface: 100002 | ||
## Title: Broker2FuBar | ||
## Notes: Shows your LDB sources in FuBar. | ||
## Author: Kemayo, Adirelle, Arrowmaster | ||
## Version: 1.0 | ||
## X-Category: Miscellaneous | ||
## OptionalDeps: Ace3, LibFuBarPlugin-3.0, FuBar, FuBar2Broker | ||
## SavedVariables: Broker2FuBarDB | ||
|
||
libs\LibStub\LibStub.lua | ||
libs\CallbackHandler-1.0\CallbackHandler-1.0.xml | ||
|
||
#@no-lib-strip@ | ||
libs\AceAddon-3.0\AceAddon-3.0.xml | ||
libs\AceGUI-3.0\AceGUI-3.0.xml | ||
libs\AceConfig-3.0\AceConfig-3.0.xml | ||
libs\AceDB-3.0\AceDB-3.0.xml | ||
libs\AceConsole-3.0\AceConsole-3.0.xml | ||
libs\LibFuBarPlugin-3.0\lib.xml | ||
#@end-no-lib-strip@ | ||
|
||
libs\LibDataBroker-1.1\LibDataBroker-1.1.lua | ||
|
||
core.lua | ||
pluginPrototype.lua | ||
options.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
------------------------------------------------------------------------ | ||
r29 | adirelle | 2008-10-17 23:17:10 +0000 (Fri, 17 Oct 2008) | 1 line | ||
Changed paths: | ||
A /tags/1.1 (from /trunk:28) | ||
|
||
Tagging as 1.1. | ||
------------------------------------------------------------------------ | ||
r28 | adirelle | 2008-10-17 15:39:55 +0000 (Fri, 17 Oct 2008) | 1 line | ||
Changed paths: | ||
M /trunk/core.lua | ||
|
||
Register the Blizzard UI on initialization, instead of postponing it to first /b2f use. | ||
------------------------------------------------------------------------ | ||
r27 | adirelle | 2008-10-17 14:25:03 +0000 (Fri, 17 Oct 2008) | 2 lines | ||
Changed paths: | ||
M /trunk | ||
M /trunk/.pkgmeta | ||
M /trunk/Broker2FuBar.toc | ||
M /trunk/core.lua | ||
|
||
Fix externals and remove AceHook-3.0 (that wasn't even used). | ||
Use Blizzard options UI for configuration. | ||
------------------------------------------------------------------------ | ||
r25 | arrowmaster | 2008-10-17 00:51:02 +0000 (Fri, 17 Oct 2008) | 1 line | ||
Changed paths: | ||
M /trunk/Broker2FuBar.toc | ||
|
||
Didn't mean to bump the version to 1.1 when 1.0 hasn't been 'released' yet | ||
------------------------------------------------------------------------ | ||
r24 | arrowmaster | 2008-10-17 00:44:27 +0000 (Fri, 17 Oct 2008) | 2 lines | ||
Changed paths: | ||
M /trunk | ||
M /trunk/.pkgmeta | ||
M /trunk/Broker2FuBar.toc | ||
M /trunk/core.lua | ||
D /trunk/embeds.xml | ||
D /trunk/libs | ||
M /trunk/options.lua | ||
M /trunk/pluginPrototype.lua | ||
|
||
Rightclicks now passed to LDB plugin, use /b2f to configure the FuBar plugins | ||
Uses LibFuBarPlugin-3.0 instead of LibFuBarPlugin-Mod-3.0 | ||
------------------------------------------------------------------------ | ||
r19 | pneumatus | 2008-10-15 16:38:37 +0000 (Wed, 15 Oct 2008) | 2 lines | ||
Changed paths: | ||
M /trunk | ||
M /trunk/.pkgmeta | ||
M /trunk/embeds.xml | ||
|
||
Broker2FuBar: | ||
- Fix missing libs | ||
------------------------------------------------------------------------ | ||
r18 | root | 2008-09-30 23:06:43 +0000 (Tue, 30 Sep 2008) | 1 line | ||
Changed paths: | ||
M /trunk | ||
A /trunk/.pkgmeta | ||
|
||
Facilitate WowAce-on-CurseForge transition | ||
------------------------------------------------------------------------ | ||
r16 | root | 2008-09-30 22:35:19 +0000 (Tue, 30 Sep 2008) | 1 line | ||
Changed paths: | ||
D /tmp/trunk/Broker2FuBar | ||
A /trunk (from /tmp/trunk/Broker2FuBar:15) | ||
|
||
Importing oldrepo data under /trunk | ||
------------------------------------------------------------------------ | ||
r15 | sayclub | 2008-09-10 23:23:14 +0000 (Wed, 10 Sep 2008) | 2 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/options.lua | ||
|
||
Broker2FuBar: | ||
- fixed a typo in localization | ||
------------------------------------------------------------------------ | ||
r14 | adirelle | 2008-09-10 18:31:13 +0000 (Wed, 10 Sep 2008) | 4 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/Broker2FuBar.toc | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
M /tmp/trunk/Broker2FuBar/pluginPrototype.lua | ||
|
||
Broker2FuBar: | ||
- only wrap launcher and data sources, | ||
- display label or name in tooltip if neither OnTooltipShow nor OnEnter is provided, | ||
- added a safety net to prevent evil things to happen when FuBar2Broker is loaded. | ||
------------------------------------------------------------------------ | ||
r13 | adirelle | 2008-09-05 13:00:13 +0000 (Fri, 05 Sep 2008) | 3 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/pluginPrototype.lua | ||
|
||
Broker2FuBar: | ||
- fixed a bug where the plugin icon was not updated when the .icon attribute was changed, | ||
- the plugins now only register callbacks while enabled. | ||
------------------------------------------------------------------------ | ||
r12 | adirelle | 2008-08-30 09:40:25 +0000 (Sat, 30 Aug 2008) | 3 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/Broker2FuBar.toc | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
M /tmp/trunk/Broker2FuBar/options.lua | ||
A /tmp/trunk/Broker2FuBar/pluginPrototype.lua | ||
|
||
Broker2FuBar: | ||
- fixed error on plugin dragging, | ||
- do not create AceAddon-3.0 object on the fly anymore, use internal structure instead. | ||
------------------------------------------------------------------------ | ||
r11 | adirelle | 2008-08-26 05:46:29 +0000 (Tue, 26 Aug 2008) | 3 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
|
||
Broker2FuBar: | ||
- provide the fubar plugin frame to :OnEnter / :OnClick method, instead of the FuBar panel. | ||
- dropped support of deprecated .tooltiptext attribute. | ||
------------------------------------------------------------------------ | ||
r10 | adirelle | 2008-08-11 19:21:44 +0000 (Mon, 11 Aug 2008) | 1 line | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
M /tmp/trunk/Broker2FuBar/options.lua | ||
|
||
Broker2FuBar: configuration is now working. | ||
------------------------------------------------------------------------ | ||
r9 | adirelle | 2008-08-11 15:12:05 +0000 (Mon, 11 Aug 2008) | 6 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar | ||
M /tmp/trunk/Broker2FuBar/Broker2FuBar.toc | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
A /tmp/trunk/Broker2FuBar/embeds.xml | ||
A /tmp/trunk/Broker2FuBar/libs/LibFuBarPlugin-Mod-3.0 | ||
A /tmp/trunk/Broker2FuBar/libs/LibFuBarPlugin-Mod-3.0/LibFuBarPlugin-Mod-3.0.lua | ||
A /tmp/trunk/Broker2FuBar/libs/LibFuBarPlugin-Mod-3.0/lib.xml | ||
M /tmp/trunk/Broker2FuBar/options.lua | ||
|
||
Broker2FuBar: | ||
- added the options to disable the plugins (not fully working), | ||
- hard-embedded LibStub'd FuBarPlugin (so it should work without manual checkout), | ||
- fixed externals, | ||
- added embeds.xml. | ||
|
||
------------------------------------------------------------------------ | ||
r8 | adirelle | 2008-08-10 23:09:08 +0000 (Sun, 10 Aug 2008) | 1 line | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/Broker2FuBar.toc | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
A /tmp/trunk/Broker2FuBar/options.lua | ||
|
||
Broker2FuBar: now provides some configuration. | ||
------------------------------------------------------------------------ | ||
r7 | adirelle | 2008-08-10 22:05:54 +0000 (Sun, 10 Aug 2008) | 2 lines | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar/core.lua | ||
|
||
Broker2FuBar: added support for the following attributes : tooltip, tooltiptext, OnEnter, OnLeave. | ||
|
||
------------------------------------------------------------------------ | ||
r6 | kemayo | 2008-08-03 23:49:26 +0000 (Sun, 03 Aug 2008) | 1 line | ||
Changed paths: | ||
M /tmp/trunk/Broker2FuBar | ||
M /tmp/trunk/Broker2FuBar/Broker2FuBar.toc | ||
|
||
Broker2FuBar: Externals, blah blah blah | ||
------------------------------------------------------------------------ | ||
r5 | kemayo | 2008-08-03 23:40:30 +0000 (Sun, 03 Aug 2008) | 2 lines | ||
Changed paths: | ||
A /tmp/trunk/Broker2FuBar | ||
A /tmp/trunk/Broker2FuBar/Broker2FuBar.toc | ||
A /tmp/trunk/Broker2FuBar/core.lua | ||
A /tmp/trunk/Broker2FuBar/libs | ||
A /tmp/trunk/Broker2FuBar/libs/LibDataBroker-1.1 | ||
A /tmp/trunk/Broker2FuBar/libs/LibDataBroker-1.1/LibDataBroker-1.1.lua | ||
|
||
Broker2FuBar: This is really, really rough. It has no config. But it does work. | ||
|
||
------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
local ldb = LibStub:GetLibrary("LibDataBroker-1.1") | ||
local lfbp = LibStub:GetLibrary("LibFuBarPlugin-3.0") | ||
|
||
local AceAddon = LibStub("AceAddon-3.0") | ||
local addon = AceAddon:NewAddon("Broker2FuBar", "AceConsole-3.0") | ||
|
||
addon.registry = {} | ||
addon.fubared = {} | ||
|
||
function addon:OnInitialize() | ||
if IsAddOnLoaded('FuBar2Broker') then | ||
self:Print(self.name..' disabled itself because FuBar2Broker is loaded. Running these two addons at the same time is a very bad idea.') | ||
self:SetEnabledState(false) | ||
return | ||
end | ||
|
||
self.db = LibStub("AceDB-3.0"):New("Broker2FuBarDB", { | ||
profile = { | ||
objects = { | ||
['*'] = true, | ||
}, | ||
}, | ||
}) | ||
|
||
LibStub("AceConfig-3.0"):RegisterOptionsTable(self.name, self.options) | ||
self:RegisterChatCommand("b2f", "OpenGUI", true) | ||
self.blizzardOptionPanel = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(self.name, self.name) | ||
|
||
for name, data_object in ldb:DataObjectIterator() do | ||
self:RegisterObject(name, data_object) | ||
end | ||
ldb.RegisterCallback(self, "LibDataBroker_DataObjectCreated") | ||
end | ||
|
||
function addon:OpenGUI() | ||
InterfaceOptionsFrame_OpenToCategory(self.blizzardOptionPanel) | ||
end | ||
|
||
function addon:LibDataBroker_DataObjectCreated(event, name, data_object) | ||
self:RegisterObject(name, data_object) | ||
end | ||
|
||
function addon:RegisterObject(name, data_object) | ||
if data_object.type ~= 'launcher' and data_object.type ~= 'data source' then | ||
return | ||
end | ||
if not self.registry[name] then | ||
self.registry[name] = data_object.label or name | ||
end | ||
if self:IsObjectEnabled(name) then | ||
self:OnObjectEnable(name, data_object) | ||
end | ||
end | ||
|
||
function addon:IsObjectEnabled(name) | ||
return self.db.profile.objects[name] | ||
end | ||
|
||
function addon:EnableObject(name, value) | ||
if value and not self.db.profile.objects[name] then | ||
self.db.profile.objects[name] = true | ||
self:OnObjectEnable(name) | ||
elseif not value and self.db.profile.objects[name] then | ||
self.db.profile.objects[name] = false | ||
self:OnObjectDisable(name) | ||
end | ||
end | ||
|
||
function addon:OnObjectEnable(name, data_object) | ||
local fu = self:FuBarize(name, data_object) | ||
fu:Enable() | ||
end | ||
|
||
function addon:OnObjectDisable(name) | ||
local fu = self.fubared[name] | ||
if not fu then return end | ||
fu:Disable() | ||
end | ||
|
||
function addon:FuBarize(name, data_object) | ||
if self.fubared[name] then | ||
return self.fubared[name] | ||
end | ||
data_object = data_object or ldb:GetDataObjectByName(name) | ||
|
||
-- Create the pseudo-addon | ||
local fu = setmetatable({ | ||
name = name .. "_B2F", | ||
data_object_name = name, | ||
data_object = data_object, | ||
db = self.db:RegisterNamespace(name, {profile={}}) | ||
}, self.pluginPrototypeMetatable) | ||
|
||
-- Embeds FuBarPlugin | ||
lfbp:Embed(fu) | ||
|
||
-- Initiialize it | ||
fu:Initialize() | ||
|
||
-- Create the option group | ||
local optKey = name:gsub('%s', '_') | ||
self.objectOptions[optKey] = setmetatable({ | ||
name = data_object.label or name, | ||
handler = fu | ||
}, self.objectOptionsMetaTable) | ||
|
||
self.fubared[name] = fu | ||
return fu | ||
end |
Oops, something went wrong.