-rw-r--r-- | core/settings/citytime/citytime.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp index 5dc9b02..b359ae1 100644 --- a/core/settings/citytime/citytime.cpp +++ b/core/settings/citytime/citytime.cpp @@ -4,97 +4,99 @@ ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ // changes by Maximilian Reiss <harlekin@handhelds.org> #include "zonemap.h" #include "citytime.h" #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/timestring.h> #include <qpe/tzselect.h> #if !defined(QT_NO_COP) #include <qpe/qcopenvelope_qws.h> #endif #include <qdir.h> #include <qfile.h> #include <qlabel.h> #include <qmessagebox.h> #include <qregexp.h> #include <qtextstream.h> #include <qtoolbutton.h> #include <qlayout.h> #include <stdlib.h> CityTime::CityTime( QWidget *parent, const char* name, WFlags fl ) : CityTimeBase( parent, name, fl ), strRealTz(0), bAdded(false) { Config config( "qpe" ); + config.setGroup( "Time" ); bWhichClock = config.readBoolEntry( "AMPM", TRUE ); + qDebug( QString("%1").arg(bWhichClock) ); frmMap->changeClock( bWhichClock ); char *pEnv; pEnv = NULL; pEnv = getenv("TZ"); if ( pEnv ) strRealTz = pEnv; pEnv = NULL; pEnv = getenv("HOME"); if ( pEnv ) strHome = pEnv; // append the labels to their respective lists... listCities.setAutoDelete( true ); listTimes.setAutoDelete( true ); listCities.append( cmdCity1 ); listCities.append( cmdCity2 ); listCities.append( cmdCity3 ); listTimes.append( lblCTime1 ); listTimes.append( lblCTime2 ); listTimes.append( lblCTime3 ); // kludgy way of getting the screen size so we don't have to depend // on a resize event... QWidget *d = QApplication::desktop(); if ( d->width() < d->height() ) { // append for that 4 down look listCities.append( cmdCity4 ); listCities.append( cmdCity5 ); listCities.append( cmdCity6 ); listTimes.append( lblCTime4 ); listTimes.append( lblCTime5 ); listTimes.append( lblCTime6 ); lblCTime7->hide(); lblCTime8->hide(); lblCTime9->hide(); cmdCity7->hide(); cmdCity8->hide(); cmdCity9->hide(); } else { listCities.append( cmdCity7 ); listCities.append( cmdCity8 ); listCities.append( cmdCity9 ); listTimes.append( lblCTime7 ); listTimes.append( lblCTime8 ); listTimes.append( lblCTime9 ); |