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-11 14:28:51 +0300
committerDavid Kocik <kocikdav@gmail.com>2019-12-13 15:51:46 +0300
commitf5e3750d233d1f9687fa9c906b39150df1eca609 (patch)
treedcfbcfdd9bdd62fbc1adfccb3a04f3449d78a2b8 /src/slic3r/GUI/RemovableDriveManager.hpp
parent01f1bed0605662e8520f24c5db8c8bdac5f7eb4e (diff)
eject button functionality
Diffstat (limited to 'src/slic3r/GUI/RemovableDriveManager.hpp')
-rw-r--r--src/slic3r/GUI/RemovableDriveManager.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp
index a5027a5ad..f41294001 100644
--- a/src/slic3r/GUI/RemovableDriveManager.hpp
+++ b/src/slic3r/GUI/RemovableDriveManager.hpp
@@ -32,7 +32,7 @@ public:
//update() searches for removable devices, returns false if empty.
void init();
- bool update(const long time = 0); //time = 0 is forced update, time expects wxGetLocalTime()
+ bool update(const long time = 0, bool check = true); //time = 0 is forced update, time expects wxGetLocalTime()
bool is_drive_mounted(const std::string &path);
void eject_drive(const std::string &path);
std::string get_last_drive_path();
@@ -41,9 +41,8 @@ public:
void add_callback(std::function<void()> callback); // callback will notify only if device with last save path was removed
void erase_callbacks(); // erases all callbacks added by add_callback()
void set_last_save_path(const std::string &path);
- bool is_last_drive_removed(); //if we dont need info about this drive, call reset_last_save_path();
+ bool is_last_drive_removed();
bool is_last_drive_removed_with_update(const long time = 0); // param as update()
- void reset_last_save_path();
void print();
private:
@@ -51,11 +50,14 @@ private:
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 ""
+ void reset_last_save_path();
+
std::vector<DriveData> m_current_drives;
std::vector<std::function<void()>> m_callbacks;
size_t m_drives_count;
long m_last_update;
std::string m_last_save_path;
+
#if _WIN32
void register_window();
//INT_PTR WINAPI WinProcCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);