• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python tray.TrayIcon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了TrayIcon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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()
开发者ID:Akirato,项目名称:sugar,代码行数:7,代码来源:speech.py


示例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))
开发者ID:AbrahmAB,项目名称:sugar-prototype,代码行数:8,代码来源:frame.py


示例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()
开发者ID:ChristoferR,项目名称:sugar,代码行数:8,代码来源:speech.py


示例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
开发者ID:icarito,项目名称:sugar,代码行数:8,代码来源:friendstray.py


示例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)
开发者ID:curiousguy13,项目名称:sugar,代码行数:9,代码来源:touchpad.py


示例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))
开发者ID:tchx84,项目名称:social-sugar,代码行数:9,代码来源:frame.py


示例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)
开发者ID:ChristoferR,项目名称:sugar,代码行数:10,代码来源:touchpad.py


示例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
开发者ID:AbrahmAB,项目名称:sugar,代码行数:11,代码来源:network.py


示例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
开发者ID:ceibal-tatu,项目名称:sugar,代码行数:12,代码来源:network.py


示例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
开发者ID:mdengler,项目名称:sugar,代码行数:12,代码来源:volume.py


示例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
开发者ID:ChristoferR,项目名称:sugar,代码行数:13,代码来源:volume.py


示例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()
开发者ID:PoetticJustice,项目名称:sugar,代码行数:14,代码来源:battery.py


示例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
开发者ID:rparrapy,项目名称:listen-trailicon,代码行数:14,代码来源:listen.py


示例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()
开发者ID:W3SS,项目名称:sugar,代码行数:15,代码来源:display.py


示例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()
开发者ID:erikos,项目名称:sugar,代码行数:15,代码来源:battery.py


示例16: __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._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,代码行数:15,代码来源:speaker.py


示例17: __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._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:ChristoferR,项目名称:sugar,代码行数:16,代码来源:speaker.py


示例18: __init__

    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()
开发者ID:AbrahmAB,项目名称:sugar-prototype,代码行数:21,代码来源:audio.py


示例19: __init__

    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
开发者ID:ajaygarg84,项目名称:sugar,代码行数:24,代码来源:volume.py


示例20: range

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()
开发者ID:i5o,项目名称:sugar-toolkit-gtk3,代码行数:31,代码来源:tray.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python window.Window类代码示例发布时间:2022-05-27
下一篇:
Python toolbutton.ToolButton类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap