author | tille <tille> | 2002-06-26 09:40:05 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-26 09:40:05 (UTC) |
commit | 28d91fba01e6eb728de997757a33f4328ee19e2f (patch) (side-by-side diff) | |
tree | f027967e0d120620c46084101547ca7adabbb16e | |
parent | f49bd645d1537e826e12a3beaafbf291b3ad4d07 (diff) | |
download | opie-28d91fba01e6eb728de997757a33f4328ee19e2f.zip opie-28d91fba01e6eb728de997757a33f4328ee19e2f.tar.gz opie-28d91fba01e6eb728de997757a33f4328ee19e2f.tar.bz2 |
combos update sys
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/opie-netsystemtime.control | 3 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/settime.cpp | 25 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/settime.h | 2 |
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 @@ -41,9 +41,9 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) connect ( ntpProcess, SIGNAL(processExited(OProcess*)), this, SLOT(ntpFinished(OProcess*))); connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); - + slotCheckNtp(-1); // slotRunNtp(); 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 @@ -1,10 +1,11 @@ Files: bin/netsystemtime apps/Settings/ntpdatetime.desktop Priority: optional Section: opie/settings Depends: ntpdate +Conflicts: opie-systemtime Maintainer: Patrick S. Vogt <tille@handhelds.org> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION), ntpdate Description: ntp ( Network Time Protocol) gui -This utility syncs system time with a atomic timerserver via internet
\ No newline at end of file +This 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 @@ -191,13 +191,27 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f ) QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), timeButton, SLOT( slotTzChange( const QString& ) ) ); QObject::connect( tz, SIGNAL( signalNewTz( const QString& ) ), SLOT( tzChange( const QString& ) ) ); + + QObject::connect( weekStartCombo, SIGNAL( activated ( int )), + SLOT(updateSystem(int ) )); + QObject::connect( ampmCombo, SIGNAL( activated ( int )), + SLOT(updateSystem(int ) )); + QObject::connect( dateFormatCombo, SIGNAL( activated ( int )), + SLOT(updateSystem(int ) )); + QObject::connect( clockAppletCombo, SIGNAL( activated ( int )), + SLOT(updateSystem(int ) )); } SetDateTime::~SetDateTime() { + writeSettings(); + +} +void SetDateTime::writeSettings() +{ Config config("qpe"); config.setGroup( "Time" ); config.writeEntry( "AMPM", ampmCombo->currentItem() ); config.writeEntry( "MONDAY", weekStartCombo->currentItem() ); @@ -246,12 +260,18 @@ void SetDateTime::setTime(QDateTime dt) if ( myTv.tv_sec != -1 ) ::settimeofday( &myTv, 0 ); Global::writeHWClock(); +} + +void SetDateTime::updateSystem(int i) +{ + qDebug("SetDateTime::updateSystem(int %i)",i); + writeSettings(); // since time has changed quickly load in the datebookdb // to allow the alarm server to get a better grip on itself // (example re-trigger alarms for when we travel back in time) - DateBookDB db; + // DateBookDB db; // set the timezone for everyone else... QCopEnvelope setTimeZone( "QPE/System", "timeChange(QString)" ); setTimeZone << tz->currentZone(); @@ -275,8 +295,9 @@ void SetDateTime::setTime(QDateTime dt) } void SetDateTime::tzChange( const QString &tz ) { + qDebug("SetDateTime::tzChange"); // set the TZ get the time and leave gracefully... QString strSave; strSave = getenv( "TZ" ); setenv( "TZ", tz, 1 ); @@ -286,8 +307,9 @@ void SetDateTime::tzChange( const QString &tz ) if ( !strSave.isNull() ) { setenv( "TZ", strSave, 1 ); } dateButton->setDate( d ); + updateSystem(); } void SetDateTime::formatChanged(int i) { @@ -429,8 +451,9 @@ void SetTime::checkedPM( int c ) } void SetTime::slotTzChange( const QString &tz ) { + qDebug("SetTime::slotTzChange"); // set the TZ get the time and leave gracefully... QString strSave; strSave = getenv( "TZ" ); setenv( "TZ", tz, 1 ); 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 @@ -73,11 +73,13 @@ public: protected slots: void commitTime(); void tzChange( const QString &tz ); void formatChanged(int); + void updateSystem(int i=0); protected: void setTime(QDateTime dt); + void writeSettings(); SetTime *timeButton; DateButton *dateButton; TimeZoneSelector *tz; |