Supress desktop integration of gcode viewer at ChromeOS

This commit is contained in:
David Kocik 2021-09-01 12:58:25 +02:00
parent ab84da6c56
commit 73e8f5aed2

View File

@ -382,6 +382,8 @@ void DesktopIntegrationDialog::perform_desktop_integration()
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/PrusaSlicer%2%.desktop", target_dir_desktop, version_suffix));
// Repeat for Gcode viewer - use same paths as for slicer files
// Do NOT add gcode viewer desktop file on ChromeOS
if (platform_flavor() != PlatformFlavor::LinuxOnChromium) {
// Icon
if (!target_dir_icons.empty())
{
@ -416,6 +418,8 @@ void DesktopIntegrationDialog::perform_desktop_integration()
BOOST_LOG_TRIVIAL(error) << "Performing desktop integration failed - could not create Gcodeviewer desktop file";
show_error(nullptr, _L("Performing desktop integration failed - could not create Gcodeviewer desktop file. PrusaSlicer desktop file was probably created successfully."));
}
}
wxGetApp().plater()->get_notification_manager()->push_notification(NotificationType::DesktopIntegrationSuccess);
}
void DesktopIntegrationDialog::undo_desktop_intgration()
@ -433,7 +437,9 @@ void DesktopIntegrationDialog::undo_desktop_intgration()
BOOST_LOG_TRIVIAL(debug) << "removing " << path;
std::remove(path.c_str());
}
// gcode viwer .desktop
// No gcode viewer at ChromeOS
if (platform_flavor() != PlatformFlavor::LinuxOnChromium) {
// gcode viewer .desktop
path = std::string(app_config->get("desktop_integration_app_viewer_path"));
if (!path.empty()) {
BOOST_LOG_TRIVIAL(debug) << "removing " << path;
@ -445,6 +451,7 @@ void DesktopIntegrationDialog::undo_desktop_intgration()
BOOST_LOG_TRIVIAL(debug) << "removing " << path;
std::remove(path.c_str());
}
}
wxGetApp().plater()->get_notification_manager()->push_notification(NotificationType::UndoDesktopIntegrationSuccess);
}