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, buddy): TrayIcon.__init__(self, icon_name='computer-xo', xo_color=buddy.get_color()) self._buddy = buddy self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.cache_palette = False self.palette_invoker.props.toggle_palette = True
def __init__(self): self._color = profile.get_color() TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color) self._input_method = Maliit.InputMethod() self.connect('button-release-event', self.__button_release_event_cb) self.set_palette_invoker(FrameWidgetInvoker(self))
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._input_method = Maliit.InputMethod() self.connect('button-release-event', self.__button_release_event_cb) self.set_palette_invoker(FrameWidgetInvoker(self))
def __init__(self): """ Create the icon that represents the touchpad. """ icon_name = STATUS_ICON[_read_touchpad_mode()] color = profile.get_color() TrayIcon.__init__(self, icon_name=icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.connect('button-release-event', self.__button_release_event_cb)
def __init__(self): """ Create the icon that represents the touchpad. """ icon_name = STATUS_ICON[_read_touchpad_mode()] client = GConf.Client.get_default() color = XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.connect('button-release-event', self.__button_release_event_cb)
def __init__(self, speed, address): color = profile.get_color() TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self._palette = WiredPalette() self.set_palette(self._palette) self._palette.set_group_id('frame') self._palette.set_connected(speed, address) self.palette_invoker.props.toggle_palette = True
def __init__(self, speed, address): client = GConf.Client.get_default() color = xocolor.XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self._palette = WiredPalette() self.set_palette(self._palette) self._palette.set_group_id('frame') self._palette.set_connected(speed, address) self.palette_invoker.props.toggle_palette = True
def __init__(self, mount): self._mount = mount self._icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device color = profile.get_color() TrayIcon.__init__(self, icon_name=self._icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True
def __init__(self, battery): self._color = profile.get_color() TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color) self.set_palette_invoker(FrameWidgetInvoker(self)) self._model = DeviceModel(battery) self.palette = BatteryPalette(_('My Battery')) self.palette.set_group_id('frame') self.palette_invoker.props.toggle_palette = True self._model.connect('updated', self.__battery_status_changed_cb) self._update_info()
def __init__(self, mount): self._mount = mount self._icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device client = GConf.Client.get_default() color = XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=self._icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True
def __init__(self, battery): 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._model = DeviceModel(battery) self.palette = BatteryPalette(GLib.markup_escape_text(_('My Battery'))) self.palette.set_group_id('frame') self.palette_invoker.props.toggle_palette = True self._model.connect('updated', self.__battery_status_changed_cb) self._update_info()
def __init__(self): self._color = profile.get_color() TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color) self._MAX_ATTEMPS = 10 # attemps to connect to asr service self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True self._path = os.path.dirname(os.path.abspath(__file__)) self._muted = False self._init_recognizer() self._active = True self._home_model = shell.get_model() self._home_model.connect('active-activity-changed', self.__active_activity_changed) self._bundle_id = None
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._model = DeviceModel() self._model.connect('notify::level', self.__speaker_status_changed_cb) self._model.connect('notify::muted', self.__speaker_status_changed_cb) self.connect('draw', self.__draw_cb) self._update_info()
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._model = DeviceModel() self._model.connect("notify::level", self.__speaker_status_changed_cb) self._model.connect("notify::muted", self.__speaker_status_changed_cb) self.connect("draw", self.__draw_cb) self._update_info()
def __init__(self, label): self._color = profile.get_color() self._label = label TrayIcon.__init__(self, icon_name='brightness-100', xo_color=self._color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True model = brightness.get_instance() if model.get_path(): self._model = model self._model.changed_signal.connect(self.__brightness_changed_cb) self._update_output_info()
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._model = DeviceModel() self._model.connect('notify::level', self.__speaker_status_changed_cb) self._model.connect('notify::muted', self.__speaker_status_changed_cb) self.connect('draw', self.__draw_cb) self._update_info()
def __init__(self, output_device_model, output_label, input_device_model, input_label): self._color = profile.get_color() self._output_label = output_label self._input_label = input_label 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._audio_input_model = input_device_model() self._audio_output_model = output_device_model() # The tray icon is only for the output device self._audio_output_model.connect('notify::level', self.__output_status_changed_cb) self._audio_output_model.connect('notify::muted', self.__output_status_changed_cb) self._update_output_info()
def __init__(self, device): self._connection_time_handler = None self._connection_timestamp = 0 color = profile.get_color() TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color) self._bus = dbus.SystemBus() self._device = device self._palette = None self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True self._bus.add_signal_receiver(self.__state_changed_cb, signal_name='StateChanged', path=self._device.object_path, dbus_interface=network.NM_DEVICE_IFACE) self._bus.add_signal_receiver(self.__ppp_stats_changed_cb, signal_name='PppStats', path=self._device.object_path, dbus_interface=network.NM_MODEM_IFACE)
def __init__(self, device): self._connection_time_handler = None self._connection_timestamp = 0 client = GConf.Client.get_default() color = xocolor.XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color) self._bus = dbus.SystemBus() self._device = device self._palette = None self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True self._bus.add_signal_receiver(self.__state_changed_cb, signal_name='StateChanged', path=self._device.object_path, dbus_interface=network.NM_DEVICE_IFACE) self._bus.add_signal_receiver(self.__ppp_stats_changed_cb, signal_name='PppStats', path=self._device.object_path, dbus_interface=network.NM_MODEM_IFACE)
def __init__(self, mount): self._mount = mount self._icon_name = None icon_theme = Gtk.IconTheme.get_default() for icon_name in self._mount.get_icon().props.names: icon_info = icon_theme.lookup_icon(icon_name, Gtk.IconSize.LARGE_TOOLBAR, 0) if icon_info is not None: self._icon_name = icon_name break if self._icon_name is None: self._icon_name = 'drive' # TODO: retrieve the colors from the owner of the device client = GConf.Client.get_default() color = XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True
vbox.pack_start(tray, False, False, 0) tray.show() theme_icons = Gtk.IconTheme.get_default().list_icons(context=None) for i in range(0, 100): button = TrayButton(icon_name=theme_icons[i]) tray.add_item(button) button.show() tray = HTray() vbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 10): icon = TrayIcon(icon_name=theme_icons[i]) tray.add_item(icon) icon.show() hbox = Gtk.HBox() tray = VTray() hbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 100): button = TrayButton(icon_name=theme_icons[i]) tray.add_item(button) button.show() tray = VTray()
vbox.pack_start(tray, False, False, 0) tray.show() theme_icons = Gtk.IconTheme.get_default().list_icons(context=None) for i in range(0, 100): button = TrayButton(icon_name=theme_icons[i]) tray.add_item(button) button.show() tray = HTray() vbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 10): icon = TrayIcon(icon_name=theme_icons[i]) tray.add_item(icon) icon.show() hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) tray = VTray() hbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 100): button = TrayButton(icon_name=theme_icons[i]) tray.add_item(button) button.show() tray = VTray()