[PC-BSD Commits] r21899 - pcbsd/current/src-qt4/about-gui

svn at pcbsd.org svn at pcbsd.org
Tue Mar 19 04:29:34 PDT 2013


Author: yurkis
Date: 2013-03-19 11:29:34 +0000 (Tue, 19 Mar 2013)
New Revision: 21899

Modified:
   pcbsd/current/src-qt4/about-gui/mainwindow.cpp
   pcbsd/current/src-qt4/about-gui/mainwindow.h
   pcbsd/current/src-qt4/about-gui/mainwindow.ui
Log:
Changes to about gui: 1.  Added separate page for system components (xorg server, pcbsd-utils) 2. DEs on separate page

Modified: pcbsd/current/src-qt4/about-gui/mainwindow.cpp
===================================================================
--- pcbsd/current/src-qt4/about-gui/mainwindow.cpp	2013-03-19 09:23:03 UTC (rev 21898)
+++ pcbsd/current/src-qt4/about-gui/mainwindow.cpp	2013-03-19 11:29:34 UTC (rev 21899)
@@ -57,6 +57,9 @@
 const int DEComponents_size = sizeof(DEComponents) / sizeof(SComponent);
 const int DEComponentsNG_size = sizeof(DEComponentsNG) / sizeof(SComponent);
 
+const char* const PCBSD_UTILS_PACKAGE = "pcbsd-utils";
+const char* const PCBSD_UTILS_QT_PACKAGE = "pcbsd-utils-qt4";
+
 ////////////////////////////////////////////////////////////////////////////
 MainWindow::MainWindow(QWidget *parent) :
     QDialog(parent),
@@ -180,31 +183,19 @@
         }
     }
 
-    ui->DEList->clear();
-
-    if (!checkNG())
+    if (checkNG())
     {
-        pkginfo = new QProcess(this);
-        pkginfo->setProcessChannelMode(QProcess::MergedChannels);
-        connect( pkginfo, SIGNAL(readyRead()), this, SLOT(slotReadPkg() ) );
-        connect( pkginfo, SIGNAL(finished ( int, QProcess::ExitStatus)), this, SLOT(slotPackagesFinished(int, QProcess::ExitStatus)));
-        pkginfo->start("pkg_info");
-        ui->WaitTextLabel->setVisible(true);
+        QString ver;
+        if (checkNGPackage(PCBSD_UTILS_PACKAGE, ver))
+        {
+            ui->pcbsd_utils->setText(QString("r") + ver);
+        }
+        if (checkNGPackage(PCBSD_UTILS_QT_PACKAGE, ver))
+        {
+            ui->pcbsd_utils_qt->setText(QString("r") + ver);
+        }
     }
-    else
-    {
-        ui->WaitTextLabel->setVisible(false);
-        for(int i=0 ; i<DEComponentsNG_size; i++)
-        {
-            QString ver;
-            if (checkNGPackage(DEComponentsNG[i].Prefix, ver))
-            {
-                addDEItem(DEComponentsNG[i].Name, ver);
-            }
-        }//for all DEs
-    }//if pkgng installed
-
-    ui->MainStack->setCurrentIndex(1);
+    ui->MainStack->setCurrentIndex(2);
 }
 
 ////////////////////////////////////////////////////////////////////////////
@@ -238,3 +229,38 @@
 {
     ui->WaitTextLabel->setVisible(false);
 }
+
+////////////////////////////////////////////////////////////////////////////
+void MainWindow::on_pushButton_clicked()
+{
+    ui->DEList->clear();
+
+    if (!checkNG())
+    {
+        pkginfo = new QProcess(this);
+        pkginfo->setProcessChannelMode(QProcess::MergedChannels);
+        connect( pkginfo, SIGNAL(readyRead()), this, SLOT(slotReadPkg() ) );
+        connect( pkginfo, SIGNAL(finished ( int, QProcess::ExitStatus)), this, SLOT(slotPackagesFinished(int, QProcess::ExitStatus)));
+        pkginfo->start("pkg_info");
+        ui->WaitTextLabel->setVisible(true);
+    }
+    else
+    {
+        ui->WaitTextLabel->setVisible(false);
+        for(int i=0 ; i<DEComponentsNG_size; i++)
+        {
+            QString ver;
+            if (checkNGPackage(DEComponentsNG[i].Prefix, ver))
+            {
+                addDEItem(DEComponentsNG[i].Name, ver);
+            }
+        }//for all DEs
+    }//if pkgng installed
+
+    ui->MainStack->setCurrentIndex(1);
+}
+
+void MainWindow::on_BackButton_2_clicked()
+{
+    ui->MainStack->setCurrentIndex(0);
+}

Modified: pcbsd/current/src-qt4/about-gui/mainwindow.h
===================================================================
--- pcbsd/current/src-qt4/about-gui/mainwindow.h	2013-03-19 09:23:03 UTC (rev 21898)
+++ pcbsd/current/src-qt4/about-gui/mainwindow.h	2013-03-19 11:29:34 UTC (rev 21899)
@@ -55,6 +55,10 @@
 
     void slotReadPkg();    
 
+    void on_pushButton_clicked();
+
+    void on_BackButton_2_clicked();
+
 private:
     Ui::MainWindow *ui;
     QProcess* pkginfo;

Modified: pcbsd/current/src-qt4/about-gui/mainwindow.ui
===================================================================
(Binary files differ)



More information about the Commits mailing list