diff Devian.lua @ 91:bb403e03d82d

- /dvc command needed a pre-defined enclosure to properly work through SlashCmdList - /dvn <profile name> and /dvn save <profile name> should resolve to and update the correct profile. - set some globals indicating the name and index of the workspace in use - DEVIAN_WORKSPACE (bool) - DEVIAN_PNAME (string) - DEVIAN_PID (number)
author Nenue
date Wed, 10 Aug 2016 07:10:55 -0400
parents b3ed963f482d
children 4370eefcecdd
line wrap: on
line diff
--- a/Devian.lua	Wed Aug 10 06:58:47 2016 -0400
+++ b/Devian.lua	Wed Aug 10 07:10:55 2016 -0400
@@ -3,7 +3,11 @@
 -- @project-revision@ @project-hash@
 -- @file-revision@ @file-hash@
 
---GLOBALS: Devian, DevCon, DevianLoadMessage, DEVIAN_WORKSPACE
+--GLOBALS: Devian, DevianLoadMessage, DEVIAN_WORKSPACE, DEVIAN_PNAME, DEVIAN_PID
+
+DEVIAN_WORKSPACE = false
+DEVIAN_PNAME = 'Dvn'
+DEVIAN_PID = 0
 
 local ADDON, D = ...
 local MAJOR, MINOR = 'Devian-2.0', 'r@project-revision@'
@@ -17,9 +21,6 @@
 local playerName = UnitName("player")
 local playerRealm = playerName .. '-' .. GetRealmName()
 local num_dock_tabs = 0
-DEVIAN_WORKSPACE = false
-DEVIAN_PNAME = 'Dvn'
-DEVIAN_PID = 0
 
 
 DevianLoadMessage = setmetatable({}, {
@@ -226,7 +227,7 @@
   currentProfile.char[playerRealm] = currentProfile.char[playerRealm] or {}
   if currentProfile.workspace then
     DEVIAN_WORKSPACE = true
-    DEVIAN_PNAME = name
+    DEVIAN_PNAME = currentProfile.name
     DEVIAN_PID = id
     setprinthandler(D.Message)
   else