[PC-BSD Commits] r7691 - pcbsd/current/src-qt4/pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Fri Oct 1 13:42:50 PDT 2010


Author: kris
Date: 2010-10-01 13:42:50 -0700 (Fri, 01 Oct 2010)
New Revision: 7691

Removed:
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-sysupdate.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.h
   pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.ui
Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/pc-softwaremanager.pro
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
Log:

Removed system updater functionality from SoftwareManager, now it is
in the "System Manager", which makes more sense, and keeps software related
specifically to PBIs



Modified: pcbsd/current/src-qt4/pc-softwaremanager/pc-softwaremanager.pro
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/pc-softwaremanager.pro	2010-10-01 20:32:14 UTC (rev 7690)
+++ pcbsd/current/src-qt4/pc-softwaremanager/pc-softwaremanager.pro	2010-10-01 20:42:50 UTC (rev 7691)
@@ -3,17 +3,15 @@
 
 CONFIG	+= qt warn_on release
 
-HEADERS	+= softmanager-main.h softconfigwidget.h updaterDialog.h
+HEADERS	+= softmanager-main.h softconfigwidget.h
 
 SOURCES	+= main.cpp softmanager-main.cpp softmanager-webview.cpp \
-           softmanager-sysupdate.cpp softmanager-pbiupdate.cpp \
-           pbi.cpp softconfigwidget.cpp updaterDialog.cpp
+           softmanager-pbiupdate.cpp pbi.cpp softconfigwidget.cpp
 
 RESOURCES += SoftwareManager.qrc
 
 FORMS	= softmanager-main.ui \
-	softconfigwidget.ui \
-	updaterDialog.ui
+	softconfigwidget.ui
 
 TARGET  = pc-softwaremanager
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-10-01 20:32:14 UTC (rev 7690)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-10-01 20:42:50 UTC (rev 7691)
@@ -38,8 +38,6 @@
 #include "ui_softmanager-main.h"
 #include "softmanager-main.h"
 #include "pbi.h"
-#include "updaterDialog.h"
-#include "ui_updaterDialog.h"
 
 
 void PBM::ProgramInit()
@@ -47,7 +45,6 @@
    qDebug("Application starting...");
 
    // Set our default status
-   programstatus = SYSTEM_UP2DATE;
    pbistatus = PBI_UPDATED;
    isWorkingOnPBI = false;
    autoUpdateSoftware = false;
@@ -100,17 +97,7 @@
    RealUserName = getlogin();
 
   /**********************************************************************/
-  // Add our connections and calls for the System Updater Service
 
-  // Create the status dialog
-  UpdaterStatusDialog = new updaterStatus();
-  // If the dialog was closed, update the context menu
-  UpdaterStatusDialog->programInit();
-  UpdaterStatusDialog->setModal(true);
-
-  // Start the monitor service for system updates
-  QTimer::singleShot(10000, this, SLOT(slotStartUpdateCheck()));
-
   // Initialize some of our various variables
   totalSeconds = 0;
   downloadSize = 0;
@@ -118,20 +105,8 @@
   attemptedRedownload = 0;
   firstInstall = 0;
   firstDownload = 0;
-  requiresSysReboot = 0;
   currentWorkingPBI = NULL;
 
-
-  // Connect the slots for system updates
-  connect( buttonRescanForSysUpdates, SIGNAL( clicked() ), this, SLOT(slotRescanForUpdates()) );
-  connect( pushDetails, SIGNAL( clicked() ), this, SLOT( slotViewDetailsClicked() ) );
-  connect( pushSelectSysAll, SIGNAL( clicked() ), this, SLOT( slotSelectAllSys() ) );
-  connect( pushInstallSysUpdates, SIGNAL( clicked() ), this, SLOT( slotInstallUpdatesClicked() ) );
-  connect( checkShowIgnore, SIGNAL( clicked() ), this, SLOT( slotPopulateSysUpdates() ) );
-  listViewSysUpdates->setContextMenuPolicy( Qt::CustomContextMenu);
-  connect( listViewSysUpdates, SIGNAL(customContextMenuRequested (const QPoint & ) ), this, SLOT(slotSysRightClicked() ) );
-
-
   // Connect slots for PBI updates
   connect( pushUpdatePBIs, SIGNAL( clicked() ), this, SLOT( slotStartPBIUpgrades() ) );
   connect( SoftwareListBox, SIGNAL( itemSelectionChanged() ), this, SLOT( slotPBISelectionChanged() ) );
@@ -518,14 +493,7 @@
 	return line;
 }
 
-void PBM::slotRescanForUpdates()
-{
-  // Start the monitor service for system updates
-  QTimer::singleShot(200, this, SLOT(slotStartUpdateCheck()));
 
-}
-
-
 void PBM::slotLoadSettings() {
   // Load the user preferences for the System Updater
   QSettings settings("PCBSD");

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2010-10-01 20:32:14 UTC (rev 7690)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2010-10-01 20:42:50 UTC (rev 7691)
@@ -1,9 +1,13 @@
 #ifndef PBM_H
 #define PBM_H
 
-#define SYSTRIGGER "/tmp/.sysupdatetraytrigger"
 #define PBITRIGGER "/tmp/.pbiupdatetraytrigger"
 
+// Set our defines for the type of mirror the user is running
+#define AUTOMIRROR      0
+#define SELECTMIRROR    1
+#define CUSTOMMIRROR    2
+
 /* QT4 */
 #include <qfile.h>
 #include <qmessagebox.h>
@@ -22,8 +26,6 @@
 /* Local Includes */
 #include "ui_softmanager-main.h"
 #include "pbi.h"
-#include "updaterDialog.h"
-#include "ui_updaterDialog.h"
 #include "softconfigwidget.h"
 #include "ui_softconfigwidget.h"
 
@@ -33,18 +35,6 @@
 // The default pbi.conf file
 #define PBI_ETCCONF "/usr/local/etc/pbi.conf"
 
-// Set our defines for the type of mirror the user is running
-#define AUTOMIRROR      0
-#define SELECTMIRROR    1
-#define CUSTOMMIRROR    2
-
-/* The Update STATUS Flags */
-#define SYSTEM_UP2DATE 0
-#define SYSTEM_UPDATE_AVAIL 1
-#define SYSTEM_CHECKING4UPDATES 4
-#define SYSTEM_UPDATING 5
-#define CHECK_FAILED 6
-
 #define PBI_UPDATED 0
 #define PBI_CHECKING4UPDATES 1
 #define PBI_UPDATING 2
@@ -68,37 +58,12 @@
     void RemoveButtonSlot();
     void PopulateList();
     void checkRoot();
-    void slotStartUpdateCheck();
-    void slotSysUpdateCheckFinished();
-    void slotReadSystemUpdates();
+
+    // Slots for the PBI tab
     void slotStartPBIUpdateCheck();
-    void slotGetSysData();
-    void slotGetSysCopyData();
     bool checkPBISelectedUpdates();
     void slotPBICheckUpdate();
-    void slotOpenSysDetails(int id);
-    void slotStartSystemUpdate();
-    void slotDownloadSysUpdate();
-    void slotStartCheckSysMD5();
-    void slotReadSysMD5();
-    void slotStartSysInstall();
-    void slotSysExtractFinished();
-    void slotSysInstallFinished();
-    void slotReadInstallScriptOutput();
-    void slotStartCheckAvailSysSpace();
     void slotStartPBIUpgrades();
-    void slotRescanForUpdates();
-    void slotViewDetailsClicked();
-    void slotSelectAllSys();
-    void slotInstallUpdatesClicked();
-    void slotCheckSysUpdatesFlags();
-    void slotSysRightClicked();
-    void slotIgnoreSysUpdate();
-    void slotUnIgnoreSysUpdate();
-    void slotPopulateSysUpdates();
-    void slotUpdateSysTrayTrigger();
-
-    // Slots for the PBI tab
     void slotReadPBIBuffer();
     void slotPBISelectionChanged();
     void slotPBIUpdateCheckDone();
@@ -167,18 +132,10 @@
     QNetworkReply *sidReply;
     QNetworkAccessManager *setSIDJob;
     QNetworkReply *sidReply2;
-    QNetworkAccessManager *sysFetchJob;
-    QNetworkReply *sysFetchReply;
-    QNetworkAccessManager *sysCopyJob;
-    QNetworkReply *sysCopyReply;
 
-    updaterStatus *UpdaterStatusDialog;
     softwareConfigWidget *softConfig;
-    void loadPatchData(QString patchFile, int patchNum);
     int programstatus;
     int pbistatus;
-    int currentSysWorkingItem;
-    QStringList workingSysUpdates;
     int workingPopupItem;
 
     long totalSeconds;
@@ -187,8 +144,6 @@
     int attemptedRedownload;
     int firstInstall;
     int firstDownload;
-    int requiresSysReboot;
-    QString sysPatchsetTmpFile;
     
     // Global Config Variables
     int mirrorType;
@@ -198,33 +153,12 @@
     QString Arch;
     QString Lang;
 
-    QProcess *getUpdatesDir;
-    QProcess *readSysUpdates;
-    QProcess *listingProc;
-    QProcess *checksumProc;
-    QProcess *extractProc;
-    QProcess *installProc;
-    QProcess *getFreeSpaceProc;
     QProcess *checkPBIProc;
     QProcess *upgradePBIProc;
     QProcess *installPBIDesktopIcon;
     QProcess *loadPBIs;
     QProcess *pbiJob;
 
-    // System Updater Variables
-    QString SysUpdateName[500];
-    QString SysUpdateIgnore[500];
-    QString SysUpdateMirror[500];
-    QString SysUpdatePatchFile[500];
-    QString SysUpdateDate[500];
-    QString SysUpdateMD5[500];
-    QString SysUpdateSize[500];
-    QString SysUpdateURL[500];
-    QString SysUpdateAlone[500];
-    QString SysUpdateReboot[500];
-    QString SysUpdateDetailsURL[500];
-    QString SysUpdatesShown[501];
-
     QString PBIBuffer;
     QTreeWidgetItemIterator *currentCheckingPBI;
     QTreeWidgetItemIterator *currentWorkingPBI;

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui	2010-10-01 20:32:14 UTC (rev 7690)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui	2010-10-01 20:42:50 UTC (rev 7691)
@@ -316,147 +316,6 @@
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="tab_2">
-      <attribute name="title">
-       <string>System Updates</string>
-      </attribute>
-      <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0">
-        <layout class="QGridLayout" name="_2">
-         <item row="0" column="0" colspan="4">
-          <widget class="QLabel" name="textSysUpdatesLabel">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text">
-            <string>The following system updates are available:</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-           </property>
-           <property name="wordWrap">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="3">
-          <spacer name="spacer2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>223</width>
-             <height>21</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="2" column="0">
-          <widget class="QPushButton" name="pushSelectSysAll">
-           <property name="text">
-            <string>Select All</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="QPushButton" name="pushDetails">
-           <property name="text">
-            <string>View Details</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="2">
-          <widget class="QCheckBox" name="checkShowIgnore">
-           <property name="text">
-            <string>Show ignored updates</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0" colspan="4">
-          <widget class="QListWidget" name="listViewSysUpdates"/>
-         </item>
-        </layout>
-       </item>
-       <item row="1" column="0">
-        <layout class="QVBoxLayout" name="verticalLayout_2">
-         <item>
-          <widget class="QLabel" name="UpdaterLabel">
-           <property name="text">
-            <string/>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignCenter</set>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="verticalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Preferred</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>438</width>
-             <height>17</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_2">
-           <item>
-            <widget class="QPushButton" name="pushInstallSysUpdates">
-             <property name="text">
-              <string>Install selected updates</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <layout class="QHBoxLayout" name="_4">
-             <item>
-              <spacer name="spacer15">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-               <property name="sizeType">
-                <enum>QSizePolicy::Expanding</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>10</width>
-                 <height>20</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
-              <widget class="QPushButton" name="buttonRescanForSysUpdates">
-               <property name="text">
-                <string>Check for Updates</string>
-               </property>
-               <property name="flat">
-                <bool>false</bool>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-          </layout>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
     </widget>
    </item>
    <item row="1" column="0">



More information about the Commits mailing list