[PC-BSD Commits] r6334 - pcbsd/trunk/SoftwareManager
svn at pcbsd.org
svn at pcbsd.org
Wed Mar 3 09:03:58 PST 2010
Author: kris
Date: 2010-03-03 09:03:58 -0800 (Wed, 03 Mar 2010)
New Revision: 6334
Modified:
pcbsd/trunk/SoftwareManager/softconfigwidget.cpp
pcbsd/trunk/SoftwareManager/softconfigwidget.ui
pcbsd/trunk/SoftwareManager/softmanager-sysupdate.cpp
Log:
Added new ability to change the update check frequency to user option
Modified: pcbsd/trunk/SoftwareManager/softconfigwidget.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softconfigwidget.cpp 2010-03-03 15:32:16 UTC (rev 6333)
+++ pcbsd/trunk/SoftwareManager/softconfigwidget.cpp 2010-03-03 17:03:58 UTC (rev 6334)
@@ -83,6 +83,10 @@
settings.setValue("/PC-BSD/SoftwareManager/currentMirror", lineCustomMirror->text() );
}
+ // Save the update frequency
+ qlonglong frequency = spinBoxUpdateFrequency->value() * 1000 * 60 * 60;
+ settings.setValue("/PC-BSD/SystemUpdater/checkUpdateFrequency", frequency);
+
// Save if we are auto-updating software
settings.setValue("/PC-BSD/SoftwareManager/autoUpdateSoftware", checkAutoUpdateSoftware->isChecked());
@@ -131,6 +135,12 @@
customTmpDir = settings.value("/PC-BSD/SoftwareManager/tmpDir", customTmpDir).toString();
lineTMPDIR->setText( customTmpDir );
+ // Save the update frequency
+ qlonglong frequency = settings.value("/PC-BSD/SystemUpdater/checkUpdateFrequency", (12 * 1000 * 60 * 60)).toLongLong();
+ frequency = (((frequency / 1000) / 60 ) / 60);
+ spinBoxUpdateFrequency->setValue(frequency);
+
+
// Load our settings for auto-updating sys and PBI
checkAutoUpdateSoftware->setChecked(settings.value("/PC-BSD/SoftwareManager/autoUpdateSoftware", false).toBool());
checkAutoDownloadSysUpdates->setChecked(settings.value("/PC-BSD/SoftwareManager/autoDownloadUpdates", false).toBool());
Modified: pcbsd/trunk/SoftwareManager/softconfigwidget.ui
===================================================================
--- pcbsd/trunk/SoftwareManager/softconfigwidget.ui 2010-03-03 15:32:16 UTC (rev 6333)
+++ pcbsd/trunk/SoftwareManager/softconfigwidget.ui 2010-03-03 17:03:58 UTC (rev 6334)
@@ -255,6 +255,56 @@
</layout>
</item>
<item row="1" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Check for updates every</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBoxUpdateFrequency">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>48</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>12</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>hours</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
Modified: pcbsd/trunk/SoftwareManager/softmanager-sysupdate.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-sysupdate.cpp 2010-03-03 15:32:16 UTC (rev 6333)
+++ pcbsd/trunk/SoftwareManager/softmanager-sysupdate.cpp 2010-03-03 17:03:58 UTC (rev 6334)
@@ -3,6 +3,7 @@
#include <QListIterator>
#include <QFlags>
#include <QWebView>
+#include <QSettings>
/***********************************************************************************/
@@ -134,6 +135,11 @@
streamup << QDateTime::currentDateTime().toString("ddd MMMM d yyyy - h:m:sap");
fileup.close();
}
+
+ // Also save to the registry
+ QSettings settings("PCBSD");
+ settings.setValue( "/PC-BSD/SystemUpdater/updateStatusTimeStamp", QDateTime::currentDateTime().toString("ddd MMMM d yyyy - h:m:sap") );
+
}
void PBM::slotUnIgnoreSysUpdate()
More information about the Commits
mailing list