Example #1
0
File: main.py Project: gobuyun/mu
 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
Example #2
0
File: main.py Project: lordmauve/mu
 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