macos eject

This commit is contained in:
Slic3rPE 2019-12-11 16:59:26 +01:00
parent 6dddc1cc6b
commit 38c69f16f0
4 changed files with 11 additions and 1 deletions

View File

@ -273,7 +273,7 @@ bool GUI_App::on_init_inner()
this->obj_manipul()->update_if_dirty();
RemovableDriveManager::get_instance().update(wxGetLocalTime(), true);
//RemovableDriveManager::get_instance().update(wxGetLocalTime(), true);
// Preset updating & Configwizard are done after the above initializations,

View File

@ -425,6 +425,10 @@ bool RemovableDriveManager::update(const long time, bool check)
return false; // return value shouldnt matter if update didnt run
}
}
if(check)
{
m_rdmmm->log("update");
}
search_for_drives();
if(check)check_and_notify();
return !m_current_drives.empty();
@ -466,6 +470,7 @@ void RemovableDriveManager::check_and_notify()
//std::cout<<"drives count: "<<m_drives_count;
if(m_drives_count != m_current_drives.size())
{
m_rdmmm->log("drives count not same");
//std::cout<<" vs "<< m_current_drives.size();
if(m_callbacks.size() != 0 && m_drives_count > m_current_drives.size() && m_last_save_path != "" && !is_drive_mounted(m_last_save_path))
{

View File

@ -80,6 +80,7 @@ public:
~RDMMMWrapper();
void register_window();
void list_devices();
void log(const std::string &msg);
protected:
void *m_imp;
//friend void RemovableDriveManager::inspect_file(const std::string &path, const std::string &parent_path);

View File

@ -61,6 +61,10 @@ void RDMMMWrapper::list_devices()
}
}
}
void RDMMMWrapper::log(const std::string &msg)
{
NSLog(@"%s", msg.c_str());
}
}}//namespace Slicer::GUI
/*