diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 6d49e22f1f..b645593623 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -2889,6 +2889,7 @@ void GUI_App::MacOpenURL(const wxString& url) { if (app_config && !app_config->get_bool("downloader_url_registered")) { + notification_manager()->push_notification(NotificationType::URLNotRegistered); BOOST_LOG_TRIVIAL(error) << "Recieved command to open URL, but it is not allowed in app configuration. URL: " << url; return; } diff --git a/src/slic3r/GUI/NotificationManager.hpp b/src/slic3r/GUI/NotificationManager.hpp index b3a39a936f..778f99bfa3 100644 --- a/src/slic3r/GUI/NotificationManager.hpp +++ b/src/slic3r/GUI/NotificationManager.hpp @@ -120,7 +120,9 @@ enum class NotificationType // Short meesage to fill space between start and finish of export ExportOngoing, // Progressbar of download from prusaslicer:// url - URLDownload + URLDownload, + // MacOS specific - PS comes forward even when downloader is not allowed + URLNotRegistered, }; class NotificationManager @@ -916,6 +918,16 @@ private: {NotificationType::UndoDesktopIntegrationFail, NotificationLevel::WarningNotificationLevel, 10, _u8L("Undo desktop integration failed.") }, {NotificationType::ExportOngoing, NotificationLevel::RegularNotificationLevel, 0, _u8L("Exporting.") }, + {NotificationType::URLNotRegistered + , NotificationLevel::RegularNotificationLevel + , 10 + , _u8L("PrusaSlicer recieved a download request from Printables.com, but it's not allowed. You can allow it") + , _u8L("here.") + , [](wxEvtHandler* evnthndlr) { + wxGetApp().open_preferences("downloader_url_registered", "Other"); + return true; + } }, + //{NotificationType::NewAppAvailable, NotificationLevel::ImportantNotificationLevel, 20, _u8L("New version is available."), _u8L("See Releases page."), [](wxEvtHandler* evnthndlr) { // wxGetApp().open_browser_with_warning_dialog("https://github.com/prusa3d/PrusaSlicer/releases"); return true; }}, //{NotificationType::NewAppAvailable, NotificationLevel::ImportantNotificationLevel, 20, _u8L("New vesion of PrusaSlicer is available.", _u8L("Download page.") },