From c2fc611f941a4242877922fa642a048f87feec69 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 23 Nov 2021 12:27:01 +0100 Subject: [PATCH] Improved menu handling --- src/multi_install/abc/menu_service_abc.py | 7 ++----- src/multi_install/model/main_menu_enum.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 src/multi_install/model/main_menu_enum.py diff --git a/src/multi_install/abc/menu_service_abc.py b/src/multi_install/abc/menu_service_abc.py index cdf5593..3f7db2a 100644 --- a/src/multi_install/abc/menu_service_abc.py +++ b/src/multi_install/abc/menu_service_abc.py @@ -10,10 +10,7 @@ class MenuServiceABC(ABC): def run(self): pass @abstractmethod - def select_os(self) -> str: pass + def select_os(self) -> bool: pass @abstractmethod - def main_menu(self) -> str: pass - - @abstractmethod - def select_collection(self) -> str: pass + def main_menu(self) -> bool: pass diff --git a/src/multi_install/model/main_menu_enum.py b/src/multi_install/model/main_menu_enum.py new file mode 100644 index 0000000..4aaee8b --- /dev/null +++ b/src/multi_install/model/main_menu_enum.py @@ -0,0 +1,17 @@ +from enum import Enum + + +class MainMenuEnum(Enum): + + install_collection = 'Install collection' + uninstall_collection = 'Uninstall collection' + add_collection = 'Add collection' + remove_collection = 'Remove collection' + + install_application = 'Install application' + uninstall_application = 'Uninstall application' + add_application = 'Add application' + remove_application = 'Remove application' + + back = 'Back' + exit = 'Exit'