[PC-BSD Commits] r20181 - pcbsd/current/src-qt4/pc-sysmanager

svn at pcbsd.org svn at pcbsd.org
Mon Nov 12 08:54:07 PST 2012


Author: kris
Date: 2012-11-12 16:54:07 +0000 (Mon, 12 Nov 2012)
New Revision: 20181

Modified:
   pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
   pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui
Log:

Fix the system-manager mirrors page, to show radio dialog if we are using
the "default" auto-detected mirrors



Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp	2012-11-12 16:39:55 UTC (rev 20180)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp	2012-11-12 16:54:07 UTC (rev 20181)
@@ -65,6 +65,7 @@
     connect(fetchPortsBut, SIGNAL( clicked() ), this, SLOT( fetchPortsPressed() ) );
 
     // Connect the mirror radio buttons, so we can enable disable objects based on status
+    connect(radioAutoMirror, SIGNAL( clicked() ), this, SLOT( slotCheckMirrorRadio() ) );
     connect(radioSelectMirror, SIGNAL( clicked() ), this, SLOT( slotCheckMirrorRadio() ) );
     connect(radioCustomMirror, SIGNAL( clicked() ), this, SLOT( slotCheckMirrorRadio() ) );
 
@@ -116,10 +117,14 @@
   
   // Check if we found a mirror in the PC-BSD list, otherwise default to custom mirror
   if (!usingMirrorList) {
-      radioCustomMirror->setChecked(true);
+      if ( currentMirror.isEmpty() )
+        radioAutoMirror->setChecked(true);
+      else
+        radioCustomMirror->setChecked(true);
       lineCustomMirror->setText(currentMirror);
   }
 
+  slotCheckMirrorRadio();
 }
 
 void PBSystemTab::CheckUname()
@@ -484,18 +489,16 @@
 
 void PBSystemTab::slotCheckMirrorRadio() {
 
+    comboMirrorList->setEnabled(false);
+    pushRefreshList->setEnabled(false);
+    lineCustomMirror->setEnabled(false);
     if( radioSelectMirror->isChecked() )
     {
       comboMirrorList->setEnabled(true);
       pushRefreshList->setEnabled(true);
-      lineCustomMirror->setEnabled(false);
     }
     if( radioCustomMirror->isChecked() )
-    {
-      comboMirrorList->setEnabled(false);
-      pushRefreshList->setEnabled(false);
       lineCustomMirror->setEnabled(true);
-    }
 }
 
 void PBSystemTab::slotMiscSave() {
@@ -514,6 +517,8 @@
 
     if ( ! radioSelectMirror->isChecked() ) {
        Utils::setMasterMirror(lineCustomMirror->text());
+    } else if (radioAutoMirror->isChecked() ) {
+       Utils::setMasterMirror("");
     } else {
        // Check if we have a mirror selected and save it
        QString curMirror;

Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui	2012-11-12 16:39:55 UTC (rev 20180)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.ui	2012-11-12 16:54:07 UTC (rev 20181)
@@ -429,14 +429,14 @@
           <string>Mirror Configuration</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_8">
-          <item row="0" column="0">
+          <item row="1" column="0">
            <widget class="QRadioButton" name="radioSelectMirror">
             <property name="text">
              <string>Select Mirror from list</string>
             </property>
            </widget>
           </item>
-          <item row="1" column="0">
+          <item row="2" column="0">
            <layout class="QHBoxLayout" name="horizontalLayout_3">
             <item>
              <spacer name="horizontalSpacer_2">
@@ -479,14 +479,14 @@
             </item>
            </layout>
           </item>
-          <item row="2" column="0">
+          <item row="3" column="0">
            <widget class="QRadioButton" name="radioCustomMirror">
             <property name="text">
              <string>Specify a custom Mirror</string>
             </property>
            </widget>
           </item>
-          <item row="3" column="0">
+          <item row="4" column="0">
            <layout class="QHBoxLayout" name="horizontalLayout_4">
             <item>
              <spacer name="horizontalSpacer_3">
@@ -509,6 +509,13 @@
             </item>
            </layout>
           </item>
+          <item row="0" column="0">
+           <widget class="QRadioButton" name="radioAutoMirror">
+            <property name="text">
+             <string>Use auto-detected mirrors</string>
+            </property>
+           </widget>
+          </item>
          </layout>
         </widget>
        </item>



More information about the Commits mailing list