ENH:Support more SD card states

jira:[for sdcard]

Change-Id: Ic09198a0ed357f827768ed2f8d8a9ed6266f749f
(cherry picked from commit c877405caba2b75c515c814b7aaa0793200eee04)
This commit is contained in:
tao wang
2024-11-29 19:31:06 +08:00
committed by Noisyfox
parent f970bf8160
commit 54748aee1c
9 changed files with 59 additions and 69 deletions

View File

@@ -181,7 +181,7 @@ MonitorPanel::~MonitorPanel()
auto page = m_tabpanel->GetCurrentPage();
if (page == m_media_file_panel) {
auto title = m_tabpanel->GetPageText(m_tabpanel->GetSelection());
m_media_file_panel->SwitchStorage(title == _L("SD Card"));
m_media_file_panel->SwitchStorage(title == _L("Storage"));
}
page->SetFocus();
}, m_tabpanel->GetId());
@@ -191,7 +191,7 @@ MonitorPanel::~MonitorPanel()
m_tabpanel->AddPage(m_status_info_panel, _L("Status"), "", true);
m_media_file_panel = new MediaFilePanel(m_tabpanel);
m_tabpanel->AddPage(m_media_file_panel, _L("SD Card"), "", false);
m_tabpanel->AddPage(m_media_file_panel, _L("Storage"), "", false);
//m_tabpanel->AddPage(m_media_file_panel, _L("Internal Storage"), "", false);
m_upgrade_panel = new UpgradePanel(m_tabpanel);
@@ -376,7 +376,7 @@ void MonitorPanel::update_all()
m_status_info_panel->m_media_play_ctrl->SetMachineObject(obj);
m_media_file_panel->SetMachineObject(obj);
m_side_tools->update_status(obj);
if (!obj) {
show_status((int)MONITOR_NO_PRINTER);
m_hms_panel->clear_hms_tag();
@@ -454,7 +454,7 @@ bool MonitorPanel::Show(bool show)
if (obj == nullptr) {
dev->load_last_machine();
obj = dev->get_selected_machine();
if (obj)
if (obj)
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
} else {
obj->reset_update_time();
@@ -503,7 +503,7 @@ void MonitorPanel::show_status(int status)
BOOST_LOG_TRIVIAL(info) << "monitor: show_status = " << status;
#if !BBL_RELEASE_TO_PUBLIC
m_upgrade_panel->update(nullptr);
#endif
@@ -518,15 +518,15 @@ Freeze();
if ((status & (int)MonitorStatus::MONITOR_NO_PRINTER) != 0) {
set_default();
m_tabpanel->Layout();
} else if (((status & (int)MonitorStatus::MONITOR_NORMAL) != 0)
|| ((status & (int)MonitorStatus::MONITOR_DISCONNECTED) != 0)
|| ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)
|| ((status & (int)MonitorStatus::MONITOR_CONNECTING) != 0) )
} else if (((status & (int)MonitorStatus::MONITOR_NORMAL) != 0)
|| ((status & (int)MonitorStatus::MONITOR_DISCONNECTED) != 0)
|| ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)
|| ((status & (int)MonitorStatus::MONITOR_CONNECTING) != 0) )
{
if (((status & (int) MonitorStatus::MONITOR_DISCONNECTED) != 0)
|| ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)
|| ((status & (int)MonitorStatus::MONITOR_CONNECTING) != 0))
if (((status & (int) MonitorStatus::MONITOR_DISCONNECTED) != 0)
|| ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)
|| ((status & (int)MonitorStatus::MONITOR_CONNECTING) != 0))
{
set_default();
}