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

Python trackers.con_tracker_get函数代码示例

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

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



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

示例1: __init__

    def __init__(self, away_message=None, initial_monitor=0):
        super(AlbumArt, self).__init__(initial_monitor)
        self.get_style_context().add_class("albumart")
        self.set_halign(Gtk.Align.END)

        if not settings.get_show_albumart():
            return

        self.watcher = singletons.MediaPlayerWatcher
        self.player = self.watcher.get_best_player()

        self.current_url = None

        self.image = FramedImage()
        self.image.show()
        self.image.set_opacity(0.0)
        self.add(self.image)

        trackers.con_tracker_get().connect(self.image,
                                           "pixbuf-changed",
                                           self.on_pixbuf_changed)

        if self.player != None:
            trackers.con_tracker_get().connect(self.player,
                                               "metadata-changed",
                                               self.on_metadata_changed)
            self.on_metadata_changed(self.player)
开发者ID:Fantu,项目名称:cinnamon-screensaver,代码行数:27,代码来源:albumArt.py


示例2: set_lockscreen_group

    def set_lockscreen_group(self):
        if not self.enabled:
            return

        # If there are multiple keyboard layouts, we want to store
        # the one the user ends up using in the unlock widget, as they'll
        # want to use the same one each time, at least until they change
        # their password.

        saved_group = settings.get_kb_group()
        self.original_group = self.config.get_current_group()

        new_group = 0

        if saved_group == -1:
            new_group = self.original_group
        else:
            new_group = saved_group

        self.config.lock_group(new_group)
        self.update_saved_group(new_group)

        trackers.con_tracker_get().connect(self.config,
                                           "group-changed",
                                           self.on_group_changed)

        self.config.start_listen()
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:27,代码来源:keyboardLayout.py


示例3: set_lockscreen_keyboard_layout

    def set_lockscreen_keyboard_layout(self):
        if not self.keyboard_controller.get_enabled():
            return

        # If there are multiple keyboard layouts, we want to store
        # the one the user ends up using in the unlock widget, as they'll
        # want to use the same one each time, at least until they change
        # their password.

        saved_group = settings.get_kb_group()
        self.original_group = self.keyboard_controller.get_current_group()

        new_group = 0

        if saved_group == -1:
            new_group = self.original_group
        else:
            new_group = saved_group

        self.keyboard_controller.set_current_group(new_group)
        self.update_saved_group(new_group)
        self.update_layout_icon()

        trackers.con_tracker_get().connect(self,
                                           "icon-press",
                                           self.on_icon_pressed)

        trackers.con_tracker_get().connect(self,
                                           "draw",
                                           self.on_draw)
开发者ID:icarter09,项目名称:cinnamon-screensaver,代码行数:30,代码来源:passwordEntry.py


示例4: __init__

    def __init__(self):
        super(NotificationWidget, self).__init__()
        self.set_shadow_type(Gtk.ShadowType.NONE)
        self.get_style_context().add_class("notificationwidget")

        self.set_size_request(50, -1)

        self.notification_count = 0

        box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
        self.add(box)

        self.label = Gtk.Label.new("0")
        box.pack_start(self.label, False, False, 4)

        self.image = Gtk.Image.new_from_icon_name("screensaver-notification-symbolic", Gtk.IconSize.LARGE_TOOLBAR)
        box.pack_end(self.image, False, False, 4)

        box.show_all()

        self.notification_watcher = singletons.NotificationWatcher

        trackers.con_tracker_get().connect(self.notification_watcher,
                                           "notification-received",
                                           self.on_notification_received)
开发者ID:mtwebster,项目名称:cinnamon-screensaver,代码行数:25,代码来源:notificationWidget.py


示例5: __init__

    def __init__(self, index):
        super(MonitorView, self).__init__()

        self.monitor_index = index

        self.proc = None

        self.update_geometry()

        self.stack = Gtk.Stack()
        self.stack.set_transition_type(Gtk.StackTransitionType.CROSSFADE)
        self.stack.set_transition_duration(250)
        self.add(self.stack)

        self.wallpaper_stack = WallpaperStack()
        self.wallpaper_stack.show()
        self.wallpaper_stack.set_halign(Gtk.Align.FILL)
        self.wallpaper_stack.set_valign(Gtk.Align.FILL)

        self.stack.add_named(self.wallpaper_stack, "wallpaper")

        self.socket = Gtk.Socket()
        self.socket.show()
        self.socket.set_halign(Gtk.Align.FILL)
        self.socket.set_valign(Gtk.Align.FILL)

        # This prevents the socket from self-destructing when the plug process is killed
        trackers.con_tracker_get().connect(self.socket,
                                           "plug-removed",
                                           lambda socket: True)

        self.stack.add_named(self.socket, "plugin")

        self.show_all()
开发者ID:Fantu,项目名称:cinnamon-screensaver,代码行数:34,代码来源:monitorView.py


示例6: __init__

    def __init__(self, screen, away_message=None, initial_monitor=0):
        super(ClockWidget, self).__init__()
        self.screen = screen
        # self.set_name("clock")
        self.get_style_context().add_class("clock")

        self.set_halign(Gtk.Align.CENTER)
        self.set_valign(Gtk.Align.CENTER)

        self.current_monitor = initial_monitor

        self.away_message = away_message

        self.label = Gtk.Label()
        self.label.show()
        self.add(self.label)

        self.clock_tracker = CinnamonDesktop.WallClock()

        trackers.con_tracker_get().connect(self.clock_tracker,
                                           "notify::clock",
                                           self.on_clock_changed)

        tz = Gio.File.new_for_path(path="/etc/localtime")
        self.tz_monitor = tz.monitor_file(0, None)

        trackers.con_tracker_get().connect(self.tz_monitor,
                                           "changed",
                                           self.on_tz_changed)

        self.update_clock()
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:31,代码来源:clock.py


示例7: try_logind

    def try_logind(self):
        print("Trying to connect to logind...")

        login_client = LogindClient()
        trackers.con_tracker_get().connect(login_client,
                                           "startup-status",
                                           self.on_logind_startup_result)
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:7,代码来源:singletons.py


示例8: try_console_kit

    def try_console_kit(self):
        print("Trying to connect to ConsoleKit...")

        login_client = ConsoleKitClient()
        trackers.con_tracker_get().connect(login_client,
                                           "startup-status",
                                           self.on_consolekit_startup_result)
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:7,代码来源:singletons.py


示例9: __init__

    def __init__(self):
        """
        Connect to the bus and retrieve a list of interfaces.
        """
        super(MediaPlayerWatcher, self).__init__()

        self.player_clients = []

        try:
            self.dbus_proxy = Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SESSION,
                                                             Gio.DBusProxyFlags.NONE,
                                                             None,
                                                             "org.freedesktop.DBus",
                                                             "/org/freedesktop/DBus",
                                                             "org.freedesktop.DBus",
                                                             None)

            trackers.con_tracker_get().connect(self.dbus_proxy,
                                               "g-signal",
                                               self.on_dbus_proxy_signal)

            self.find_initial_players()
        except GLib.Error:
            self.dbus_proxy = None
            print("Cannot acquire session org.freedesktop.DBus client to watch for media players")
开发者ID:mtwebster,项目名称:cinnamon-screensaver,代码行数:25,代码来源:mediaPlayerWatcher.py


示例10: destroy_stage

    def destroy_stage(self):
        trackers.con_tracker_get().disconnect(singletons.Backgrounds,
                                              "changed",
                                              self.on_bg_changed)

        trackers.con_tracker_get().disconnect(self.power_client,
                                              "power-state-changed",
                                              self.on_power_state_changed)

        self.set_timeout_active(None, False)

        self.destroy_monitor_views()

        self.fader = None

        self.unlock_dialog.destroy()
        self.clock_widget.destroy()
        self.info_panel.destroy()
        self.audio_panel.destroy()

        self.unlock_dialog = None
        self.clock_widget = None
        self.info_panel = None
        self.audio_panel = None
        self.away_message = None
        self.monitors = []

        self.gdk_filter.stop()
        self.gdk_filter = None

        self.destroy()
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:31,代码来源:stage.py


示例11: on_realized

    def on_realized(self, widget, data=None):
        if self.blinking and self.tick_id == 0:
            GObject.idle_add(self._blink_idle)

        trackers.con_tracker_get().disconnect(self,
                                              "realize",
                                              self.on_realized)
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:7,代码来源:blinkingLabel.py


示例12: after_unlock_unrevealed

    def after_unlock_unrevealed(self, obj, pspec):
        """
        Called after unlock unreveal is complete.  Tells the MonitorViews
        to update themselves.
        """
        self.unlock_dialog.hide()
        self.unlock_dialog.cancel()

        if self.audio_panel != None:
            self.audio_panel.hide()
        if self.clock_widget != None:
            self.clock_widget.hide()
        if self.albumart_widget != None:
            self.albumart_widget.hide()

        trackers.con_tracker_get().disconnect(self.unlock_dialog,
                                              "notify::child-revealed",
                                              self.after_unlock_unrevealed)

        status.Awake = False

        trackers.con_tracker_get().connect(self.monitors[0],
                                           "current-view-change-complete",
                                           self.after_transitioned_back_to_sleep)

        self.update_monitor_views()
开发者ID:Fantu,项目名称:cinnamon-screensaver,代码行数:26,代码来源:stage.py


示例13: cancel_unlock_widget

    def cancel_unlock_widget(self):
        """
        Hide the unlock widget (and others) if the unlock has been canceled

        This process is in three steps for aesthetic reasons -
            a) Unreveal all widgets (begin fading them out)
            b) Switch over MonitorViews from wallpaper to plug-ins if needed.
            c) Re-reveal the InfoPanel if applicable
        """
        if not status.Awake:
            return

        self.set_timeout_active(None, False)
        utils.clear_clipboards(self.unlock_dialog)

        trackers.con_tracker_get().connect(self.unlock_dialog,
                                           "notify::child-revealed",
                                           self.after_unlock_unrevealed)
        self.unlock_dialog.unreveal()

        if self.clock_widget != None:
            self.clock_widget.unreveal()
        if self.albumart_widget != None:
            self.albumart_widget.unreveal()
        if self.audio_panel != None:
            self.audio_panel.unreveal()
        if self.info_panel != None:
            self.info_panel.unreveal()
开发者ID:Fantu,项目名称:cinnamon-screensaver,代码行数:28,代码来源:stage.py


示例14: show_plugin

 def show_plugin(self):
     name = settings.get_screensaver_name()
     path = utils.lookup_plugin_path(name)
     if path is not None:
         self.spawn_plugin(path)
         trackers.con_tracker_get().connect(self.socket,
                                            "plug-added",
                                            self.on_plug_added)
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:8,代码来源:monitorView.py


示例15: on_widget_destroy

    def on_widget_destroy(self, widget, data=None):
        trackers.con_tracker_get().disconnect(self.player,
                                              "status-changed",
                                              self.on_playback_status_changed)

        trackers.con_tracker_get().disconnect(self,
                                              "destroy",
                                              self.on_widget_destroy)
开发者ID:mtwebster,项目名称:cinnamon-screensaver,代码行数:8,代码来源:playerControl.py


示例16: __init__

    def __init__(self):
        super(AccountsServiceClient, self).__init__()

        self.is_loaded = False

        self.service = AccountsService.UserManager.get_default().get_user(utils.get_user_name())
        trackers.con_tracker_get().connect(self.service,
                                           "notify::is-loaded",
                                           self.on_accounts_service_loaded)
开发者ID:icarter09,项目名称:cinnamon-screensaver,代码行数:9,代码来源:accountsServiceClient.py


示例17: on_client_setup_complete

    def on_client_setup_complete(self):
        trackers.con_tracker_get().connect(self.proxy,
                                           "notify::playback-status",
                                           self.on_playback_status_changed)

        trackers.con_tracker_get().connect(self.proxy,
                                           "notify::metadata",
                                           self.on_metadata_changed)

        self.ensure_metadata()
开发者ID:mtwebster,项目名称:cinnamon-screensaver,代码行数:10,代码来源:mediaPlayerWatcher.py


示例18: after_transitioned_back_to_sleep

    def after_transitioned_back_to_sleep(self, monitor, data=None):
        trackers.con_tracker_get().disconnect(monitor,
                                              "current-view-change-complete",
                                              self.after_transitioned_back_to_sleep)

        self.info_panel.update_revealed()

        if not status.PluginRunning and settings.get_show_clock():
            self.put_on_top(self.clock_widget)
            self.clock_widget.start_positioning()
开发者ID:JosephMcc,项目名称:cinnamon-screensaver,代码行数:10,代码来源:stage.py


示例19: __init__

    def __init__(self):
        super(FramedImage, self).__init__()
        self.get_style_context().add_class("framedimage")

        self.cancellable = None

        self.file = None
        self.path = None

        trackers.con_tracker_get().connect(self, "realize", self.on_realized)
开发者ID:Fantu,项目名称:cinnamon-screensaver,代码行数:10,代码来源:framedImage.py


示例20: after_transitioned_back_to_sleep

    def after_transitioned_back_to_sleep(self, monitor, data=None):
        """
        Called after the MonitorViews have updated - re-show the clock (if desired)
        and the InfoPanel (if required.)
        """
        trackers.con_tracker_get().disconnect(monitor,
                                              "current-view-change-complete",
                                              self.after_transitioned_back_to_sleep)

        self.info_panel.update_revealed()
开发者ID:Fantu,项目名称:cinnamon-screensaver,代码行数:10,代码来源:stage.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python tree_node.TreeNode类代码示例发布时间:2022-05-26
下一篇:
Python torTools.getConn函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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