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

svn at pcbsd.org svn at pcbsd.org
Thu Mar 1 10:08:48 PST 2012


Author: kris
Date: 2012-03-01 18:08:48 +0000 (Thu, 01 Mar 2012)
New Revision: 15667

Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
Log:

Add -installed startup flag, which lets us jump right to installed tab



Modified: pcbsd/current/src-qt4/pc-softwaremanager/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/main.cpp	2012-03-01 18:00:09 UTC (rev 15666)
+++ pcbsd/current/src-qt4/pc-softwaremanager/main.cpp	2012-03-01 18:08:48 UTC (rev 15667)
@@ -23,8 +23,16 @@
     qDebug() << "Locale:" << langCode;
 
     PBM w; 
+
+    w.ProgramInit();
+
+    if ( argc == 2)
+    {
+       QString chkarg = argv[1];
+       if ( chkarg == "-installed" )
+       w.showInstalledTab();
+    }
 	
-    w.ProgramInit();
     w.show();
 
     QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance()) );

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2012-03-01 18:00:09 UTC (rev 15666)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2012-03-01 18:08:48 UTC (rev 15667)
@@ -707,3 +707,8 @@
     event->ignore();
 }
 
+
+void PBM::showInstalledTab()
+{
+  tabPBM->setCurrentIndex(1);
+}

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2012-03-01 18:00:09 UTC (rev 15666)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2012-03-01 18:08:48 UTC (rev 15667)
@@ -48,6 +48,7 @@
         }
 
    void ProgramInit();
+   void showInstalledTab();
 
 
 public slots:



More information about the Commits mailing list