[PC-BSD Commits] r5658 - pcbsd/trunk/SoftwareManager

svn at pcbsd.org svn at pcbsd.org
Fri Dec 18 09:44:52 PST 2009


Author: kris
Date: 2009-12-18 09:44:52 -0800 (Fri, 18 Dec 2009)
New Revision: 5658

Modified:
   pcbsd/trunk/SoftwareManager/softmanager-main.cpp
   pcbsd/trunk/SoftwareManager/softmanager-main.h
   pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
Log:

Updated Software Manager, if you change your settings, any failed PBI downloads will be re-triggered, and try
again, which makes it easy for the user to not have to click each one to re-activate. 



Modified: pcbsd/trunk/SoftwareManager/softmanager-main.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-main.cpp	2009-12-18 17:31:25 UTC (rev 5657)
+++ pcbsd/trunk/SoftwareManager/softmanager-main.cpp	2009-12-18 17:44:52 UTC (rev 5658)
@@ -180,6 +180,7 @@
   softConfig->setModal(true);
   softConfig->show(); 
   connect( softConfig, SIGNAL(saved()), this, SLOT(slotLoadSettings()) );
+  connect( softConfig, SIGNAL(saved()), this, SLOT(slotRestartAllFailedPBIDownloads()) );
 }
 
 void PBM::RemoveButtonSlot()

Modified: pcbsd/trunk/SoftwareManager/softmanager-main.h
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-main.h	2009-12-18 17:31:25 UTC (rev 5657)
+++ pcbsd/trunk/SoftwareManager/softmanager-main.h	2009-12-18 17:44:52 UTC (rev 5658)
@@ -115,6 +115,7 @@
     void removeAllPBIDirty();
     void removeAllDeletedPBI();
     void slotRetryPBIDownload();
+    void slotRestartAllFailedPBIDownloads();
 
     // Slots for the webview
     void slotHomeButtonClicked();

Modified: pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp	2009-12-18 17:31:25 UTC (rev 5657)
+++ pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp	2009-12-18 17:44:52 UTC (rev 5658)
@@ -790,3 +790,18 @@
   settings.endArray();
 
 }
+
+void PBM::slotRestartAllFailedPBIDownloads()
+{
+  QTreeWidgetItemIterator it(SoftwareListBox);
+  while (*it) {
+      PBI *item = dynamic_cast<PBI*>(*it);
+      if ( item->getWorkingStatus() == PBIINACTIVE && item->getDownloadFailed() == true )
+      {
+        item->setNewDownload(true);
+        item->setWorkingStatus(PBINEWDOWNLOAD);
+        item->setStatusText(tr("Pending Download..."));
+      }
+      it++;
+  }
+}



More information about the Commits mailing list