impr: Update all of ImHex to the new popup system

This commit is contained in:
WerWolv
2023-04-08 00:58:53 +02:00
parent 9c9ac23818
commit 80edaea392
36 changed files with 578 additions and 478 deletions

View File

@@ -87,7 +87,7 @@ namespace hex::plugin::windows {
if (this->m_portHandle == INVALID_HANDLE_VALUE) {
if (ImGui::Button("hex.windows.view.tty_console.connect"_lang))
if (!this->connect())
View::showErrorPopup("hex.windows.view.tty_console.connect_error"_lang);
EventManager::post<RequestOpenErrorPopup>("hex.windows.view.tty_console.connect_error"_lang);
} else {
if (ImGui::Button("hex.windows.view.tty_console.disconnect"_lang))
this->disconnect();
@@ -190,7 +190,7 @@ namespace hex::plugin::windows {
bool ViewTTYConsole::connect() {
if (this->m_comPorts.empty() || static_cast<size_t>(this->m_selectedPort) >= this->m_comPorts.size()) {
View::showErrorPopup("hex.windows.view.tty_console.no_available_port"_lang);
EventManager::post<RequestOpenErrorPopup>("hex.windows.view.tty_console.no_available_port"_lang);
return true; // If false, connect_error error popup will override this error popup
}
this->m_portHandle = ::CreateFile((R"(\\.\)" + this->m_comPorts[this->m_selectedPort].first).c_str(),