Refactoring of RemovableDriveManager

1) On Windows and Linux, polling of removable drives is done at a background
   thread, not at a UI thread.
2) On OSX, there is no polling, but a OS notification callback.
3) Refactored for clarity of the RemovableDriveManager interface.
This commit is contained in:
bubnikv
2020-03-06 14:49:21 +01:00
parent fa00180170
commit baad542d15
11 changed files with 639 additions and 752 deletions
+6 -2
View File
@@ -29,9 +29,9 @@ class PresetUpdater;
class ModelObject;
class PrintHostJobQueue;
namespace GUI
{
namespace GUI{
class RemovableDriveManager;
enum FileType
{
FT_STL,
@@ -96,6 +96,8 @@ class GUI_App : public wxApp
// Best translation language, provided by Windows or OSX, owned by wxWidgets.
const wxLanguageInfo *m_language_info_best = nullptr;
std::unique_ptr<RemovableDriveManager> m_removable_drive_manager;
std::unique_ptr<ImGuiWrapper> m_imgui;
std::unique_ptr<PrintHostJobQueue> m_printhost_job_queue;
ConfigWizard* m_wizard; // Managed by wxWindow tree
@@ -180,6 +182,8 @@ public:
std::vector<Tab *> tabs_list;
RemovableDriveManager* removable_drive_manager() { return m_removable_drive_manager.get(); }
ImGuiWrapper* imgui() { return m_imgui.get(); }
PrintHostJobQueue& printhost_job_queue() { return *m_printhost_job_queue.get(); }