~ubuntu-branches/ubuntu/quantal/kdepim/quantal

« back to all changes in this revision

Viewing changes to kalarm/editdlg.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Kolberg
  • Date: 2011-09-03 13:01:43 UTC
  • mfrom: (0.2.14)
  • Revision ID: package-import@ubuntu.com-20110903130143-5mmx3goibh8sgt9t
Tags: 4:4.7.1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "latecancel.h"
40
40
#include "lineedit.h"
41
41
#include "mainwindow.h"
 
42
#include "messagebox.h"
42
43
#include "packedlayout.h"
43
44
#include "preferences.h"
44
45
#include "radiobutton.h"
58
59
#include <kconfig.h>
59
60
#include <kfiledialog.h>
60
61
#include <kpushbutton.h>
61
 
#include <kmessagebox.h>
62
62
#include <khbox.h>
63
63
#include <kvbox.h>
64
64
#include <kwindowsystem.h>
958
958
        if (!errmsg.isEmpty())
959
959
        {
960
960
            mTemplateName->setFocus();
961
 
            KMessageBox::sorry(this, errmsg);
 
961
            KAMessageBox::sorry(this, errmsg);
962
962
            return false;
963
963
        }
964
964
    }
1006
1006
                                                  "The start date/time does not match the alarm's recurrence pattern, "
1007
1007
                                                  "so it will be adjusted to the date/time of the next recurrence (%1).",
1008
1008
                                                  KGlobal::locale()->formatDateTime(next.kDateTime(), KLocale::ShortDate));
1009
 
                if (KMessageBox::warningContinueCancel(this, prompt) != KMessageBox::Continue)
 
1009
                if (KAMessageBox::warningContinueCancel(this, prompt) != KMessageBox::Continue)
1010
1010
                    return false;
1011
1011
            }
1012
1012
        }
1030
1030
                // has already expired, so we must adjust it.
1031
1031
                if (event.nextOccurrence(now, mAlarmDateTime, KAEvent::ALLOW_FOR_REPETITION) == KAEvent::NO_OCCURRENCE)
1032
1032
                {
1033
 
                    KMessageBox::sorry(this, i18nc("@info", "Recurrence has already expired"));
 
1033
                    KAMessageBox::sorry(this, i18nc("@info", "Recurrence has already expired"));
1034
1034
                    return false;
1035
1035
                }
1036
1036
                if (event.workTimeOnly()  &&  !event.nextTrigger(KAEvent::DISPLAY_TRIGGER).isValid())
1037
1037
                {
1038
 
                    if (KMessageBox::warningContinueCancel(this, i18nc("@info", "The alarm will never occur during working hours"))
 
1038
                    if (KAMessageBox::warningContinueCancel(this, i18nc("@info", "The alarm will never occur during working hours"))
1039
1039
                        != KMessageBox::Continue)
1040
1040
                        return false;
1041
1041
                }
1047
1047
        {
1048
1048
            mTabs->setCurrentIndex(mRecurPageIndex);
1049
1049
            errWidget->setFocus();
1050
 
            KMessageBox::sorry(this, errmsg);
 
1050
            KAMessageBox::sorry(this, errmsg);
1051
1051
            return false;
1052
1052
        }
1053
1053
    }
1064
1064
            {
1065
1065
                mTabs->setCurrentIndex(mMainPageIndex);
1066
1066
                mReminder->setFocusOnCount();
1067
 
                KMessageBox::sorry(this, i18nc("@info", "Reminder period must be less than the recurrence interval, unless <interface>%1</interface> is checked."
1068
 
                                 , Reminder::i18n_chk_FirstRecurrenceOnly()));
 
1067
                KAMessageBox::sorry(this, i18nc("@info", "Reminder period must be less than the recurrence interval, unless <interface>%1</interface> is checked.",
 
1068
                                                Reminder::i18n_chk_FirstRecurrenceOnly()));
1069
1069
                return false;
1070
1070
            }
1071
1071
        }
1079
1079
            if (longestRecurMinutes > 0
1080
1080
            &&  recurEvent.repetition().intervalMinutes() * recurEvent.repetition().count() >= longestRecurMinutes - reminder)
1081
1081
            {
1082
 
                KMessageBox::sorry(this, i18nc("@info", "The duration of a repetition within the recurrence must be less than the recurrence interval minus any reminder period"));
 
1082
                KAMessageBox::sorry(this, i18nc("@info", "The duration of a repetition within the recurrence must be less than the recurrence interval minus any reminder period"));
1083
1083
                mRecurrenceEdit->activateSubRepetition();   // display the alarm repetition dialog again
1084
1084
                return false;
1085
1085
            }
1086
1086
            if (!recurEvent.repetition().isDaily()
1087
1087
            &&  ((mTemplate && mTemplateAnyTime->isChecked())  ||  (!mTemplate && mAlarmDateTime.isDateOnly())))
1088
1088
            {
1089
 
                KMessageBox::sorry(this, i18nc("@info", "For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm"));
 
1089
                KAMessageBox::sorry(this, i18nc("@info", "For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm"));
1090
1090
                mRecurrenceEdit->activateSubRepetition();   // display the alarm repetition dialog again
1091
1091
                return false;
1092
1092
            }
1118
1118
        if (!mCollection.isValid())
1119
1119
        {
1120
1120
            if (!cancelled)
1121
 
                KMessageBox::sorry(this, i18nc("@info", "You must select a calendar to save the alarm in"));
 
1121
                KAMessageBox::sorry(this, i18nc("@info", "You must select a calendar to save the alarm in"));
1122
1122
            return false;
1123
1123
        }
1124
1124
    }
1147
1147
        if (!mResource)
1148
1148
        {
1149
1149
            if (!cancelled)
1150
 
                KMessageBox::sorry(this, i18nc("@info", "You must select a calendar to save the alarm in"));
 
1150
                KAMessageBox::sorry(this, i18nc("@info", "You must select a calendar to save the alarm in"));
1151
1151
            return false;
1152
1152
        }
1153
1153
    }