summaryrefslogtreecommitdiff
authortille <tille>2002-06-26 09:40:05 (UTC)
committer tille <tille>2002-06-26 09:40:05 (UTC)
commit28d91fba01e6eb728de997757a33f4328ee19e2f (patch) (unidiff)
treef027967e0d120620c46084101547ca7adabbb16e
parentf49bd645d1537e826e12a3beaafbf291b3ad4d07 (diff)
downloadopie-28d91fba01e6eb728de997757a33f4328ee19e2f.zip
opie-28d91fba01e6eb728de997757a33f4328ee19e2f.tar.gz
opie-28d91fba01e6eb728de997757a33f4328ee19e2f.tar.bz2
combos update sys
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp2
-rw-r--r--noncore/settings/netsystemtime/opie-netsystemtime.control3
-rw-r--r--noncore/settings/netsystemtime/settime.cpp25
-rw-r--r--noncore/settings/netsystemtime/settime.h2
4 files changed, 29 insertions, 3 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index 4a7959e..b2f192a 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -43,5 +43,5 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl )
43 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); 43 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp()));
44 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); 44 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime()));
45 45 slotCheckNtp(-1);
46// slotRunNtp(); 46// slotRunNtp();
47 readLookups(); 47 readLookups();
diff --git a/noncore/settings/netsystemtime/opie-netsystemtime.control b/noncore/settings/netsystemtime/opie-netsystemtime.control
index a5809b0..406d7b0 100644
--- a/noncore/settings/netsystemtime/opie-netsystemtime.control
+++ b/noncore/settings/netsystemtime/opie-netsystemtime.control
@@ -3,4 +3,5 @@ Priority: optional
3Section: opie/settings 3Section: opie/settings
4Depends: ntpdate 4Depends: ntpdate
5Conflicts: opie-systemtime
5Maintainer: Patrick S. Vogt <tille@handhelds.org> 6Maintainer: Patrick S. Vogt <tille@handhelds.org>
6Architecture: arm 7Architecture: arm
@@ -8,3 +9,3 @@ Version: $QPE_VERSION-$SUB_VERSION
8Depends: opie-base ($QPE_VERSION), ntpdate 9Depends: opie-base ($QPE_VERSION), ntpdate
9Description: ntp ( Network Time Protocol) gui 10Description: ntp ( Network Time Protocol) gui
10This utility syncs system time with a atomic timerserver via internet \ No newline at end of file 11This utility syncs system time with a atomic timerserver via internet
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp
index 2cef6e8..b456012 100644
--- a/noncore/settings/netsystemtime/settime.cpp
+++ b/noncore/settings/netsystemtime/settime.cpp
@@ -193,9 +193,23 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f )
193 QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), 193 QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ),
194 SLOT( tzChange( const QString& ) ) ); 194 SLOT( tzChange( const QString& ) ) );
195
196 QObject::connect( weekStartCombo, SIGNAL( activated ( int )),
197 SLOT(updateSystem(int ) ));
198 QObject::connect( ampmCombo, SIGNAL( activated ( int )),
199 SLOT(updateSystem(int ) ));
200 QObject::connect( dateFormatCombo, SIGNAL( activated ( int )),
201 SLOT(updateSystem(int ) ));
202 QObject::connect( clockAppletCombo, SIGNAL( activated ( int )),
203 SLOT(updateSystem(int ) ));
195} 204}
196 205
197SetDateTime::~SetDateTime() 206SetDateTime::~SetDateTime()
198{ 207{
208 writeSettings();
209
210}
199 211
212void SetDateTime::writeSettings()
213{
200 Config config("qpe"); 214 Config config("qpe");
201 config.setGroup( "Time" ); 215 config.setGroup( "Time" );
@@ -248,8 +262,14 @@ void SetDateTime::setTime(QDateTime dt)
248 ::settimeofday( &myTv, 0 ); 262 ::settimeofday( &myTv, 0 );
249 Global::writeHWClock(); 263 Global::writeHWClock();
264}
265
266void SetDateTime::updateSystem(int i)
267{
268 qDebug("SetDateTime::updateSystem(int %i)",i);
269 writeSettings();
250 // since time has changed quickly load in the datebookdb 270 // since time has changed quickly load in the datebookdb
251 // to allow the alarm server to get a better grip on itself 271 // to allow the alarm server to get a better grip on itself
252 // (example re-trigger alarms for when we travel back in time) 272 // (example re-trigger alarms for when we travel back in time)
253 DateBookDB db; 273 // DateBookDB db;
254 274
255 // set the timezone for everyone else... 275 // set the timezone for everyone else...
@@ -277,4 +297,5 @@ void SetDateTime::setTime(QDateTime dt)
277void SetDateTime::tzChange( const QString &tz ) 297void SetDateTime::tzChange( const QString &tz )
278{ 298{
299 qDebug("SetDateTime::tzChange");
279 // set the TZ get the time and leave gracefully... 300 // set the TZ get the time and leave gracefully...
280 QString strSave; 301 QString strSave;
@@ -288,4 +309,5 @@ void SetDateTime::tzChange( const QString &tz )
288 } 309 }
289 dateButton->setDate( d ); 310 dateButton->setDate( d );
311 updateSystem();
290} 312}
291 313
@@ -431,4 +453,5 @@ void SetTime::checkedPM( int c )
431void SetTime::slotTzChange( const QString &tz ) 453void SetTime::slotTzChange( const QString &tz )
432{ 454{
455 qDebug("SetTime::slotTzChange");
433 // set the TZ get the time and leave gracefully... 456 // set the TZ get the time and leave gracefully...
434 QString strSave; 457 QString strSave;
diff --git a/noncore/settings/netsystemtime/settime.h b/noncore/settings/netsystemtime/settime.h
index 60423e7..778cb9c 100644
--- a/noncore/settings/netsystemtime/settime.h
+++ b/noncore/settings/netsystemtime/settime.h
@@ -75,7 +75,9 @@ protected slots:
75 void tzChange( const QString &tz ); 75 void tzChange( const QString &tz );
76 void formatChanged(int); 76 void formatChanged(int);
77 void updateSystem(int i=0);
77 78
78protected: 79protected:
79 void setTime(QDateTime dt); 80 void setTime(QDateTime dt);
81 void writeSettings();
80 82
81 SetTime *timeButton; 83 SetTime *timeButton;