Added clearAll and clearSingle methods to FTProgress class.
Code improvements.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@380 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/FTProgress.cxx b/vncviewer/FTProgress.cxx
index 63b104b..b4c461a 100644
--- a/vncviewer/FTProgress.cxx
+++ b/vncviewer/FTProgress.cxx
@@ -37,7 +37,7 @@
 
 FTProgress::~FTProgress()
 {
-
+  destroyProgressBarObjects();
 }
 
 bool
@@ -61,13 +61,33 @@
 void
 FTProgress::increase(DWORD value)
 {
+  if (!m_bInitialized) return;
 
+  m_pSingleProgress->increase(value);
+  m_pGeneralProgress->increase(value);
+
+  setProgressText();
 }
 
 void
-FTProgress::clear()
+FTProgress::clearSingle()
 {
+  if (!m_bInitialized) return;
 
+  m_pSingleProgress->clear();
+
+  setProgressText();
+}
+
+void
+FTProgress::clearAll()
+{
+  if (!m_bInitialized) return;
+
+  m_pSingleProgress->clear();
+  m_pGeneralProgress->clear();
+
+  setProgressText();
 }
 
 bool 
@@ -95,6 +115,8 @@
 bool 
 FTProgress::destroyProgressBarObjects()
 {
+  clearAll();
+
   if (m_pSingleProgress != NULL) {
     delete m_pSingleProgress;
   }