def select_mode(self, modes, current_mode): """ Display the mode selector dialog and return the result. """ mode_select = ModeSelector(self) mode_select.setup(modes, current_mode) mode_select.exec() try: return mode_select.get_mode() except Exception: return None
def select_mode(self, modes, current_mode, theme): """ Display the mode selector dialog and return the result. """ mode_select = ModeSelector() mode_select.setup(modes, current_mode, theme) mode_select.exec() try: return mode_select.get_mode() except Exception as ex: return None