From 177a4ddace33bc36b733cafd30d6a89dcef986e9 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 2 Dec 2019 11:40:29 +0100 Subject: [PATCH] Revert (MessageDialog and ConfirmDialog) --- .../thirdparty/libopenui/src/CMakeLists.txt | 1 - .../libopenui/src/message_dialog.cpp | 38 ------------------- .../thirdparty/libopenui/src/message_dialog.h | 34 ----------------- 3 files changed, 73 deletions(-) delete mode 100644 radio/src/thirdparty/libopenui/src/message_dialog.cpp delete mode 100644 radio/src/thirdparty/libopenui/src/message_dialog.h diff --git a/radio/src/thirdparty/libopenui/src/CMakeLists.txt b/radio/src/thirdparty/libopenui/src/CMakeLists.txt index 082eb2f3f..3fc35eb0e 100644 --- a/radio/src/thirdparty/libopenui/src/CMakeLists.txt +++ b/radio/src/thirdparty/libopenui/src/CMakeLists.txt @@ -32,7 +32,6 @@ set(LIBOPENUI_SRC table.cpp modal_window.cpp dialog.cpp - message_dialog.cpp ) if(SOFTWARE_KEYBOARD) diff --git a/radio/src/thirdparty/libopenui/src/message_dialog.cpp b/radio/src/thirdparty/libopenui/src/message_dialog.cpp deleted file mode 100644 index 004be79f8..000000000 --- a/radio/src/thirdparty/libopenui/src/message_dialog.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) OpenTX - * - * Source: - * https://github.com/opentx/libopenui - * - * This file is a part of libopenui library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ - -#include "message_dialog.h" -#include "static.h" - -MessageDialog::MessageDialog(const char * title, const char * message): - Dialog(title, {50, 73, LCD_W - 100, LCD_H - 146}) -{ - new StaticText(this, {0, coord_t(height() - PAGE_LINE_HEIGHT) / 2, width(), PAGE_LINE_HEIGHT}, message, 0, CENTERED); -} - -#if defined(HARDWARE_KEYS) -void MessageDialog::onEvent(event_t event) -{ - TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString().c_str(), event); - - if (event == EVT_KEY_BREAK(KEY_EXIT) || event == EVT_KEY_BREAK(KEY_ENTER)) { - deleteLater(); - } -} -#endif diff --git a/radio/src/thirdparty/libopenui/src/message_dialog.h b/radio/src/thirdparty/libopenui/src/message_dialog.h deleted file mode 100644 index 755a0fe1f..000000000 --- a/radio/src/thirdparty/libopenui/src/message_dialog.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) OpenTX - * - * Source: - * https://github.com/opentx/libopenui - * - * This file is a part of libopenui library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ - -#ifndef _MESSAGE_DIALOG_H_ -#define _MESSAGE_DIALOG_H_ - -#include "dialog.h" - -class MessageDialog: public Dialog { - public: - MessageDialog(const char * title, const char * message); - -#if defined(HARDWARE_KEYS) - void onEvent(event_t event) override; -#endif -}; - -#endif // _MESSAGE_DIALOG_H_