diff Main.lua @ 270:e1566483082c

Added visual menu for selecting a comment subject via minimap icon (defaults to off), LDB icon, or the /comment command without an argument.
author James D. Callahan III <jcallahan@curse.com>
date Thu, 21 Mar 2013 15:11:34 -0500
parents 03f1fbe64104
children 495108578530
line wrap: on
line diff
--- a/Main.lua	Wed Mar 20 18:28:25 2013 -0500
+++ b/Main.lua	Thu Mar 21 15:11:34 2013 -0500
@@ -50,6 +50,11 @@
 local DATABASE_DEFAULTS = {
     char = {},
     global = {
+        config = {
+            minimap_icon = {
+                hide = true,
+            },
+        },
         items = {},
         npcs = {},
         objects = {},
@@ -299,6 +304,7 @@
     end
     return unit
 end
+
 private.DBEntry = DBEntry
 
 local NPCEntry
@@ -373,6 +379,7 @@
     end
     return tonumber(item_link:match("item:(%d+)"))
 end
+
 private.ItemLinkToID = ItemLinkToID
 
 local function UnitTypeIsNPC(unit_type)
@@ -710,10 +717,11 @@
 
 function WDP:OnInitialize()
     local db = LibStub("AceDB-3.0"):New("WoWDBProfilerData", DATABASE_DEFAULTS, "Default")
+    private.db = db
     global_db = db.global
     char_db = db.char
 
-    local raw_db = _G["WoWDBProfilerData"]
+    local raw_db = _G.WoWDBProfilerData
     local build_num = tonumber(private.build_num)
 
     if (raw_db.version and raw_db.version < DB_VERSION) or (raw_db.build_num and raw_db.build_num < build_num) then
@@ -725,6 +733,7 @@
     raw_db.version = DB_VERSION
 
     if DEBUGGING then -- TODO: Remove this when comment subsystem is finished.
+        private.InitializeCommentSystem()
         self:RegisterChatCommand("comment", private.ProcessCommentCommand)
     end
 end