author | tille <tille> | 2002-06-27 11:05:15 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-27 11:05:15 (UTC) |
commit | 4301065a4e43b0860774dca358a8027790a42f4f (patch) (side-by-side diff) | |
tree | 52e8abb5e859636b6b651727fb1dcf94350ba158 /noncore | |
parent | f2cd92301181f3bc895b0d1701183e4da7b52812 (diff) | |
download | opie-4301065a4e43b0860774dca358a8027790a42f4f.zip opie-4301065a4e43b0860774dca358a8027790a42f4f.tar.gz opie-4301065a4e43b0860774dca358a8027790a42f4f.tar.bz2 |
if postinst works, clicking on clockapplet should work too
5 files changed, 34 insertions, 13 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 083b50f..830c0c3 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp @@ -27,3 +27,2 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) { - qDebug("%s", QPEApplication::qpeDir().latin1()); Config ntpSrvs(QPEApplication::qpeDir()+"etc/ntpservers",Config::File); @@ -201,4 +200,5 @@ void Ntp::readLookups() TableLookups->horizontalHeader()->setLabel(0,tr("shift [s/h]")); - int cw = 50;//TableLookups->width()/4; + int cw = TableLookups->width()/4; qDebug("column width %i",cw); + cw = 50; TableLookups->setColumnWidth( 0, cw+30 ); @@ -217,8 +217,8 @@ void Ntp::readLookups() _shiftPerSec += shiftPerSec; - TableLookups->setText( i,0,QString::number(shiftPerSec*60)); + TableLookups->setText( i,0,QString::number(shiftPerSec*60*60)); TableLookups->setText( i,2,QString::number(shift)); - TableLookups->setText( i,1,QString::number(last/60)); + TableLookups->setText( i,1,QString::number(last/(60*60))); } - _shiftPerSec /= lookupCount+1; - TextLabelShift->setText(QString::number(_shiftPerSec)+tr(" seconds")); + _shiftPerSec /= lookupCount; + TextLabelShift->setText(QString::number(_shiftPerSec*60*60)+tr(" s/h")); } diff --git a/noncore/settings/netsystemtime/opie-netsystemtime.control b/noncore/settings/netsystemtime/opie-netsystemtime.control index d3290e9..8fd7da5 100644 --- a/noncore/settings/netsystemtime/opie-netsystemtime.control +++ b/noncore/settings/netsystemtime/opie-netsystemtime.control @@ -1 +1,2 @@ +Packagename: opie-netsystemtime Files: bin/netsystemtime apps/Settings/ntpdatetime.desktop etc/ntpservers @@ -9,3 +10,3 @@ Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION), ntpdate -Description: ntp ( Network Time Protocol) gui +Description: ntp (Network Time Protocol) gui This utility syncs system time with a atomic timerserver via internet diff --git a/noncore/settings/netsystemtime/opie-netsystemtime.postinst b/noncore/settings/netsystemtime/opie-netsystemtime.postinst new file mode 100644 index 0000000..233cd31 --- a/dev/null +++ b/noncore/settings/netsystemtime/opie-netsystemtime.postinst @@ -0,0 +1,7 @@ +#!/bin/sh -v + +systime=`ipkg status | grep Package | grep -i systemtime | sed "s/Package://"` +ipkg remove $pack + +cd $QPEDIR/bin/ +ln -s netsystemtime systemtime diff --git a/noncore/settings/netsystemtime/opie-netsystemtime.postrm b/noncore/settings/netsystemtime/opie-netsystemtime.postrm new file mode 100644 index 0000000..4b2ab7c --- a/dev/null +++ b/noncore/settings/netsystemtime/opie-netsystemtime.postrm @@ -0,0 +1,4 @@ +#!/bin/sh -v + +cd $QPEDIR/bin/ +rm systemtime diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp index 93543cd..e7e604f 100644 --- a/noncore/settings/netsystemtime/settime.cpp +++ b/noncore/settings/netsystemtime/settime.cpp @@ -233,8 +233,2 @@ void SetDateTime::commitTime() tz->setFocus(); - // really turn off the screensaver before doing anything - { - // Needs to be encased in { } so that it deconstructs and sends - QCopEnvelope disableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); - disableScreenSaver << 0 << 0 << 0; - } // Need to process the QCOP event generated above before proceeding @@ -252,2 +246,8 @@ void SetDateTime::setTime(QDateTime dt) { + // really turn off the screensaver before doing anything + { + // Needs to be encased in { } so that it deconstructs and sends + QCopEnvelope disableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); + disableScreenSaver << 0 << 0 << 0; + } Config cfg("ntp",Config::User); @@ -267,2 +267,5 @@ void SetDateTime::setTime(QDateTime dt) DateBookDB db; + // Restore screensaver + QCopEnvelope enableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); + enableScreenSaver << -1 << -1 << -1; } @@ -271,2 +274,8 @@ void SetDateTime::updateSystem(int i) { + // really turn off the screensaver before doing anything + { + // Needs to be encased in { } so that it deconstructs and sends + QCopEnvelope disableScreenSaver( "QPE/System", "setScreenSaverIntervals(int,int,int)" ); + disableScreenSaver << 0 << 0 << 0; + } qDebug("SetDateTime::updateSystem(int %i)",i); |