mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
desktop integration functions and dialog
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
#include "UnsavedChangesDialog.hpp"
|
||||
#include "SavePresetDialog.hpp"
|
||||
#include "PrintHostDialogs.hpp"
|
||||
#include "DesktopIntegrationDialog.hpp"
|
||||
|
||||
#include "BitmapCache.hpp"
|
||||
|
||||
@@ -1634,6 +1635,10 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
||||
local_menu->Append(config_id_base + ConfigMenuSnapshots, _L("&Configuration Snapshots") + dots, _L("Inspect / activate configuration snapshots"));
|
||||
local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _L("Take Configuration &Snapshot"), _L("Capture a configuration snapshot"));
|
||||
local_menu->Append(config_id_base + ConfigMenuUpdate, _L("Check for updates"), _L("Check for configuration updates"));
|
||||
#ifdef __linux__
|
||||
if (DesktopIntegrationDialog::integration_possible())
|
||||
local_menu->Append(config_id_base + ConfigMenuDesktopIntegration, _L("Desktop Integration"), _L("Desktop Integration"));
|
||||
#endif
|
||||
local_menu->AppendSeparator();
|
||||
}
|
||||
local_menu->Append(config_id_base + ConfigMenuPreferences, _L("&Preferences") + dots +
|
||||
@@ -1674,6 +1679,11 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
||||
case ConfigMenuUpdate:
|
||||
check_updates(true);
|
||||
break;
|
||||
#ifdef __linux__
|
||||
case ConfigMenuDesktopIntegration:
|
||||
show_desktop_integration_dialog();
|
||||
break;
|
||||
#endif
|
||||
case ConfigMenuTakeSnapshot:
|
||||
// Take a configuration snapshot.
|
||||
if (check_unsaved_changes()) {
|
||||
@@ -2066,6 +2076,15 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
|
||||
return res;
|
||||
}
|
||||
|
||||
void GUI_App::show_desktop_integration_dialog()
|
||||
{
|
||||
#ifdef __linux__
|
||||
//wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
|
||||
DesktopIntegrationDialog dialog(mainframe);
|
||||
dialog.ShowModal();
|
||||
#endif //__linux__
|
||||
}
|
||||
|
||||
#if ENABLE_THUMBNAIL_GENERATOR_DEBUG
|
||||
void GUI_App::gcode_thumbnails_debug()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user