Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kocik <kocikdav@gmail.com>2019-12-10 16:10:47 +0300
committerDavid Kocik <kocikdav@gmail.com>2019-12-13 15:51:45 +0300
commita259058845e50d635883e16cf86d0988c31a76bd (patch)
tree2a246924629001390e4f998ef61a4df279b2b997 /src/slic3r/GUI/RemovableDriveManager.hpp
parentc37128ad638f99c5b090cce5427e12bcbf81af94 (diff)
macos better wrapper
Diffstat (limited to 'src/slic3r/GUI/RemovableDriveManager.hpp')
-rw-r--r--src/slic3r/GUI/RemovableDriveManager.hpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp
index 7109bbd07..202680328 100644
--- a/src/slic3r/GUI/RemovableDriveManager.hpp
+++ b/src/slic3r/GUI/RemovableDriveManager.hpp
@@ -39,7 +39,11 @@ public:
void reset_last_save_path();
void print();
private:
- RemovableDriveManager():m_drives_count(0),m_last_update(0),m_last_save_path(""),m_rdmmm(nullptr){}
+#if __APPLE__
+ RemovableDriveManager():m_drives_count(0),m_last_update(0),m_last_save_path(""),m_rdmmm(new RemovableDriveManagerMM()){}
+#else
+ RemovableDriveManager() : m_drives_count(0), m_last_update(0), m_last_save_path(""){}
+#endif
void search_for_drives();
void check_and_notify();
std::string get_drive_from_path(const std::string& path);//returns drive path (same as path in DriveData) if exists otherwise empty string ""
@@ -51,16 +55,27 @@ private:
#if _WIN32
void register_window();
//INT_PTR WINAPI WinProcCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
-#elif __APPLE__
- void *m_rdmmm;
- void register_window();
- void list_devices();
+#else
+#if __APPLE__
+ RemovableDriveManagerMM * m_rdmmm;
+ #endif
void search_path(const std::string &path, const std::string &parent_path);
+ void inspect_file(const std::string &path, const std::string &parent_path);
bool compare_filesystem_id(const std::string &path_a, const std::string &path_b);
-#else
- void search_path(const std::string &path, const std::string &parent_path);
- bool compare_filesystem_id(const std::string &path_a, const std::string &path_b);
#endif
};
+#if __APPLE__
+class RemovableDriveManagerMM
+{
+public:
+ RemovableDriveManagerMM();
+ ~RemovableDriveManagerMM();
+ register_window();
+ list_devices();
+private:
+ RemovableDriveManagerMMImpl *m_imp;
+ friend void RemovableDriveManager::inspect_file(const std::string &path, const std::string &parent_path);
+};
+#endif
}}
#endif