From 901d951f5bd0309229bd61a69a49aa5b7091130f Mon Sep 17 00:00:00 2001 From: Talyrius Date: Wed, 31 Jul 2024 07:33:47 -0700 Subject: [PATCH] Revert "Discontinued message. Thanks for everything, folks!" This reverts commit 9477cd0b27e281889ee959832ac8fd3ffcd70cf9. --- AdiBags.toc | 76 ++++++++++++++++++++++---------------------- core/Boot.lua | 6 +--- core/Core.lua | 6 ++-- core/Deprecation.lua | 14 ++++++-- 4 files changed, 53 insertions(+), 49 deletions(-) diff --git a/AdiBags.toc b/AdiBags.toc index 7319f1e..606d246 100644 --- a/AdiBags.toc +++ b/AdiBags.toc @@ -46,46 +46,46 @@ libs\LibDataBroker-1.1\LibDataBroker-1.1.lua core\EventHandlers.lua core\Boot.lua -#Localization.lua +Localization.lua -#core\Experiments.lua -#core\Fonts.lua -#core\Constants.lua -#core\Utility.lua -#core\Theme.lua -#core\Core.lua -#core\Hooks.lua -#core\Bags.lua -#core\Filters.lua -#core\Layout.lua -#core\OO.lua +core\Experiments.lua +core\Fonts.lua +core\Constants.lua +core\Utility.lua +core\Theme.lua +core\Core.lua +core\Hooks.lua +core\Bags.lua +core\Filters.lua +core\Layout.lua +core\OO.lua -#widgets\LayeredRegion.lua -#widgets\grid\Dropzone.lua -#widgets\grid\Cell.lua -#widgets\grid\Column.lua -#widgets\grid\Grid.lua -#widgets\ContainerFrame.lua -#widgets\BagSlots.lua -#widgets\ItemButton.lua -#widgets\Section.lua -#widgets\AnchorWidget.lua -# -#modules\DataSource.lua -#modules\NewItemTracking.lua -#modules\MoneyFrame.lua -#modules\FilterOverride.lua -#modules\ItemLevel.lua -#modules\Junk.lua -#modules\CurrencyFrame.lua -#modules\TooltipInfo.lua -#modules\SectionVisibilityDropdown.lua -#modules\BankSwitcher.lua -#modules\ChangeHighlight.lua -#modules\Masque.lua -# -#core\ItemDatabase.lua -#core\DefaultFilters.lua +widgets\LayeredRegion.lua +widgets\grid\Dropzone.lua +widgets\grid\Cell.lua +widgets\grid\Column.lua +widgets\grid\Grid.lua +widgets\ContainerFrame.lua +widgets\BagSlots.lua +widgets\ItemButton.lua +widgets\Section.lua +widgets\AnchorWidget.lua + +modules\DataSource.lua +modules\NewItemTracking.lua +modules\MoneyFrame.lua +modules\FilterOverride.lua +modules\ItemLevel.lua +modules\Junk.lua +modules\CurrencyFrame.lua +modules\TooltipInfo.lua +modules\SectionVisibilityDropdown.lua +modules\BankSwitcher.lua +modules\ChangeHighlight.lua +modules\Masque.lua + +core\ItemDatabase.lua +core\DefaultFilters.lua core\Deprecation.lua #@debug@ diff --git a/core/Boot.lua b/core/Boot.lua index 1c35d97..e607ffc 100644 --- a/core/Boot.lua +++ b/core/Boot.lua @@ -61,8 +61,4 @@ local moduleProto = { end, } addon.moduleProto = moduleProto -addon:SetDefaultModulePrototype(moduleProto) - -function addon:OnInitialize() - self:Deprecation() -end +addon:SetDefaultModulePrototype(moduleProto) \ No newline at end of file diff --git a/core/Core.lua b/core/Core.lua index b812a6f..58fc13f 100644 --- a/core/Core.lua +++ b/core/Core.lua @@ -63,8 +63,7 @@ end --@end-debug@ local bagKeys = {"backpack", "bank", "reagentBank"} - -function addon:OnInitializeOld() +function addon:OnInitialize() -- Create the default font settings for each bag type. for _, name in ipairs(bagKeys) do local bfd = self:GetFontDefaults(GameFontHighlightLarge) @@ -112,10 +111,11 @@ function addon:OnInitializeOld() C_CVar.SetCVar("professionAccessorySlotsExampleShown", 1) end + self:Deprecation() self:Debug('Initialized') end -function addon:OnEnableOld() +function addon:OnEnable() self.globalLock = false diff --git a/core/Deprecation.lua b/core/Deprecation.lua index 75a5e1f..f376650 100644 --- a/core/Deprecation.lua +++ b/core/Deprecation.lua @@ -5,7 +5,8 @@ local addon = LibStub('AceAddon-3.0'):GetAddon(addonName) -- This is a deprecation message for AdiBags. To remove this for whatever reason, -- remove this call from Core.lua in OnInitialize. function addon:Deprecation() - print("AdiBags is discontinued and will get no new releases.") + if addon.db.profile.deprecationPhase < 2 then + print("AdiBags is deprecated and will get no new feature releases.") print("Please consider switching to AdiBags' successor, BetterBags.") print("BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags") local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate") @@ -25,7 +26,12 @@ function addon:Deprecation() text:SetPoint("LEFT", 20, 0) text:SetJustifyH("LEFT") text:SetText([[ -AdiBags is discontinued, will get no new releases or bug fixes. Please consider switching to AdiBags' successor, BetterBags. BetterBags is written by the same team that maintains AdiBags. BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags +AdiBags is deprecated, will get no new feature releases, and may or may not get bug fixes over time. +Please consider switching to AdiBags' successor, BetterBags. +BetterBags is written by the same team that maintains AdiBags. +BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags +This message will not be shown again, but you can continue to use AdiBags so long as it works. +Thanks! :) ]]) text:SetWordWrap(true) text:SetWidth(400) @@ -34,9 +40,11 @@ AdiBags is discontinued, will get no new releases or bug fixes. Please consider local button = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate") button:SetSize(180, 25) button:SetPoint("BOTTOM", 0, 10) - button:SetText("Close") + button:SetText("Do Not Show Again") button:SetScript("OnClick", function() + addon.db.profile.deprecationPhase = 2 frame:Hide() end) frame:Show() + end end