summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-14 19:52:48 (UTC)
committer zautrix <zautrix>2005-06-14 19:52:48 (UTC)
commitc50dea673d7bf65614e042a0e3c0c53c73c705a0 (patch) (side-by-side diff)
tree04331039e86c4fa1976ba20b60acd2988dc8c19f
parentd9df54411b01cabaf51fcae62b91f227f7eff5f5 (diff)
downloadkdepimpi-c50dea673d7bf65614e042a0e3c0c53c73c705a0.zip
kdepimpi-c50dea673d7bf65614e042a0e3c0c53c73c705a0.tar.gz
kdepimpi-c50dea673d7bf65614e042a0e3c0c53c73c705a0.tar.bz2
fixx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp46
1 files changed, 15 insertions, 31 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index d6e06c8..eff96eb 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -403,9 +403,8 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
configString += "#config file for kopi alarm timer\n";
configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n";
- configString += "#NOTE: minimum value for timer are 3 minutes!\n";
- configString += "24 h; 1440\n";
- configString += " 8 h; 480\n";
- configString += " 5 h; 300\n";
- configString += " 1 h; 60\n";
+ configString += "24 hours; 1440\n";
+ configString += "8 hours; 480\n";
+ configString += "5 hours; 300\n";
+ configString += "1 hour; 60\n";
configString += "30 min; 30\n";
configString += "15 min; 15\n";
@@ -435,6 +434,6 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
if ( li.count() == 2 ) {
int val = li[1].toInt( &ok );
- if ( ok && val > 2 ) {
- mTimerPopUp->insertItem( li[0], val);
+ if ( ok && val > 0 ) {
+ mTimerPopUp->insertItem( li[0], val+10);
}
}
@@ -444,10 +443,10 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
file.close();
#if 0
- mTimerPopUp->insertItem( "24 h", 1440 );
+ mTimerPopUp->insertItem( "24 hours", 1440 );
// mTimerPopUp->insertItem( i18n("12 h"), 720 );
- mTimerPopUp->insertItem( " 8 h", 480 );
- mTimerPopUp->insertItem( " 5 h", 300 );
+ mTimerPopUp->insertItem( " 8 hours", 480 );
+ mTimerPopUp->insertItem( " 5 hours", 300 );
// mTimerPopUp->insertItem( i18n(" 2 h"), 120 );
- mTimerPopUp->insertItem( " 1 h", 60 );
+ mTimerPopUp->insertItem( " 1 hour", 60 );
mTimerPopUp->insertItem( "30 min", 30 );
mTimerPopUp->insertItem( "15 min", 15 );
@@ -506,5 +505,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
return;
- AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() );
+ AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() );
mTimerTime = 0;
return;
@@ -517,17 +516,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
QString mess = "timer_alarm";
mess += ("Timer Alarm!\n");
- if ( minutes == 22 ) {
- mess += ( "Pizza is ready");
- mRunningTimerText = "Pizza";
- }
- else if ( minutes == 45 ) {
- mess += ( "Please wake up!");
- mRunningTimerText = "Nap";
- }
- else if ( minutes == 5 ) {
- mess += ( "Tea is ready");
- mRunningTimerText = "Tea";
- }
- else if ( minutes == 3 ) {
+ if ( minutes == 3 ) {
mess += mCustomText;
minutes = mCustomMinutes ;
@@ -611,10 +598,7 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
}
else {
- mess+= QString::number ( minutes ) + ( " minutes are past!");
- int min = minutes;
- if ( min % 60 == 0 )
- mRunningTimerText = QString::number ( min/60 ) + ( " hours");
- else
- mRunningTimerText = QString::number ( minutes ) + ( " minutes");
+ mess += mTimerPopUp->text( minutes );
+ mRunningTimerText = mTimerPopUp->text( minutes );
+ minutes -= 10;
}
}