Beispiel #1
0
    def PrevSession(self):
        """Moves to the previous session in the list of active sessions."""

        sessions.SetSession(sessions.GetSessionIndex() - 1)
        output.AnnounceSession()
        if hasattr(sessions.current_session, 'announce_session_mute'):
            sessions.current_session.announce_session_mute(True)
Beispiel #2
0
 def NewSession(self):
     """Allows you to create a new session."""
     dlg = modal_dialog(core.gui.SessionManager.NewSessionDialog,
                        parent=application.main_frame)
     kind = dlg.sessions.GetStringSelection()
     name = dlg.name.GetValue()
     if not name:
         output.speak(_("Please enter a name for this session."))
         return self.NewSession()
     try:
         new = sessions.SpawnSession(kind=kind, name=name)
     except:
         output.speak(_("Unable to spawn new %s session.") % kind, True)
         application.main_frame.Show(False)
         return
     sessions.SetSession(new)
     output.AnnounceSession()
     application.main_frame.Show(False)
Beispiel #3
0
 def onSwitch(self, evt):
     evt.Skip()
     sessions.SetSession(self.sessions.GetFocusedItem())