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

Daniel Burrows dburrows at costa.debian.org
Mon Aug 8 17:46:52 UTC 2005


Author: dburrows
Date: Mon Aug  8 17:46:49 2005
New Revision: 3739

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/download_bar.cc
   branches/aptitude-0.3/aptitude/src/download_bar.h
Log:
Make the download status bar constructor protected.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Aug  8 17:46:49 2005
@@ -2,6 +2,10 @@
 
 	* src/download_bar.cc:
 
+	  Make the constructor protected.
+
+	* src/download_bar.cc:
+
 	  Fix the download bar for the refcounting protocol.
 
 	* src/download.cc:

Modified: branches/aptitude-0.3/aptitude/src/download_bar.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download_bar.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/download_bar.cc	Mon Aug  8 17:46:49 2005
@@ -50,6 +50,10 @@
   assert(sigismember(&___signals, SIGWINCH));\
   vscreen_releaselock();
 
+download_status_bar::download_status_bar()
+{
+}
+
 bool download_status_bar::MediaChange(string media, string drive)
 {
   CRITICAL_ENTER

Modified: branches/aptitude-0.3/aptitude/src/download_bar.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download_bar.h	(original)
+++ branches/aptitude-0.3/aptitude/src/download_bar.h	Mon Aug  8 17:46:49 2005
@@ -43,7 +43,15 @@
 
   bool cancelled;
   // True if the user cancelled the download
+
+protected:
+  download_status_bar();
 public:
+  static ref_ptr<download_status_bar> create()
+  {
+    return new download_status_bar;
+  }
+
   bool MediaChange(std::string Media, std::string Drive);
 
   void IMSHit(pkgAcquire::ItemDesc &itm);
@@ -62,4 +70,6 @@
   point get_cursorloc() {return point(0,0);}
 };
 
+typedef ref_ptr<download_status_bar> download_status_bar_ref;
+
 #endif



More information about the Aptitude-svn-commit mailing list