totem r5550 - in trunk: . src/plugins/youtube
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5550 - in trunk: . src/plugins/youtube
- Date: Wed, 13 Aug 2008 17:44:58 +0000 (UTC)
Author: hadess
Date: Wed Aug 13 17:44:57 2008
New Revision: 5550
URL: http://svn.gnome.org/viewvc/totem?rev=5550&view=rev
Log:
2008-08-13 Bastien Nocera <hadess hadess net>
* src/plugins/youtube/youtube.py: Patch from Eric Piel
<e a b piel tudelft nl> to stop the throbber from eating CPU when
pulsing (Closes: #546742)
Modified:
trunk/ChangeLog
trunk/src/plugins/youtube/youtube.py
Modified: trunk/src/plugins/youtube/youtube.py
==============================================================================
--- trunk/src/plugins/youtube/youtube.py (original)
+++ trunk/src/plugins/youtube/youtube.py Wed Aug 13 17:44:57 2008
@@ -5,6 +5,7 @@
import httplib
import atom
import threading
+import time
import re
import os
@@ -206,7 +207,9 @@
def populate_list_from_results (self, treeview_name):
"""Check and acquire the lock"""
if self.entry_lock.acquire (False) == False:
- self.progress_bar.pulse ()
+ if (self.last_pulse + 0.035) < time.time():
+ self.progress_bar.pulse ()
+ self.last_pulse = time.time()
return True
"""Return if there are no results (or we've finished)"""
@@ -302,6 +305,7 @@
window = self.vbox.window
window.set_cursor (gtk.gdk.Cursor (gtk.gdk.WATCH))
self.progress_bar.pulse ()
+ self.last_pulse = time.time()
self.results_downloaded = False
DownloadThread (self, url, treeview_name).start ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]