[PC-BSD Commits] r5137 - pcbsd/trunk/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Tue Nov 24 12:19:55 PST 2009


Author: kris
Date: 2009-11-24 12:19:55 -0800 (Tue, 24 Nov 2009)
New Revision: 5137

Modified:
   pcbsd/trunk/SysInstaller/backend.cpp
   pcbsd/trunk/SysInstaller/backend.h
   pcbsd/trunk/SysInstaller/sysinstaller.cpp
Log:

Setup SysInstaller to read in list of timezones and display them



Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp	2009-11-24 20:14:43 UTC (rev 5136)
+++ pcbsd/trunk/SysInstaller/backend.cpp	2009-11-24 20:19:55 UTC (rev 5137)
@@ -2,6 +2,22 @@
 
 using namespace Scripts;
 
+QStringList Backend::timezones()
+{
+    QStringList _zones;
+    QString line;
+
+    Process p(QStringList() << "list-tzones");
+
+    if (p.waitForFinished()) {
+        while (p.canReadLine()) {
+            line = p.readLine();
+            _zones.append(line);
+        }
+    }
+    return _zones;
+}
+
 QStringList Backend::languages()
 {
     QStringList _languages;

Modified: pcbsd/trunk/SysInstaller/backend.h
===================================================================
--- pcbsd/trunk/SysInstaller/backend.h	2009-11-24 20:14:43 UTC (rev 5136)
+++ pcbsd/trunk/SysInstaller/backend.h	2009-11-24 20:19:55 UTC (rev 5137)
@@ -42,6 +42,7 @@
     static QStringList keyVariants(const QString &);
     static QStringList bootableMedia();
     static QStringList networkDevices();
+    static QStringList timezones();
     static QList<QStringList> hardDrives();
     static int systemMemory();
     //static QList<QStringList> slices();

Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-24 20:14:43 UTC (rev 5136)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-24 20:19:55 UTC (rev 5137)
@@ -97,6 +97,10 @@
     listKbLayouts->clear();
     listKbLayouts->addItems(Scripts::Backend::keyLayouts());
 
+    // Load the timezones
+    comboBoxTimezone->clear();
+    comboBoxTimezone->addItems(Scripts::Backend::timezones());
+
     // Connect buttons / slots
     connect(listKbLayouts, SIGNAL(currentRowChanged(int)), this, SLOT(slotCurrentKbLayoutChanged(int)));
     connect(listKbVariants,SIGNAL(currentRowChanged(int)), this, SLOT(slotCurrentKbVariantChanged(int)));



More information about the Commits mailing list