Entropy/Spritz:
- urlFetcher: do not flood the X server (through GTK) with gazillions of redraws git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2827 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -309,7 +309,7 @@ class Equo(EquoInterface):
|
||||
|
||||
class GuiUrlFetcher(urlFetcher):
|
||||
|
||||
gui_last_avg = 0
|
||||
gui_last_avg = 100
|
||||
|
||||
def connect_to_gui(self, progress):
|
||||
self.progress = progress
|
||||
@@ -319,7 +319,9 @@ class GuiUrlFetcher(urlFetcher):
|
||||
|
||||
if self.progress == None: return
|
||||
|
||||
myavg = int(round(float(self.average),1))
|
||||
myavg = abs(int(round(float(self.average),1)))
|
||||
if abs((myavg - self.gui_last_avg)) < 5: return
|
||||
|
||||
if (myavg > self.gui_last_avg) or (myavg < 2) or (myavg > 97):
|
||||
|
||||
self.progress.set_progress( round(float(self.average)/100,1), str(myavg)+"%" )
|
||||
|
||||
Reference in New Issue
Block a user