[Aptitude-svn-commit] r4062 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows at costa.debian.org
Tue Sep 6 23:53:50 UTC 2005


Author: dburrows
Date: Tue Sep  6 23:53:48 2005
New Revision: 4062

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/download_list.cc
Log:
Remove the calls to vscreen_tryupdate and vscreen_poll; don't
update the display unless the download is visible.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Sep  6 23:53:48 2005
@@ -1,5 +1,11 @@
 2005-09-06  Daniel Burrows  <dburrows at debian.org>
 
+	* src/download_list.cc:
+
+	  Remove a bunch of no-longer-necessary tryupdate calls and don't
+	  invoke vscreen_poll; only queue display updates if the download
+	  list is visible..
+
 	* src/ui.cc:
 
 	  Move package downloads to a background thread.

Modified: branches/aptitude-0.3/aptitude/src/download_list.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download_list.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/download_list.cc	Tue Sep  6 23:53:48 2005
@@ -236,7 +236,8 @@
 	  if(!serf->Status.empty())
 	    {
 	      workers.push_back(workerinf(serf->Status, 0, 1));
-	      vscreen_queuelayout();
+	      if(get_visible())
+		vscreen_queuelayout();
 	    }
 	}
       else
@@ -256,7 +257,8 @@
 	  workers.push_back(workerinf(output,
 				      serf->CurrentSize,
 				      serf->TotalSize));
-	  vscreen_queuelayout();
+	  if(get_visible())
+	    vscreen_queuelayout();
 	}
 
       serf=Owner->WorkerStep(serf);
@@ -305,8 +307,8 @@
 
       sync_top();
 
-      vscreen_queuelayout();
-      vscreen_tryupdate();
+      if(get_visible())
+	vscreen_queuelayout();
     }
 }
 
@@ -325,8 +327,8 @@
 
       sync_top();
 
-      vscreen_queuelayout();
-      vscreen_tryupdate();
+      if(get_visible())
+	vscreen_queuelayout();
     }
 }
 
@@ -354,8 +356,8 @@
 
       sync_top();
 
-      vscreen_queuelayout();
-      vscreen_tryupdate();
+      if(get_visible())
+	vscreen_queuelayout();
     }
 }
 
@@ -406,12 +408,8 @@
 
   update_workers(Owner);
 
-  vscreen_queuelayout(); // Force an update
-
-  while(vscreen_poll()) // Eat all pending input.
-    ;
-
-  vscreen_tryupdate(); // Update if we haven't yet.
+  if(get_visible())
+    vscreen_queuelayout(); // Force an update
 
   if(cancelled)
     return false;
@@ -460,14 +458,12 @@
       start-=getmaxy()-1;
 
       vscreen_update();
-      vscreen_tryupdate();
     }
   else
     {
       start=0;
 
       vscreen_update();
-      vscreen_tryupdate();
     }
 
   sticky_end=false;
@@ -480,7 +476,6 @@
       --start;
 
       vscreen_update();
-      vscreen_tryupdate();
     }
 
   sticky_end=false;
@@ -492,7 +487,6 @@
     {
       start+=getmaxy();
       vscreen_update();
-      vscreen_tryupdate();
     }
   else
     sticky_end=true;
@@ -504,7 +498,6 @@
     {
       ++start;
       vscreen_update();
-      vscreen_tryupdate();
     }
   else
     sticky_end=true;
@@ -518,7 +511,6 @@
   sticky_end=true;
 
   vscreen_update();
-  vscreen_tryupdate();
 }
 
 void download_list::skip_to_top()
@@ -527,7 +519,6 @@
   sticky_end=false;
 
   vscreen_update();
-  vscreen_tryupdate();
 }
 
 void download_list::shift_left()
@@ -536,7 +527,6 @@
     {
       startx-=8;
       vscreen_update();
-      vscreen_tryupdate();
     }
 }
 
@@ -555,7 +545,6 @@
     {
       startx+=8;
       vscreen_update();
-      vscreen_tryupdate();
     }
 }
 



More information about the Aptitude-svn-commit mailing list