comparison Devian.lua @ 46:dcc57a7cabc9

re-adding Dock.lua to prep for revised implementation plans
author Nenue
date Sun, 03 Jan 2016 15:49:35 -0500
parents 5341e4d84622
children eb7544afd77a
comparison
equal deleted inserted replaced
45:5341e4d84622 46:dcc57a7cabc9
4 -- @file-revision@ @file-hash@ 4 -- @file-revision@ @file-hash@
5 if not LibStub then 5 if not LibStub then
6 print('Something has happened...') 6 print('Something has happened...')
7 end 7 end
8 Devian = LibStub("AceAddon-3.0"):NewAddon("Devian", "AceConsole-3.0", "AceEvent-3.0") 8 Devian = LibStub("AceAddon-3.0"):NewAddon("Devian", "AceConsole-3.0", "AceEvent-3.0")
9 Devian:SetDefaultModuleState(false) 9 local D = _G.Devian
10 D:SetDefaultModuleState(false)
11
10 local MAJOR, MINOR = 'Devian-1.3', 'r@project-revision@' 12 local MAJOR, MINOR = 'Devian-1.3', 'r@project-revision@'
11 local D = _G.Devian
12 local MSG_NEED_DEV_MODE = 'Must be in development mode to use this function.' 13 local MSG_NEED_DEV_MODE = 'Must be in development mode to use this function.'
13 local WORKSPACE_ON, WORKSPACE_OFF = 1, 2 14 local WORKSPACE_ON, WORKSPACE_OFF = 1, 2
14 local PLAYER_REALM = UnitName("player") .. '-' .. GetRealmName() 15 local PLAYER_REALM = UnitName("player") .. '-' .. GetRealmName()
15 local print = _G.print 16 local print = _G.print
16 local db 17 local db
315 for i = 1, select('#',...) do 316 for i = 1, select('#',...) do
316 local var = select(i, ...) 317 local var = select(i, ...)
317 318
318 if type(var) == 'table' then 319 if type(var) == 'table' then
319 if type(var.GetName) == 'function' then 320 if type(var.GetName) == 'function' then
320 var = '<table:'..var:GetName()..'>' 321 var = '<table:'..tostring(var:GetName())..'>'
321 else 322 else
322 var = '<'..tostring(var)..'>' 323 var = '<'..tostring(var)..'>'
323 end 324 end
324 325
325 elseif type(var) == 'boolean' then 326 elseif type(var) == 'boolean' then
451 self:SetChannel(cinfo, i) 452 self:SetChannel(cinfo, i)
452 self.max_channel = math.max(i, self.max_channel) 453 self.max_channel = math.max(i, self.max_channel)
453 self.num_channels = self.num_channels + 1 454 self.num_channels = self.num_channels + 1
454 end 455 end
455 456
456
457 for i, channel in pairs(db.channels) do 457 for i, channel in pairs(db.channels) do
458 if type(channel.docked) == 'table' then 458 if type(channel.docked) == 'table' then
459 --oldprint('docking',i, unpack(channel.docked)) 459 --oldprint('docking',i, unpack(channel.docked))
460 self.DockFrame(i, unpack(channel.docked)) 460 self.DockFrame(i, unpack(channel.docked))
461 end 461 end
463 463
464 if self.console[db.current_channel] then 464 if self.console[db.current_channel] then
465 self.console[db.current_channel]:ToFront() 465 self.console[db.current_channel]:ToFront()
466 -- bring the current channel to the front 466 -- bring the current channel to the front
467 end 467 end
468 self.dock = DevianDock
469
470
468 setprinthandler(Message) 471 setprinthandler(Message)
469 print = function(...) 472 print = function(...)
470 _G.print('Dvn', ...) 473 _G.print('Dvn', ...)
471 end 474 end
472 end 475 end