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


Python timer.add函数代码示例

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


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

示例1: startup_ui

 def startup_ui(self):
     sys.excepthook = self.exception_handler
     Application.startup_ui(self)
     call_on_ui_thread(migrateappname.migrateVideos, 'Democracy', 'Miro')
     call_on_ui_thread(flash.check_flash_install)
     call_on_ui_thread(bonjour.check_bonjour_install)
     timer.add(15, self._init_autoupdate)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:7,代码来源:application.py

示例2: _device_connected

 def _device_connected(self, device):
     id_, info = self._get_device_info(device)
     logging.debug('seen device: %r' % (device,))
     if not info['mount']:
         # we don't get notified :( so poll instead
         timer.add(0.5, self._check_device_mount, device)
     app.device_manager.device_connected(id_, **info)
开发者ID:codito,项目名称:miro,代码行数:7,代码来源:devicetracker.py

示例3: _check_device_mount

    def _check_device_mount(self, device):
        if device['volume'] not in self._connected:
            # device was removed
            return
        if os.path.exists(device['mount']):
            self._device_changed(device)
	    return
        timer.add(0.5, self._check_device_mount, device)
开发者ID:nxmirrors,项目名称:miro,代码行数:8,代码来源:devicetracker.py

示例4: select_display_for_tabs

 def select_display_for_tabs(self, selected_tab_list, selected_tabs):
     """Select a display to show in the right-hand side.  """
     if self._select_display_for_tabs_args is None:
         # First call to select_display_for_tabs(), we need to schedule
         # _select_display_for_tabs() to be called.
         timer.add(0.01, self._select_display_for_tabs)
     # For all cases, we want to store these arguments in
     # _select_display_for_tabs_args so that when
     # _select_display_for_tabs() is called it uses them.
     self._select_display_for_tabs_args = (selected_tab_list,
                                           selected_tabs)
开发者ID:bluezone,项目名称:miro,代码行数:11,代码来源:displays.py

示例5: _device_connected

    def _device_connected(self, device):
        try:
           info = self._get_device_info(device)
	except KeyError:
            logging.debug('unknown device connected: %r' % (device,))
            return
        logging.debug('seen device: %r' % (device,))
        if not info.mount:
            # we don't get notified :( so poll instead
            timer.add(0.5, self._check_device_mount, device)
	devices.device_connected(info)
开发者ID:cool-RR,项目名称:Miro,代码行数:11,代码来源:devicetracker.py

示例6: _do_iteration

 def _do_iteration(self, item_id, repeat_delay):
     try:
         item_info = self.item_list.get_item(item_id)
     except KeyError:
         # item was deleted from model
         self.currently_animating.remove(item_id)
         return
     rv = self.continue_animation(item_info)
     if rv != False:
         timer.add(repeat_delay, self._do_iteration, item_id, repeat_delay)
     else:
         self.currently_animating.remove(item_id)
         self.finish_animation(item_info)
     for view in self.item_views:
         view.model_changed()
开发者ID:kmshi,项目名称:miro,代码行数:15,代码来源:itemlistcontroller.py

示例7: _drive_disconnected

 def _drive_disconnected(self, volume_monitor, drive):
     if drive is None:
         # can happen when a CD is inserted
         return
     for id_, info in self._get_device_info(drive):
         timeout_id = timer.add(0.5, self._drive_disconnected_timeout, id_)
         self._disconnecting[id_] = timeout_id
开发者ID:nxmirrors,项目名称:miro,代码行数:7,代码来源:devicetracker.py

示例8: schedule_update

 def schedule_update(self):
     def notify_and_reschedule():
         if self.update_timeout is not None:
             self.update_timeout = None
             if self.is_playing and not self.is_paused:
                 if not self.is_suspended:
                     self.notify_update()
                 self.schedule_update()
     self.update_timeout = timer.add(0.5, notify_and_reschedule)
开发者ID:nxmirrors,项目名称:miro,代码行数:9,代码来源:playback.py

示例9: pulse_updating_animation

 def pulse_updating_animation(self, id_):
     try:
         iter_ = self.iter_map[id_]
     except KeyError:
         # feed was removed
         del self.updating_animations[id_]
         return
     self.view.pulse_updating_image(iter_)
     timer_id = timer.add(0.1, self.pulse_updating_animation, id_)
     self.updating_animations[id_] = timer_id
开发者ID:pombredanne,项目名称:miro,代码行数:10,代码来源:tablist.py

示例10: _drive_disconnected

 def _drive_disconnected(self, volume_monitor, drive):
     if drive is None:
         # can happen when a CD is inserted
         return
     try:
         info = self._get_device_info(drive)
     except KeyError:
         return
     timeout_id = timer.add(0.5, self._drive_disconnected_timeout, info)
     self._disconnecting[info.id] = timeout_id
开发者ID:cool-RR,项目名称:Miro,代码行数:10,代码来源:devicetracker.py

示例11: start_updating

 def start_updating(self, id_):
     # The spinning wheel is constantly updating the cell value, between
     # validating the cell value for the drag and drop and the actual drop
     # the cell value most likely changes, and some GUI toolkits may get
     # confused.
     #
     # We'll let the underlying platform code figure out what's the best
     # thing to do here.
     self.view.set_volatile(True)
     if id_ in self.updating_animations:
         return
     timer_id = timer.add(0, self.pulse_updating_animation, id_)
     self.updating_animations[id_] = timer_id
开发者ID:pombredanne,项目名称:miro,代码行数:13,代码来源:tablist.py

示例12: change_non_video_displays

 def change_non_video_displays(self, display):
     # If the dc exists, cancel it.  If the cancel failed because lost
     # the race to cancel it, then the display will load and some
     # some redundant code will be scheduled onto the main thread, but
     # that's okay, since at the next invocation of the delayed call
     # we shall get the correct display.  We use a miro.timer here
     # rather than tacking onto the UI loop using call_on_ui_thread()
     # since we can't cancel it.
     if self.change_non_video_displays_dc:
         timer.cancel(self.change_non_video_displays_dc)
         self.change_non_video_displays_dc = None
     self.change_non_video_displays_dc = timer.add(0.1,
       lambda: call_on_ui_thread(
       lambda: self.do_change_non_video_displays(display)))
开发者ID:ShriramK,项目名称:miro,代码行数:14,代码来源:displays.py

示例13: _on_download_started

 def _on_download_started(self, widget):
     """
     Shows the download started icon for 5 seconds, then hide it.
     """
     self.toolbar.loading_icon.set_download(True)
     timer.add(5, lambda: self.toolbar.loading_icon.set_download(False))
开发者ID:codito,项目名称:miro,代码行数:6,代码来源:browser.py

示例14: blink_tab

 def blink_tab(self, id):
     self.view.blink_tab(self.iter_map[id])
     timer.add(1, self._unblink_tab, id)
开发者ID:nxmirrors,项目名称:miro,代码行数:3,代码来源:tablist.py

示例15: on_pressed

 def on_pressed(self, widget):
     if self.timeout:
         timer.cancel(self.timeout)
     self.button_down = True
     self.button_held = False
     self.timeout = timer.add(self.initial_delay, self.on_button_hold)
开发者ID:cool-RR,项目名称:Miro,代码行数:6,代码来源:customcontrols.py


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