summaryrefslogtreecommitdiffabout
path: root/kalarmd
Side-by-side diff
Diffstat (limited to 'kalarmd') (more/less context) (ignore 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
@@ -404,7 +404,6 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
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";
@@ -436,4 +435,4 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
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);
}
@@ -445,8 +444,8 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
#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 );
@@ -507,3 +506,3 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
- AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() );
+ AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() );
mTimerTime = 0;
@@ -518,15 +517,3 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
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;
@@ -612,8 +599,5 @@ 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;
}