ENH: UserPresetExceedLimit notify & not post more to cloud

Change-Id: Ia4f5381a28277d2b535632f88f3720b4bd27b661
Jira: STUDIO-4892
This commit is contained in:
chunmao.guo
2023-10-31 14:44:43 +08:00
committed by Lane.Wei
parent 6078adf9a2
commit 34d02aa07f
3 changed files with 41 additions and 11 deletions

View File

@@ -144,6 +144,7 @@ enum class NotificationType
BBLPluginUpdateAvailable,
BBLPreviewOnlyMode,
BBLPrinterConfigUpdateAvailable,
BBLUserPresetExceedLimit,
};
class NotificationManager
@@ -857,11 +858,17 @@ private:
}},
NotificationData{NotificationType::BBLPrinterConfigUpdateAvailable, NotificationLevel::ImportantNotificationLevel, BBL_NOTICE_MAX_INTERVAL,
_u8L("New printer config available."),
_u8L("Details"),
_u8L("New printer config available."), _u8L("Details"),
[](wxEvtHandler *evnthndlr) {
if (evnthndlr != nullptr) wxPostEvent(evnthndlr, PrinterConfigUpdateAvailableClickedEvent(EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED));
return true;
}},
NotificationData{NotificationType::BBLUserPresetExceedLimit, NotificationLevel::WarningNotificationLevel, BBL_NOTICE_MAX_INTERVAL,
_u8L("The number of user presets cached in the cloud has exceeded the upper limit, newly created user presets can only be used locally."),
_u8L("Wiki"),
[](wxEvtHandler* evnthndlr) {
if (evnthndlr != nullptr)
wxPostEvent(evnthndlr, PrinterConfigUpdateAvailableClickedEvent(EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED));
wxLaunchDefaultBrowser("https://");
return true;
}},