def __init__(self): self._color = profile.get_color() TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True self._manager = speech.get_speech_manager()
def __init__(self): client = GConf.Client.get_default() self._color = XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True self._manager = speech.get_speech_manager()
def __init__(self): client = gconf.client_get_default() self._color = XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color) self.set_palette_invoker(FrameWidgetInvoker(self)) self._manager = speech.get_speech_manager() self._icon_widget.connect('button-release-event', self.__button_release_event_cb)
def handle_key_press(key): manager = speech.get_speech_manager() if manager.is_paused: manager.restart() elif not manager.is_playing: manager.say_selected_text() else: manager.pause()
def setup(tray): if speech.get_speech_manager() is not None: tray.add_device(SpeechDeviceView())
def test_speech_manager(self): try: manager = speech.get_speech_manager() self.assertIsNotNone(manager) except: self.fail("speech manager could not be created")