本文整理汇总了Python中sugar3.graphics.tray.TrayIcon类的典型用法代码示例。如果您正苦于以下问题:Python TrayIcon类的具体用法?Python TrayIcon怎么用?Python TrayIcon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TrayIcon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
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()
示例2: __init__
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))
示例3: __init__
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()
示例4: __init__
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
示例5: __init__
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)
示例6: __init__
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))
示例7: __init__
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)
示例8: __init__
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
示例9: __init__
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
示例10: __init__
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
示例11: __init__
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
示例12: __init__
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()
示例13: __init__
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
示例14: __init__
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()
示例15: __init__
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()