1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-15 00:24:19 +00:00

Projucer: Made the application usage data popup's ToggleButton remember the previously chosen preference

This commit is contained in:
ed 2017-05-05 14:40:26 +01:00
parent f9c1759502
commit 810f10bcb1

View file

@ -66,7 +66,13 @@ public:
if (showCheckbox)
{
addAndMakeVisible (shareApplicationUsageDataToggle = new ToggleButton());
shareApplicationUsageDataToggle->setToggleState (true, dontSendNotification);
LicenseController* controller = ProjucerApplication::getApp().licenseController;
if (controller != nullptr && controller->getState().applicationUsageDataState == LicenseState::ApplicationUsageData::disabled)
shareApplicationUsageDataToggle->setToggleState (false, dontSendNotification);
else
shareApplicationUsageDataToggle->setToggleState (true, dontSendNotification);
addAndMakeVisible(shareApplicationUsageDataLabel = new Label ({}, "Help JUCE to improve its software and services by sharing my application usage data"));
shareApplicationUsageDataLabel->setFont (Font (14.0f));