[PC-BSD Commits] r21878 - pcbsd/current/src-qt4/pc-installgui

svn at pcbsd.org svn at pcbsd.org
Fri Mar 15 02:42:41 PDT 2013


Author: kris
Date: 2013-03-15 09:42:40 +0000 (Fri, 15 Mar 2013)
New Revision: 21878

Modified:
   pcbsd/current/src-qt4/pc-installgui/installer.cpp
   pcbsd/current/src-qt4/pc-installgui/installer.h
   pcbsd/current/src-qt4/pc-installgui/installer.ui
Log:

Add a QSlider to the desktop selector screen, makes it easier for folks
to tell that it is possible to switch between desktops and such, if they
don't see the left / right arrows



Modified: pcbsd/current/src-qt4/pc-installgui/installer.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.cpp	2013-03-15 09:22:23 UTC (rev 21877)
+++ pcbsd/current/src-qt4/pc-installgui/installer.cpp	2013-03-15 09:42:40 UTC (rev 21878)
@@ -598,6 +598,7 @@
   }
   
   wheelCurItem=tItem;
+  deskSlider->setValue(wheelCurItem);
   groupDeskSummary->setTitle(wheelName.at(tItem-1));
   textDeskSummary->setText(wheelDesc.at(tItem-1));
 
@@ -680,11 +681,18 @@
     }
     graphicsViewOS->setScene(defaultScene);
 
+    // desk slider
+    deskSlider->setMinimum(1);
+    deskSlider->setMaximum(6);
+    deskSlider->setTickInterval(1);
+
     // If less than 2GB memory, default to LXDE, otherwise KDE
-    if ( systemMemory > 2048 ) 
+    if ( systemMemory > 2048 )  {
       wheelCurItem=2;
-    else
+    } else {
       wheelCurItem=3;
+    }
+    deskSlider->setValue(wheelCurItem);
     graphicsViewOS->centerOn(191,0);
     graphicsViewOS->show();
     moveDesktopWheel(true);
@@ -696,8 +704,34 @@
     connect(pushDeskRight,SIGNAL(clicked()), this, SLOT(slotDesktopRightClicked()));
     connect(pushDeskLeft,SIGNAL(clicked()), this, SLOT(slotDesktopLeftClicked()));
     connect(pushDeskCustomize,SIGNAL(clicked()), this, SLOT(slotDesktopCustomizeClicked()));
+    connect(deskSlider,SIGNAL(valueChanged(int)), this, SLOT(slotDeskSliderChanged(int)));
 }
 
+void Installer::slotDeskSliderChanged(int val)
+{
+    if ( wheelCurItem >= 10 ) {
+    int ret = QMessageBox::question(this, tr("PC-BSD Installer"), tr("You currently have a custom package set configured. Continue changing to a default set?"),
+                              QMessageBox::No | QMessageBox::Yes,
+                              QMessageBox::No);
+      switch (ret) {
+      case QMessageBox::Yes:
+        break;
+      case QMessageBox::No: // :)
+        deskSlider->setValue(wheelCurItem);
+        return;
+        break;
+      } 
+      wheelCurItem = wheelCurItem - 10;
+      graphicsViewOS->setScene(defaultScene);
+    }
+
+    if ( val > wheelCurItem)
+      moveDesktopWheel(true);
+    else
+      moveDesktopWheel(false);
+      
+}
+
 void Installer::proceed(bool forward)
 {
     int count = installStackWidget->count() - 1;

Modified: pcbsd/current/src-qt4/pc-installgui/installer.h
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.h	2013-03-15 09:22:23 UTC (rev 21877)
+++ pcbsd/current/src-qt4/pc-installgui/installer.h	2013-03-15 09:42:40 UTC (rev 21878)
@@ -65,6 +65,7 @@
     void slotDesktopCustomizeClicked();
     void slotSaveMetaChanges(QStringList);
     void slotSaveFBSDSettings(QString, QString, QString, QString, QString, QString, bool, bool, bool, QStringList);
+    void slotDeskSliderChanged(int val);
 
 
 private:

Modified: pcbsd/current/src-qt4/pc-installgui/installer.ui
===================================================================
(Binary files differ)



More information about the Commits mailing list