Mercurial > wow > ouroloot
comparison gui.lua @ 39:8f7ec6ccf5e3
Comment/debug changes to help in tracking down cache bug. Do not run OnAccept when pressing Enter in an empty editbox.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Thu, 29 Dec 2011 23:15:51 +0000 |
parents | cd745a18d7c7 |
children | dc3a66688e50 |
comparison
equal
deleted
inserted
replaced
38:bb41be8f13b2 | 39:8f7ec6ccf5e3 |
---|---|
1497 w = GUI:Create("CheckBoxSmallLabel") | 1497 w = GUI:Create("CheckBoxSmallLabel") |
1498 w:SetFullWidth(true) | 1498 w:SetFullWidth(true) |
1499 w:SetType("checkbox") | 1499 w:SetType("checkbox") |
1500 w:SetLabel(d) | 1500 w:SetLabel(d) |
1501 if d == "notraid" then | 1501 if d == "notraid" then |
1502 w:SetDescription("Tick this before enabling to make the addon work outside of raid groups") | 1502 w:SetDescription[[Tick this before enabling to make the addon work outside of raid groups]] |
1503 elseif d == "alsolog" then | |
1504 w:SetDescription[[Also log all debug messages to disk. See print_log.lua in the addon folder for later viewing.]] | |
1503 else | 1505 else |
1504 w:SetDisabled(not addon.DEBUG_PRINT) | 1506 w:SetDisabled(not addon.DEBUG_PRINT) |
1505 end | 1507 end |
1506 w:SetValue(v) | 1508 w:SetValue(v) |
1507 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) | 1509 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) |
2219 dialog.wideEditBox:SetText("") | 2221 dialog.wideEditBox:SetText("") |
2220 dialog.wideEditBox:SetFocus() | 2222 dialog.wideEditBox:SetFocus() |
2221 end,]] | 2223 end,]] |
2222 } | 2224 } |
2223 t.EditBoxOnEnterPressed = function(editbox) | 2225 t.EditBoxOnEnterPressed = function(editbox) |
2226 if editbox:GetText() == "" then return end | |
2224 local dialog = editbox:GetParent() | 2227 local dialog = editbox:GetParent() |
2225 if not eoi_st_insert_OnAccept (dialog, dialog.data) then | 2228 if not eoi_st_insert_OnAccept (dialog, dialog.data) then |
2226 dialog:Hide() -- replicate OnAccept click behavior | 2229 dialog:Hide() -- replicate OnAccept click behavior |
2227 end | 2230 end |
2228 end | 2231 end |