Quantcast

Stuff

MilleXIV [08-28-16 - 21:15]
Stuff
Filename
modules/system.lua
modules/travel.lua
diff --git a/modules/system.lua b/modules/system.lua
index 09ff40e..e7ae8ba 100644
--- a/modules/system.lua
+++ b/modules/system.lua
@@ -248,7 +248,7 @@ function SystemModule:ShowTooltip()
   for i = 1, totalAddons do
     local _, aoName, _ = GetAddOnInfo(i)
     local mem = GetAddOnMemoryUsage(i)
-    tinsert(memTable, {memory = mem, name = aoName})
+    table.insert(memTable, {memory = mem, name = aoName})
   end

   table.sort(memTable, function(a, b)
@@ -266,13 +266,15 @@ function SystemModule:ShowTooltip()

   for i = 1, toLoop do
     local memString = ''
-    if memTable[i].memory > 0 then
-      if memTable[i].memory > 1024 then
-        memString = string.format("%.2f MB", (memTable[i].memory / 1024))
-      else
-        memString = string.format("%.0f KB", floor(memTable[i].memory))
+    if memTable[i] then
+      if memTable[i].memory > 0 then
+        if memTable[i].memory > 1024 then
+          memString = string.format("%.2f MB", (memTable[i].memory / 1024))
+        else
+          memString = string.format("%.0f KB", floor(memTable[i].memory))
+        end
+        GameTooltip:AddDoubleLine(memTable[i].name, memString, 1, 1, 0, 1, 1, 1)
       end
-      GameTooltip:AddDoubleLine(memTable[i].name, memString, 1, 1, 0, 1, 1, 1)
     end
   end

diff --git a/modules/travel.lua b/modules/travel.lua
index a0cfbe0..2b87882 100644
--- a/modules/travel.lua
+++ b/modules/travel.lua
@@ -220,7 +220,7 @@ function TravelModule:CreatePortPopup()

   local db = xb.db.profile
   self.portOptionString = self.portOptionString or self.portPopup:CreateFontString(nil, 'OVERLAY')
-  self.portOptionString:SetFont(xb.LSM:Fetch(xb.LSM.MediaType.FONT, db.text.font), db.text.fontSize + self.optionTextExtra)
+  self.portOptionString:SetFont(xb:GetFont(db.text.fontSize + self.optionTextExtra))
   self.portOptionString:SetTextColor(db.color.normal.r, db.color.normal.g, db.color.normal.b, db.color.normal.a)
   self.portOptionString:SetText(L['Port Options'])
   self.portOptionString:SetPoint('TOP', 0, -(xb.constants.popupPadding))
@@ -304,7 +304,7 @@ function TravelModule:Refresh()

   if InCombatLockdown() then
     self.hearthText:SetText(GetBindLocation())
-    self.portText:SetText(xb.db.modules.travel.portItem.text)
+    self.portText:SetText(xb.db.profile.modules.travel.portItem.text)
     self:SetHearthColor()
     self:SetPortColor()
   end
@@ -345,8 +345,7 @@ function TravelModule:Refresh()

   self:CreatePortPopup()
   self.portPopup:SetPoint('BOTTOM', self.portButton, 'TOP', 0, xb.constants.popupPadding)
-  local mainTexture = string.sub(xb.frames.bgTexture:GetTexture(), 7)
-  self.popupTexture:SetColorTexture(xb:HexToRGBA(mainTexture))
+  self.popupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a)
   self.popupTexture:SetAllPoints()
   self.portPopup:Hide()