summaryrefslogtreecommitdiffabout
path: root/kalarmd
Side-by-side diff
Diffstat (limited to 'kalarmd') (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
@@ -402,11 +402,10 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
QString configString ;
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";
configString += "SEPARATOR\n";
@@ -434,8 +433,8 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
ok = false;
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);
}
}
}
@@ -443,12 +442,12 @@ 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 );
mTimerPopUp->insertItem( "10 min", 10 );
@@ -505,7 +504,7 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
if ( !dia.exec() )
return;
- AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() );
+ AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() );
mTimerTime = 0;
return;
}
@@ -516,19 +515,7 @@ 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 ;
mRunningTimerText = mCustomText.stripWhiteSpace ();
@@ -610,12 +597,9 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
mRunningTimerText = mRunningTimerText.left ( in );
}
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;
}
}
//minutes = 1;