linux eject
This commit is contained in:
parent
19789d78c2
commit
1d25201a12
2 changed files with 7 additions and 8 deletions
src/slic3r/GUI
|
@ -274,9 +274,9 @@ bool GUI_App::on_init_inner()
|
||||||
|
|
||||||
this->obj_manipul()->update_if_dirty();
|
this->obj_manipul()->update_if_dirty();
|
||||||
|
|
||||||
|
#if __linux__
|
||||||
//RemovableDriveManager::get_instance().update(wxGetLocalTime(), true);
|
RemovableDriveManager::get_instance().update(wxGetLocalTime(), true);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Preset updating & Configwizard are done after the above initializations,
|
// Preset updating & Configwizard are done after the above initializations,
|
||||||
// and after MainFrame is created & shown.
|
// and after MainFrame is created & shown.
|
||||||
|
|
|
@ -429,10 +429,6 @@ bool RemovableDriveManager::update(const long time, bool check)
|
||||||
return false; // return value shouldnt matter if update didnt run
|
return false; // return value shouldnt matter if update didnt run
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(check)
|
|
||||||
{
|
|
||||||
m_rdmmm->log("update");
|
|
||||||
}
|
|
||||||
search_for_drives();
|
search_for_drives();
|
||||||
if(check)check_and_notify();
|
if(check)check_and_notify();
|
||||||
return !m_current_drives.empty();
|
return !m_current_drives.empty();
|
||||||
|
@ -474,7 +470,7 @@ void RemovableDriveManager::check_and_notify()
|
||||||
//std::cout<<"drives count: "<<m_drives_count;
|
//std::cout<<"drives count: "<<m_drives_count;
|
||||||
if(m_drives_count != m_current_drives.size())
|
if(m_drives_count != m_current_drives.size())
|
||||||
{
|
{
|
||||||
m_rdmmm->log("drives count not same");
|
//m_rdmmm->log("drives count not same");
|
||||||
//std::cout<<" vs "<< m_current_drives.size();
|
//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))
|
if(m_callbacks.size() != 0 && m_drives_count > m_current_drives.size() && m_last_save_path != "" && !is_drive_mounted(m_last_save_path))
|
||||||
{
|
{
|
||||||
|
@ -505,13 +501,16 @@ void RemovableDriveManager::set_last_save_path(const std::string& path)
|
||||||
}
|
}
|
||||||
bool RemovableDriveManager::is_last_drive_removed()
|
bool RemovableDriveManager::is_last_drive_removed()
|
||||||
{
|
{
|
||||||
|
std::cout<<"is last: "<<m_last_save_path;
|
||||||
m_drives_count = m_current_drives.size();
|
m_drives_count = m_current_drives.size();
|
||||||
if(m_last_save_path == "")
|
if(m_last_save_path == "")
|
||||||
{
|
{
|
||||||
|
std::cout<<"\n";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool r = !is_drive_mounted(m_last_save_path);
|
bool r = !is_drive_mounted(m_last_save_path);
|
||||||
if (r) reset_last_save_path();
|
if (r) reset_last_save_path();
|
||||||
|
std::cout<<" "<< r <<"\n";
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
bool RemovableDriveManager::is_last_drive_removed_with_update(const long time)
|
bool RemovableDriveManager::is_last_drive_removed_with_update(const long time)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue