当前位置: 首页>>代码示例>>Python>>正文


Python TrayIcon.__init__方法代码示例

本文整理汇总了Python中sugar3.graphics.tray.TrayIcon.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TrayIcon.__init__方法的具体用法?Python TrayIcon.__init__怎么用?Python TrayIcon.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sugar3.graphics.tray.TrayIcon的用法示例。


在下文中一共展示了TrayIcon.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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()
开发者ID:Akirato,项目名称:sugar,代码行数:9,代码来源:speech.py

示例2: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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
开发者ID:icarito,项目名称:sugar,代码行数:10,代码来源:friendstray.py

示例3: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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))
开发者ID:AbrahmAB,项目名称:sugar-prototype,代码行数:10,代码来源:frame.py

示例4: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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()
开发者ID:ChristoferR,项目名称:sugar,代码行数:10,代码来源:speech.py

示例5: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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))
开发者ID:tchx84,项目名称:social-sugar,代码行数:11,代码来源:frame.py

示例6: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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)
开发者ID:curiousguy13,项目名称:sugar,代码行数:11,代码来源:touchpad.py

示例7: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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)
开发者ID:ChristoferR,项目名称:sugar,代码行数:12,代码来源:touchpad.py

示例8: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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
开发者ID:AbrahmAB,项目名称:sugar,代码行数:13,代码来源:network.py

示例9: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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
开发者ID:mdengler,项目名称:sugar,代码行数:14,代码来源:volume.py

示例10: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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
开发者ID:ceibal-tatu,项目名称:sugar,代码行数:14,代码来源:network.py

示例11: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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
开发者ID:ChristoferR,项目名称:sugar,代码行数:15,代码来源:volume.py

示例12: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
 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
开发者ID:rparrapy,项目名称:listen-trailicon,代码行数:16,代码来源:listen.py

示例13: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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()
开发者ID:PoetticJustice,项目名称:sugar,代码行数:16,代码来源:battery.py

示例14: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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()
开发者ID:erikos,项目名称:sugar,代码行数:17,代码来源:battery.py

示例15: __init__

# 需要导入模块: from sugar3.graphics.tray import TrayIcon [as 别名]
# 或者: from sugar3.graphics.tray.TrayIcon import __init__ [as 别名]
    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()
开发者ID:svineet,项目名称:sugar,代码行数:17,代码来源:speaker.py


注:本文中的sugar3.graphics.tray.TrayIcon.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。