summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-15 11:25:00 (UTC)
committer zautrix <zautrix>2005-04-15 11:25:00 (UTC)
commitd2f51718bdfa5b05e6f7e609ec75f616e3f0a7c1 (patch) (unidiff)
tree2fd31b41a449604610a38464a02a4d4fc5de0e1a /korganizer
parent068b5535de440c93415bae4e13c8efeaadffc5f2 (diff)
downloadkdepimpi-d2f51718bdfa5b05e6f7e609ec75f616e3f0a7c1.zip
kdepimpi-d2f51718bdfa5b05e6f7e609ec75f616e3f0a7c1.tar.gz
kdepimpi-d2f51718bdfa5b05e6f7e609ec75f616e3f0a7c1.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index bd7376a..904bbe2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3802,350 +3802,350 @@ QWidget *CalendarView::leftFrame()
3802DateNavigator *CalendarView::dateNavigator() 3802DateNavigator *CalendarView::dateNavigator()
3803{ 3803{
3804 return mNavigator; 3804 return mNavigator;
3805} 3805}
3806 3806
3807KDateNavigator* CalendarView::dateNavigatorWidget() 3807KDateNavigator* CalendarView::dateNavigatorWidget()
3808{ 3808{
3809 return mDateNavigator->navigatorView(); 3809 return mDateNavigator->navigatorView();
3810} 3810}
3811void CalendarView::toggleDateNavigatorWidget() 3811void CalendarView::toggleDateNavigatorWidget()
3812{ 3812{
3813 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; 3813 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ;
3814 3814
3815 if (!KOPrefs::instance()->mShowDateNavigator ) 3815 if (!KOPrefs::instance()->mShowDateNavigator )
3816 mDateNavigator->hide(); 3816 mDateNavigator->hide();
3817 else 3817 else
3818 mDateNavigator->show(); 3818 mDateNavigator->show();
3819} 3819}
3820void CalendarView::addView(KOrg::BaseView *view) 3820void CalendarView::addView(KOrg::BaseView *view)
3821{ 3821{
3822 mViewManager->addView(view); 3822 mViewManager->addView(view);
3823} 3823}
3824 3824
3825void CalendarView::showView(KOrg::BaseView *view) 3825void CalendarView::showView(KOrg::BaseView *view)
3826{ 3826{
3827 mViewManager->showView(view, mLeftFrame->isVisible()); 3827 mViewManager->showView(view, mLeftFrame->isVisible());
3828} 3828}
3829 3829
3830Incidence *CalendarView::currentSelection() 3830Incidence *CalendarView::currentSelection()
3831{ 3831{
3832 return mViewManager->currentSelection(); 3832 return mViewManager->currentSelection();
3833} 3833}
3834void CalendarView::toggleAllDaySize() 3834void CalendarView::toggleAllDaySize()
3835{ 3835{
3836 /* 3836 /*
3837 if ( KOPrefs::instance()->mAllDaySize > 47 ) 3837 if ( KOPrefs::instance()->mAllDaySize > 47 )
3838 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; 3838 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2;
3839 else 3839 else
3840 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; 3840 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2;
3841 */ 3841 */
3842 viewManager()->agendaView()->toggleAllDay(); 3842 viewManager()->agendaView()->toggleAllDay();
3843} 3843}
3844void CalendarView::toggleExpand() 3844void CalendarView::toggleExpand()
3845{ 3845{
3846 // if ( mLeftFrame->isHidden() ) { 3846 // if ( mLeftFrame->isHidden() ) {
3847 // mLeftFrame->show(); 3847 // mLeftFrame->show();
3848 // emit calendarViewExpanded( false ); 3848 // emit calendarViewExpanded( false );
3849 // } else { 3849 // } else {
3850 // mLeftFrame->hide(); 3850 // mLeftFrame->hide();
3851 // emit calendarViewExpanded( true ); 3851 // emit calendarViewExpanded( true );
3852 // } 3852 // }
3853 //qDebug(" CalendarView::toggleExpand()"); 3853 //qDebug(" CalendarView::toggleExpand()");
3854 globalFlagBlockAgenda = 1; 3854 globalFlagBlockAgenda = 1;
3855 emit calendarViewExpanded( !mLeftFrame->isHidden() ); 3855 emit calendarViewExpanded( !mLeftFrame->isHidden() );
3856 globalFlagBlockAgenda = 5; 3856 globalFlagBlockAgenda = 5;
3857 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); 3857 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() );
3858 //mViewManager->showView( 0, true ); 3858 //mViewManager->showView( 0, true );
3859} 3859}
3860 3860
3861void CalendarView::calendarModified( bool modified, Calendar * ) 3861void CalendarView::calendarModified( bool modified, Calendar * )
3862{ 3862{
3863 setModified( modified ); 3863 setModified( modified );
3864} 3864}
3865 3865
3866Todo *CalendarView::selectedTodo() 3866Todo *CalendarView::selectedTodo()
3867{ 3867{
3868 Incidence *incidence = currentSelection(); 3868 Incidence *incidence = currentSelection();
3869 if ( incidence && incidence->type() == "Todo" ) { 3869 if ( incidence && incidence->type() == "Todo" ) {
3870 return static_cast<Todo *>( incidence ); 3870 return static_cast<Todo *>( incidence );
3871 } 3871 }
3872 3872
3873 incidence = mTodoList->selectedIncidences().first(); 3873 incidence = mTodoList->selectedIncidences().first();
3874 if ( incidence && incidence->type() == "Todo" ) { 3874 if ( incidence && incidence->type() == "Todo" ) {
3875 return static_cast<Todo *>( incidence ); 3875 return static_cast<Todo *>( incidence );
3876 } 3876 }
3877 3877
3878 return 0; 3878 return 0;
3879} 3879}
3880 3880
3881void CalendarView::dialogClosing(Incidence *in) 3881void CalendarView::dialogClosing(Incidence *in)
3882{ 3882{
3883 // mDialogList.remove(in); 3883 // mDialogList.remove(in);
3884} 3884}
3885 3885
3886void CalendarView::showIncidence() 3886void CalendarView::showIncidence()
3887{ 3887{
3888 mViewerCallerIsSearchDialog = false; 3888 mViewerCallerIsSearchDialog = false;
3889 Incidence *incidence = currentSelection(); 3889 Incidence *incidence = currentSelection();
3890 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3890 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3891 if ( incidence ) { 3891 if ( incidence ) {
3892 ShowIncidenceVisitor v; 3892 ShowIncidenceVisitor v;
3893 v.act( incidence, this ); 3893 v.act( incidence, this );
3894 } 3894 }
3895} 3895}
3896void CalendarView::editIncidenceDescription() 3896void CalendarView::editIncidenceDescription()
3897{ 3897{
3898 mFlagEditDescription = true; 3898 mFlagEditDescription = true;
3899 editIncidence(); 3899 editIncidence();
3900 mFlagEditDescription = false; 3900 mFlagEditDescription = false;
3901} 3901}
3902void CalendarView::editIncidence() 3902void CalendarView::editIncidence()
3903{ 3903{
3904 // qDebug("editIncidence() "); 3904 // qDebug("editIncidence() ");
3905 Incidence *incidence = currentSelection(); 3905 Incidence *incidence = currentSelection();
3906 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3906 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3907 if ( incidence ) { 3907 if ( incidence ) {
3908 EditIncidenceVisitor v; 3908 EditIncidenceVisitor v;
3909 v.act( incidence, this ); 3909 v.act( incidence, this );
3910 } 3910 }
3911} 3911}
3912 3912
3913void CalendarView::deleteIncidence() 3913void CalendarView::deleteIncidence()
3914{ 3914{
3915 Incidence *incidence = currentSelection(); 3915 Incidence *incidence = currentSelection();
3916 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3916 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3917 if ( incidence ) { 3917 if ( incidence ) {
3918 deleteIncidence(incidence); 3918 deleteIncidence(incidence);
3919 } 3919 }
3920} 3920}
3921 3921
3922void CalendarView::showIncidence(Incidence *incidence) 3922void CalendarView::showIncidence(Incidence *incidence)
3923{ 3923{
3924 mViewerCallerIsSearchDialog = false; 3924 mViewerCallerIsSearchDialog = false;
3925 //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); 3925 //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() );
3926 if ( sender() && mDialogManager->getSearchDialog() ) { 3926 if ( sender() && mDialogManager->getSearchDialog() ) {
3927 if ( sender () == mDialogManager->getSearchDialog()->listview() ) { 3927 if ( sender () == mDialogManager->getSearchDialog()->listview() ) {
3928 mViewerCallerIsSearchDialog = true; 3928 mViewerCallerIsSearchDialog = true;
3929 } 3929 }
3930 } 3930 }
3931 if ( incidence ) { 3931 if ( incidence ) {
3932 ShowIncidenceVisitor v; 3932 ShowIncidenceVisitor v;
3933 v.act( incidence, this ); 3933 v.act( incidence, this );
3934 } 3934 }
3935} 3935}
3936 3936
3937void CalendarView::editIncidence(Incidence *incidence) 3937void CalendarView::editIncidence(Incidence *incidence)
3938{ 3938{
3939 if ( incidence ) { 3939 if ( incidence ) {
3940 3940
3941 EditIncidenceVisitor v; 3941 EditIncidenceVisitor v;
3942 v.act( incidence, this ); 3942 v.act( incidence, this );
3943 3943
3944 } 3944 }
3945} 3945}
3946 3946
3947void CalendarView::deleteIncidence(Incidence *incidence) 3947void CalendarView::deleteIncidence(Incidence *incidence)
3948{ 3948{
3949 //qDebug(" CalendarView::deleteIncidence "); 3949 //qDebug(" CalendarView::deleteIncidence ");
3950 if ( incidence ) { 3950 if ( incidence ) {
3951 DeleteIncidenceVisitor v; 3951 DeleteIncidenceVisitor v;
3952 v.act( incidence, this ); 3952 v.act( incidence, this );
3953 } 3953 }
3954} 3954}
3955 3955
3956 3956
3957void CalendarView::lookForOutgoingMessages() 3957void CalendarView::lookForOutgoingMessages()
3958{ 3958{
3959 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 3959 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
3960 ogd->loadMessages(); 3960 ogd->loadMessages();
3961} 3961}
3962 3962
3963void CalendarView::lookForIncomingMessages() 3963void CalendarView::lookForIncomingMessages()
3964{ 3964{
3965 IncomingDialog *icd = mDialogManager->incomingDialog(); 3965 IncomingDialog *icd = mDialogManager->incomingDialog();
3966 icd->retrieve(); 3966 icd->retrieve();
3967} 3967}
3968 3968
3969bool CalendarView::removeCompletedSubTodos( Todo* t ) 3969bool CalendarView::removeCompletedSubTodos( Todo* t )
3970{ 3970{
3971 bool deleteTodo = true; 3971 bool deleteTodo = true;
3972 QPtrList<Incidence> subTodos; 3972 QPtrList<Incidence> subTodos;
3973 Incidence *aTodo; 3973 Incidence *aTodo;
3974 subTodos = t->relations(); 3974 subTodos = t->relations();
3975 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 3975 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
3976 if (! removeCompletedSubTodos( (Todo*) aTodo )) 3976 if (! removeCompletedSubTodos( (Todo*) aTodo ))
3977 deleteTodo = false; 3977 deleteTodo = false;
3978 } 3978 }
3979 if ( deleteTodo ) { 3979 if ( deleteTodo ) {
3980 if ( t->isCompleted() && !t->doesRecur()) { 3980 if ( t->isCompleted() && !t->doesRecur()) {
3981 checkExternalId( t ); 3981 checkExternalId( t );
3982 mCalendar->deleteTodo( t ); 3982 mCalendar->deleteTodo( t );
3983 changeTodoDisplay( t,KOGlobals::EVENTDELETED ); 3983 changeTodoDisplay( t,KOGlobals::EVENTDELETED );
3984 } 3984 }
3985 else 3985 else
3986 deleteTodo = false; 3986 deleteTodo = false;
3987 } 3987 }
3988 return deleteTodo; 3988 return deleteTodo;
3989 3989
3990} 3990}
3991void CalendarView::purgeCompleted() 3991void CalendarView::purgeCompleted()
3992{ 3992{
3993 int result = KMessageBox::warningContinueCancel(this, 3993 int result = KMessageBox::warningContinueCancel(this,
3994 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge")); 3994 i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge"));
3995 3995
3996 if (result == KMessageBox::Continue) { 3996 if (result == KMessageBox::Continue) {
3997 3997
3998 QPtrList<Todo> todoCal; 3998 QPtrList<Todo> todoCal;
3999 QPtrList<Todo> rootTodos; 3999 QPtrList<Todo> rootTodos;
4000 //QPtrList<Incidence> rel; 4000 //QPtrList<Incidence> rel;
4001 Todo *aTodo;//, *rTodo; 4001 Todo *aTodo;//, *rTodo;
4002 Incidence *rIncidence; 4002 Incidence *rIncidence;
4003 bool childDelete = false; 4003 bool childDelete = false;
4004 bool deletedOne = true; 4004 bool deletedOne = true;
4005 todoCal = calendar()->todos(); 4005 todoCal = calendar()->todos();
4006 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 4006 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
4007 if ( !aTodo->relatedTo() ) 4007 if ( !aTodo->relatedTo() )
4008 rootTodos.append( aTodo ); 4008 rootTodos.append( aTodo );
4009 } 4009 }
4010 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 4010 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
4011 removeCompletedSubTodos( aTodo ); 4011 removeCompletedSubTodos( aTodo );
4012 } 4012 }
4013 4013
4014 updateView(); 4014 updateView();
4015 } 4015 }
4016} 4016}
4017 4017
4018void CalendarView::slotCalendarChanged() 4018void CalendarView::slotCalendarChanged()
4019{ 4019{
4020 ; 4020 ;
4021} 4021}
4022 4022
4023void CalendarView::keyPressEvent ( QKeyEvent *e) 4023void CalendarView::keyPressEvent ( QKeyEvent *e)
4024{ 4024{
4025 //qDebug(" alendarView::keyPressEvent "); 4025 //qDebug(" alendarView::keyPressEvent ");
4026 e->ignore(); 4026 e->ignore();
4027} 4027}
4028 4028
4029 4029
4030bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 4030bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
4031{ 4031{
4032 // mSyncManager = manager; 4032 // mSyncManager = manager;
4033 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { 4033 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
4034 qDebug("KO: SyncKDE request detected!"); 4034 qDebug("KO: SyncKDE request detected!");
4035 } 4035 }
4036 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 4036 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
4037 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 4037 mCurrentSyncName = mSyncManager->getCurrentSyncName();
4038 return syncCalendar( filename, mode ); 4038 return syncCalendar( filename, mode );
4039} 4039}
4040bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 4040bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
4041{ 4041{
4042 //mSyncManager = manager; 4042 //mSyncManager = manager;
4043 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 4043 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
4044 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 4044 mCurrentSyncName = mSyncManager->getCurrentSyncName();
4045 if ( resource == "sharp" ) 4045 if ( resource == "sharp" )
4046 syncExternal( 0 ); 4046 syncExternal( 0 );
4047 if ( resource == "phone" ) 4047 if ( resource == "phone" )
4048 syncExternal( 1 ); 4048 syncExternal( 1 );
4049 // pending setmodified 4049 // pending setmodified
4050 return true; 4050 return true;
4051} 4051}
4052void CalendarView::setSyncManager(KSyncManager* manager) 4052void CalendarView::setSyncManager(KSyncManager* manager)
4053{ 4053{
4054 mSyncManager = manager; 4054 mSyncManager = manager;
4055} 4055}
4056 4056
4057void CalendarView::removeSyncInfo( QString syncProfile) 4057void CalendarView::removeSyncInfo( QString syncProfile)
4058{ 4058{
4059 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); 4059 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1());
4060 mCalendar->removeSyncInfo( syncProfile ); 4060 mCalendar->removeSyncInfo( syncProfile );
4061 4061
4062} 4062}
4063 4063
4064void CalendarView::undo_delete() 4064void CalendarView::undo_delete()
4065{ 4065{
4066 //qDebug("undo_delete() "); 4066 //qDebug("undo_delete() ");
4067 Incidence* undo = mCalendar->undoIncidence(); 4067 Incidence* undo = mCalendar->undoIncidence();
4068 if ( !undo ) { 4068 if ( !undo ) {
4069 KMessageBox::sorry(this,i18n("There is nothing to undo!"), 4069 KMessageBox::sorry(this,i18n("There is nothing to undo!"),
4070 i18n("KO/Pi")); 4070 i18n("KO/Pi"));
4071 return; 4071 return;
4072 } 4072 }
4073 if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) + 4073 if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) +
4074 i18n("\nAre you sure you want\nto restore this?"), 4074 i18n("\nAre you sure you want\nto restore this?"),
4075 i18n("KO/Pi Confirmation"),i18n("Restore"))) { 4075 i18n("KO/Pi Confirmation"),i18n("Restore"))) {
4076 mCalendar->undoDeleteIncidence(); 4076 mCalendar->undoDeleteIncidence();
4077 updateView(); 4077 updateView();
4078 } 4078 }
4079} 4079}
4080 4080
4081void CalendarView::slotViewerClosed() 4081void CalendarView::slotViewerClosed()
4082{ 4082{
4083 QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); 4083 QTimer::singleShot( 50, this, SLOT ( resetFocus() ) );
4084} 4084}
4085 4085
4086void CalendarView::resetFocus() 4086void CalendarView::resetFocus()
4087{ 4087{
4088 if ( mViewerCallerIsSearchDialog ) { 4088 if ( mViewerCallerIsSearchDialog ) {
4089 if ( mDialogManager->getSearchDialog()->isVisible() ){ 4089 if ( mDialogManager->getSearchDialog()->isVisible() ){
4090 mDialogManager->getSearchDialog()->raise(); 4090 mDialogManager->getSearchDialog()->raise();
4091 mDialogManager->getSearchDialog()->setActiveWindow(); 4091 mDialogManager->getSearchDialog()->setActiveWindow();
4092 mDialogManager->getSearchDialog()->listview()->resetFocus(); 4092 mDialogManager->getSearchDialog()->listview()->resetFocus();
4093 } else 4093 } else
4094 mViewerCallerIsSearchDialog = false; 4094 mViewerCallerIsSearchDialog = false;
4095 } 4095 }
4096 if ( !mViewerCallerIsSearchDialog ) { 4096 if ( !mViewerCallerIsSearchDialog ) {
4097 //mViewManager->currentView()->setFocus(); 4097 //mViewManager->currentView()->setFocus();
4098 //qDebug("sssssssssssssssset focus "); 4098 //qDebug("sssssssssssssssset focus ");
4099 topLevelWidget()->raise(); 4099 topLevelWidget()->raise();
4100 setActiveWindow(); 4100 setActiveWindow();
4101 //setFocus(); 4101 //setFocus();
4102 } 4102 }
4103 mViewerCallerIsSearchDialog = false; 4103 mViewerCallerIsSearchDialog = false;
4104} 4104}
4105 4105
4106void CalendarView::showNextAlarms() 4106void CalendarView::showNextAlarms()
4107{ 4107{
4108 QString message; 4108 QString message;
4109 QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); 4109 QDateTime nextAl = mCalendar->nextAlarmEventDateTime();
4110 if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { 4110 if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) {
4111 QString sum = mCalendar->nextSummary(); 4111 QString sum = mCalendar->nextSummary();
4112 QDateTime nextA = mNextAlarmDateTime; 4112 QDateTime nextA = mNextAlarmDateTime;
4113 QDateTime cur = QDateTime::currentDateTime(); 4113 QDateTime cur = QDateTime::currentDateTime();
4114 int secs = cur.secsTo( nextA ); 4114 int secs = cur.secsTo( nextA );
4115 int min = secs /60; 4115 int min = secs /60;
4116 int hours = min /60; 4116 int hours = min /60;
4117 min = min % 60; 4117 min = min % 60;
4118 int days = hours /24; 4118 int days = hours /24;
4119 hours = hours % 24; 4119 hours = hours % 24;
4120 4120
4121 //message = i18n("The next alarm is in:\n"); 4121 //message = i18n("The next alarm is in:\n");
4122 if ( days > 1 ) 4122 if ( days > 1 )
4123 message += i18n("%1 days\n").arg( days ); 4123 message += i18n("%1 days\n").arg( days );
4124 else if ( days == 1 ) 4124 else if ( days == 1 )
4125 message += i18n("1 day\n"); 4125 message += i18n("1 day\n");
4126 if ( hours > 1 ) 4126 if ( hours > 1 )
4127 message += i18n("%1 hours\n").arg( hours ); 4127 message += i18n("%1 hours\n").arg( hours );
4128 else if ( hours == 1 ) 4128 else if ( hours == 1 )
4129 message += i18n("1 hour\n"); 4129 message += i18n("1 hour\n");
4130 if ( min > 1 ) 4130 if ( min > 1 )
4131 message += i18n("%1 minutes\n").arg( min ); 4131 message += i18n("%1 minutes\n").arg( min );
4132 else if ( min == 1 ) 4132 else if ( min == 1 )
4133 message += i18n("1 minute\n"); 4133 message += i18n("1 minute\n");
4134 if ( message.isEmpty() ) 4134 if ( message.isEmpty() )
4135 message = i18n("The next alarm is in\nless than one minute!"); 4135 message = i18n("The next alarm is in\nless than one minute!");
4136 else 4136 else
4137 message = i18n("The next alarm is in:\n") + message; 4137 message = i18n("The next alarm is in:\n") + message;
4138 message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; 4138 message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ;
4139 } else { 4139 } else {
4140 message = i18n("There is no next alarm."); 4140 message = i18n("There is no next alarm.");
4141 4141
4142 } 4142 }
4143#ifdef DESKTOP_VERSION 4143#ifdef DESKTOP_VERSION
4144 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 4144 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
4145 message += i18n("\nThe internal alarm notification is disabled!\n"); 4145 message += i18n("\nThe internal alarm notification is disabled!\n");
4146 message += i18n("Enable it in the settings menu, TAB alarm."); 4146 message += i18n("Enable it in the settings menu, TAB alarm.");
4147 } 4147 }
4148 4148
4149#endif 4149#endif
4150 KMessageBox::information( this, message); 4150 KMessageBox::information( this, message);
4151} 4151}