Fixed KAlarm building warnings. Minor style patch up. Fixed possible error in treating deferred evens (see kalarm/alarmevent.cpp:1739).

(cherry picked from commit c036d97d35)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
r14.0.x
Michele Calgaro 9 years ago
parent 3ba5901c39
commit c822d344ca

@ -373,7 +373,7 @@ bool AlarmCalendar::reload()
*/ */
bool AlarmCalendar::saveCal(const TQString& newFile) bool AlarmCalendar::saveCal(const TQString& newFile)
{ {
if (!mCalendar || !mOpen && newFile.isNull()) if (!mCalendar || (!mOpen && newFile.isNull()))
return false; return false;
kdDebug(5950) << "AlarmCalendar::saveCal(\"" << newFile << "\", " << mType << ")\n"; kdDebug(5950) << "AlarmCalendar::saveCal(\"" << newFile << "\", " << mType << ")\n";
@ -638,7 +638,7 @@ void AlarmCalendar::setPurgeDays(int days)
mPurgeDays = days; mPurgeDays = days;
if (mPurgeDays <= 0) if (mPurgeDays <= 0)
StartOfDayTimer::disconnect(this); StartOfDayTimer::disconnect(this);
if (oldDays < 0 || days >= 0 && days < oldDays) if (oldDays < 0 || (days >= 0 && days < oldDays))
{ {
// Alarms are now being kept for less long, so purge them // Alarms are now being kept for less long, so purge them
if (open()) if (open())

@ -977,8 +977,8 @@ Event* KAEvent::event() const
*/ */
bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool cancelCancelledDefer) const bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool cancelCancelledDefer) const
{ {
if (checkUid && !mEventID.isEmpty() && mEventID != ev.uid() if ((checkUid && !mEventID.isEmpty() && mEventID != ev.uid())
|| !mAlarmCount && (!original || !mMainExpired)) || (!mAlarmCount && (!original || !mMainExpired)))
return false; return false;
checkRecur(); // ensure recurrence/repetition data is consistent checkRecur(); // ensure recurrence/repetition data is consistent
@ -1089,7 +1089,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
} }
// Add subsidiary alarms // Add subsidiary alarms
if (mRepeatAtLogin || mArchiveRepeatAtLogin && original) if (mRepeatAtLogin || (mArchiveRepeatAtLogin && original))
{ {
DateTime dtl; DateTime dtl;
if (mArchiveRepeatAtLogin) if (mArchiveRepeatAtLogin)
@ -1107,7 +1107,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ancillaryType = 1; ancillaryType = 1;
} }
} }
if (mReminderMinutes || mArchiveReminderMinutes && original) if (mReminderMinutes || (mArchiveReminderMinutes && original))
{ {
int minutes = mReminderMinutes ? mReminderMinutes : mArchiveReminderMinutes; int minutes = mReminderMinutes ? mReminderMinutes : mArchiveReminderMinutes;
initKCalAlarm(ev, -minutes * 60, TQStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE)); initKCalAlarm(ev, -minutes * 60, TQStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
@ -1117,7 +1117,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ancillaryType = 2; ancillaryType = 2;
} }
} }
if (mDeferral > 0 || mDeferral == CANCEL_DEFERRAL && !cancelCancelledDefer) if (mDeferral > 0 || (mDeferral == CANCEL_DEFERRAL && !cancelCancelledDefer))
{ {
DateTime nextDateTime = mNextMainDateTime; DateTime nextDateTime = mNextMainDateTime;
if (mMainExpired) if (mMainExpired)
@ -1736,7 +1736,7 @@ bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const
setUid(DISPLAYING); setUid(DISPLAYING);
mDisplaying = true; mDisplaying = true;
mDisplayingTime = (alarmType == KAAlarm::AT_LOGIN_ALARM) ? repeatAtLoginTime : al.dateTime(); mDisplayingTime = (alarmType == KAAlarm::AT_LOGIN_ALARM) ? repeatAtLoginTime : al.dateTime();
switch (al.type()) switch (al.subType())
{ {
case KAAlarm::AT_LOGIN__ALARM: mDisplayingFlags = REPEAT_AT_LOGIN; break; case KAAlarm::AT_LOGIN__ALARM: mDisplayingFlags = REPEAT_AT_LOGIN; break;
case KAAlarm::REMINDER__ALARM: mDisplayingFlags = REMINDER; break; case KAAlarm::REMINDER__ALARM: mDisplayingFlags = REMINDER; break;

@ -408,7 +408,7 @@ class KAEvent : public KAAlarmEventBase
bool enabled() const { return mEnabled; } bool enabled() const { return mEnabled; }
bool updated() const { return mUpdated; } bool updated() const { return mUpdated; }
bool mainExpired() const { return mMainExpired; } bool mainExpired() const { return mMainExpired; }
bool expired() const { return mDisplaying && mMainExpired || uidStatus(mEventID) == EXPIRED; } bool expired() const { return (mDisplaying && mMainExpired) || uidStatus(mEventID) == EXPIRED; }
Status uidStatus() const { return uidStatus(mEventID); } Status uidStatus() const { return uidStatus(mEventID); }
static Status uidStatus(const TQString& uid); static Status uidStatus(const TQString& uid);
static TQString uid(const TQString& id, Status); static TQString uid(const TQString& id, Status);

@ -466,7 +466,7 @@ void AlarmTimeWidget::slotTimer()
{ {
// The current date has reached or has passed the maximum date // The current date has reached or has passed the maximum date
if (now.date() > mMaxDateTime.date() if (now.date() > mMaxDateTime.date()
|| !mAnyTime && now.time() > mTimeEdit->maxTime()) || (!mAnyTime && now.time() > mTimeEdit->maxTime()))
{ {
mPastMax = true; mPastMax = true;
emit pastMax(); emit pastMax();

@ -1052,8 +1052,8 @@ bool EditAlarmDlg::stateChanged() const
{ {
if (mSavedTemplateName != mTemplateName->text() if (mSavedTemplateName != mTemplateName->text()
|| mSavedTemplateTimeType != mTemplateTimeGroup->selected() || mSavedTemplateTimeType != mTemplateTimeGroup->selected()
|| mTemplateUseTime->isOn() && mSavedTemplateTime != mTemplateTime->time() || (mTemplateUseTime->isOn() && mSavedTemplateTime != mTemplateTime->time())
|| mTemplateUseTimeAfter->isOn() && mSavedTemplateAfterTime != mTemplateTimeAfter->value()) || (mTemplateUseTimeAfter->isOn() && mSavedTemplateAfterTime != mTemplateTimeAfter->value()))
return true; return true;
} }
else else
@ -1061,7 +1061,7 @@ bool EditAlarmDlg::stateChanged() const
return true; return true;
if (mSavedTypeRadio != mActionGroup->selected() if (mSavedTypeRadio != mActionGroup->selected()
|| mSavedLateCancel != mLateCancel->minutes() || mSavedLateCancel != mLateCancel->minutes()
|| mShowInKorganizer && mSavedShowInKorganizer != mShowInKorganizer->isChecked() || (mShowInKorganizer && mSavedShowInKorganizer != mShowInKorganizer->isChecked())
|| textFileCommandMessage != mSavedTextFileCommandMessage || textFileCommandMessage != mSavedTextFileCommandMessage
|| mSavedRecurrenceType != mRecurrenceEdit->repeatType()) || mSavedRecurrenceType != mRecurrenceEdit->repeatType())
return true; return true;
@ -1114,7 +1114,7 @@ bool EditAlarmDlg::stateChanged() const
TQStringList emailAttach; TQStringList emailAttach;
for (int i = 0; i < mEmailAttachList->count(); ++i) for (int i = 0; i < mEmailAttachList->count(); ++i)
emailAttach += mEmailAttachList->text(i); emailAttach += mEmailAttachList->text(i);
if (mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName() if ((mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName())
|| mSavedEmailTo != mEmailToEdit->text() || mSavedEmailTo != mEmailToEdit->text()
|| mSavedEmailSubject != mEmailSubjectEdit->text() || mSavedEmailSubject != mEmailSubjectEdit->text()
|| mSavedEmailAttach != emailAttach || mSavedEmailAttach != emailAttach
@ -1214,8 +1214,8 @@ void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial)
mRecurrenceEdit->updateEvent(event, !mTemplate); mRecurrenceEdit->updateEvent(event, !mTemplate);
TQDateTime now = TQDateTime::currentDateTime(); TQDateTime now = TQDateTime::currentDateTime();
bool dateOnly = mAlarmDateTime.isDateOnly(); bool dateOnly = mAlarmDateTime.isDateOnly();
if (dateOnly && mAlarmDateTime.date() < now.date() if ((dateOnly && mAlarmDateTime.date() < now.date())
|| !dateOnly && mAlarmDateTime.rawDateTime() < now) || (!dateOnly && mAlarmDateTime.rawDateTime() < now))
{ {
// A timed recurrence has an entered start date which has // A timed recurrence has an entered start date which has
// already expired, so we must adjust the next repetition. // already expired, so we must adjust the next repetition.
@ -1383,16 +1383,16 @@ void EditAlarmDlg::slotOk()
{ {
TQDateTime now = TQDateTime::currentDateTime(); TQDateTime now = TQDateTime::currentDateTime();
if (mAlarmDateTime.date() < now.date() if (mAlarmDateTime.date() < now.date()
|| mAlarmDateTime.date() == now.date() || (mAlarmDateTime.date() == now.date()
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()) && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()))
{ {
// A timed recurrence has an entered start date which // A timed recurrence has an entered start date which
// has already expired, so we must adjust it. // has already expired, so we must adjust it.
KAEvent event; KAEvent event;
getEvent(event); // this may adjust mAlarmDateTime getEvent(event); // this may adjust mAlarmDateTime
if (( mAlarmDateTime.date() < now.date() if (( mAlarmDateTime.date() < now.date()
|| mAlarmDateTime.date() == now.date() || (mAlarmDateTime.date() == now.date()
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()) && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()))
&& event.nextOccurrence(now, mAlarmDateTime, KAEvent::ALLOW_FOR_REPETITION) == KAEvent::NO_OCCURRENCE) && event.nextOccurrence(now, mAlarmDateTime, KAEvent::ALLOW_FOR_REPETITION) == KAEvent::NO_OCCURRENCE)
{ {
KMessageBox::sorry(this, i18n("Recurrence has already expired")); KMessageBox::sorry(this, i18n("Recurrence has already expired"));
@ -1443,7 +1443,7 @@ void EditAlarmDlg::slotOk()
return; return;
} }
if (recurEvent.repeatInterval() % 1440 if (recurEvent.repeatInterval() % 1440
&& (mTemplate && mTemplateAnyTime->isOn() || !mTemplate && mAlarmDateTime.isDateOnly())) && ((mTemplate && mTemplateAnyTime->isOn()) || (!mTemplate && mAlarmDateTime.isDateOnly())))
{ {
KMessageBox::sorry(this, i18n("For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm")); KMessageBox::sorry(this, i18n("For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm"));
mRecurrenceEdit->activateSubRepetition(); // display the alarm repetition dialog again mRecurrenceEdit->activateSubRepetition(); // display the alarm repetition dialog again

@ -459,7 +459,7 @@ TQString EventListWhatsThisBase::text(const TQPoint& pt)
TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt); TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt);
TQRect frame = mListView->header()->frameGeometry(); TQRect frame = mListView->header()->frameGeometry();
if (frame.contains(pt) if (frame.contains(pt)
|| mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y()))) || (mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y()))))
column = mListView->header()->sectionAt(pt.x()); column = mListView->header()->sectionAt(pt.x());
return mListView->whatsThisText(column); return mListView->whatsThisText(column);
} }

@ -298,8 +298,8 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
last = true; // we've wrapped round and reached the starting alarm again last = true; // we've wrapped round and reached the starting alarm again
fromCurrent = false; fromCurrent = false;
bool live = !event.expired(); bool live = !event.expired();
if (live && !(mOptions & FIND_LIVE) if ((live && !(mOptions & FIND_LIVE))
|| !live && !(mOptions & FIND_EXPIRED)) || (!live && !(mOptions & FIND_EXPIRED)))
continue; // we're not searching this type of alarm continue; // we're not searching this type of alarm
switch (event.action()) switch (event.action())
{ {

@ -64,7 +64,7 @@ bool resetDaemonQueued = false;
TQCString korganizerName = "korganizer"; TQCString korganizerName = "korganizer";
TQString korgStartError; TQString korgStartError;
#define KORG_DCOP_OBJECT "KOrganizerIface" #define KORG_DCOP_OBJECT "KOrganizerIface"
const char* KORG_DCOP_WINDOW = "KOrganizer MainWindow"; //const char* KORG_DCOP_WINDOW = "KOrganizer MainWindow"; // not used
const char* KMAIL_DCOP_WINDOW = "kmail-mainwindow#1"; const char* KMAIL_DCOP_WINDOW = "kmail-mainwindow#1";
bool sendToKOrganizer(const KAEvent&); bool sendToKOrganizer(const KAEvent&);

@ -229,7 +229,7 @@ bool KAlarmApp::restoreSession()
// Try to display the system tray icon if it is configured to be autostarted, // Try to display the system tray icon if it is configured to be autostarted,
// or if we're in run-in-system-tray mode. // or if we're in run-in-system-tray mode.
if (Preferences::autostartTrayIcon() if (Preferences::autostartTrayIcon()
|| MainWindow::count() && wantRunInSystemTray()) || (MainWindow::count() && wantRunInSystemTray()))
{ {
displayTrayIcon(true, trayParent); displayTrayIcon(true, trayParent);
// Occasionally for no obvious reason, the main main window is // Occasionally for no obvious reason, the main main window is
@ -786,7 +786,7 @@ void KAlarmApp::quitIf(int exitCode, bool force)
return; return;
int mwcount = MainWindow::count(); int mwcount = MainWindow::count();
MainWindow* mw = mwcount ? MainWindow::firstWindow() : 0; MainWindow* mw = mwcount ? MainWindow::firstWindow() : 0;
if (mwcount > 1 || mwcount && (!mw->isHidden() || !mw->isTrayParent())) if (mwcount > 1 || (mwcount && (!mw->isHidden() || !mw->isTrayParent())))
return; return;
// There are no windows left except perhaps a main window which is a hidden tray icon parent // There are no windows left except perhaps a main window which is a hidden tray icon parent
if (mTrayWindow) if (mTrayWindow)
@ -1328,7 +1328,7 @@ bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
if (now >= limit) if (now >= limit)
{ {
if (type == KAEvent::LAST_RECURRENCE if (type == KAEvent::LAST_RECURRENCE
|| type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs()) || (type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs()))
cancel = true; // last occurrence (and there are no repetitions) cancel = true; // last occurrence (and there are no repetitions)
else else
late = true; late = true;
@ -1360,7 +1360,7 @@ bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
if (next.dateTime().secsTo(now) > maxlate) if (next.dateTime().secsTo(now) > maxlate)
{ {
if (type == KAEvent::LAST_RECURRENCE if (type == KAEvent::LAST_RECURRENCE
|| type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs()) || (type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs()))
cancel = true; // last occurrence (and there are no repetitions) cancel = true; // last occurrence (and there are no repetitions)
else else
late = true; late = true;
@ -1621,7 +1621,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
if (!event.enabled()) if (!event.enabled())
delete win; // event is disabled - close its window delete win; // event is disabled - close its window
else if (!win else if (!win
|| !win->hasDefer() && !alarm.repeatAtLogin() || (!win->hasDefer() && !alarm.repeatAtLogin())
|| replaceReminder) || replaceReminder)
{ {
// Either there isn't already a message for this event, // Either there isn't already a message for this event,

@ -153,8 +153,8 @@ bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList<TQDate
if (alarmtimes[i].isValid() if (alarmtimes[i].isValid()
&& (i >= oldCount // is it an additional alarm? && (i >= oldCount // is it an additional alarm?
|| !it.data().alarmTimes[i].isValid() // or has it just become due? || !it.data().alarmTimes[i].isValid() // or has it just become due?
|| it.data().alarmTimes[i].isValid() // or has it changed? || (it.data().alarmTimes[i].isValid() // or has it changed?
&& alarmtimes[i] != it.data().alarmTimes[i])) && alarmtimes[i] != it.data().alarmTimes[i])))
return false; // this alarm has changed return false; // this alarm has changed
} }
return true; return true;

@ -449,7 +449,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
} }
} }
if (!dt.isValid() || dt > now if (!dt.isValid() || dt > now
|| dt1.isValid() && dt1 > dt) // already tested dt1 <= now || (dt1.isValid() && dt1 > dt)) // already tested dt1 <= now
dt = dt1; dt = dt1;
} }
alarmtimes.append(dt); alarmtimes.append(dt);

@ -110,8 +110,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
if (count < -1) if (count < -1)
return false; return false;
bool dateOnly = start.isDateOnly(); bool dateOnly = start.isDateOnly();
if (!count && (!dateOnly && !end.isValid() if (!count && ((!dateOnly && !end.isValid())
|| dateOnly && !end.date().isValid())) || (dateOnly && !end.date().isValid())))
return false; return false;
switch (recurType) switch (recurType)
{ {
@ -134,8 +134,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
else else
setEndDateTime(end); setEndDateTime(end);
TQDateTime startdt = start.dateTime(); TQDateTime startdt = start.dateTime();
if (recurType == RecurrenceRule::rYearly if ((recurType == RecurrenceRule::rYearly
&& feb29Type == FEB29_FEB28 || feb29Type == FEB29_MAR1) && feb29Type == FEB29_FEB28) || feb29Type == FEB29_MAR1)
{ {
int year = startdt.date().year(); int year = startdt.date().year();
if (!TQDate::leapYear(year) if (!TQDate::leapYear(year)
@ -257,7 +257,7 @@ void KARecurrence::fix()
{ {
// This is the second rule. // This is the second rule.
// Ensure that it can be combined with the first one. // Ensure that it can be combined with the first one.
if (day == days[0] || day == -1 && days[0] == 60 if (day == days[0] || (day == -1 && days[0] == 60)
|| rrule->frequency() != rrules[0]->frequency() || rrule->frequency() != rrules[0]->frequency()
|| rrule->startDt() != rrules[0]->startDt()) || rrule->startDt() != rrules[0]->startDt())
break; break;

@ -73,7 +73,7 @@ class DateTime
/** Returns true if the date is null and, if it is a date-time value, the time is also null. */ /** Returns true if the date is null and, if it is a date-time value, the time is also null. */
bool isNull() const { return mDateTime.date().isNull() && (mDateOnly || mDateTime.time().isNull()); } bool isNull() const { return mDateTime.date().isNull() && (mDateOnly || mDateTime.time().isNull()); }
/** Returns true if the date is valid and, if it is a date-time value, the time is also valid. */ /** Returns true if the date is valid and, if it is a date-time value, the time is also valid. */
bool isValid() const { return mDateTime.date().isValid() && (mDateOnly || mTimeValid && mDateTime.time().isValid()); } bool isValid() const { return mDateTime.date().isValid() && (mDateOnly || (mTimeValid && mDateTime.time().isValid())); }
/** Returns true if it is date-only value. */ /** Returns true if it is date-only value. */
bool isDateOnly() const { return mDateOnly; } bool isDateOnly() const { return mDateOnly; }
/** Sets the value to be either date-only or date-time. /** Sets the value to be either date-only or date-time.

@ -99,8 +99,8 @@ void LineEdit::dragEnterEvent(TQDragEnterEvent* e)
e->accept(false); // don't accept "text/calendar" objects e->accept(false); // don't accept "text/calendar" objects
e->accept(TQTextDrag::canDecode(e) e->accept(TQTextDrag::canDecode(e)
|| KURLDrag::canDecode(e) || KURLDrag::canDecode(e)
|| mType != Url && KPIM::MailListDrag::canDecode(e) || (mType != Url && KPIM::MailListDrag::canDecode(e))
|| mType == Emails && KVCardDrag::canDecode(e)); || (mType == Emails && KVCardDrag::canDecode(e)));
} }
void LineEdit::dropEvent(TQDropEvent* e) void LineEdit::dropEvent(TQDropEvent* e)

@ -86,8 +86,8 @@ void ShellProcess::slotExited(TDEProcess* proc)
{ {
// Some shells report if the command couldn't be found, or is not executable // Some shells report if the command couldn't be found, or is not executable
int status = proc->exitStatus(); int status = proc->exitStatus();
if (mShellName == "bash" && (status == 126 || status == 127) if ((mShellName == "bash" && (status == 126 || status == 127))
|| mShellName == "ksh" && status == 127) || (mShellName == "ksh" && status == 127))
{ {
kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": not found or not executable\n"; kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": not found or not executable\n";
mStatus = NOT_FOUND; mStatus = NOT_FOUND;

@ -77,8 +77,7 @@ bool TimeEdit::isValid() const
void TimeEdit::setValid(bool valid) void TimeEdit::setValid(bool valid)
{ {
bool oldValid = mSpinBox->isValid(); bool oldValid = mSpinBox->isValid();
if (valid && !oldValid if ((valid && !oldValid) || (!valid && oldValid))
|| !valid && oldValid)
{ {
mSpinBox->setValid(valid); mSpinBox->setValid(valid);
if (mAmPm) if (mAmPm)

@ -207,7 +207,7 @@ void TimePeriod::setMinutes(int mins, bool dateOnly, TimePeriod::Units defaultUn
else if (item > mMaxUnitShown) else if (item > mMaxUnitShown)
item = mMaxUnitShown; item = mMaxUnitShown;
mUnitsCombo->setCurrentItem(item - mDateOnlyOffset); mUnitsCombo->setCurrentItem(item - mDateOnlyOffset);
if (dateOnly && !mDateOnlyOffset || !dateOnly && mDateOnlyOffset) if ((dateOnly && !mDateOnlyOffset) || (!dateOnly && mDateOnlyOffset))
item = setDateOnly(mins, dateOnly, false); item = setDateOnly(mins, dateOnly, false);
} }
showHourMin(item == HOURS_MINUTES && !mNoHourMinute); showHourMin(item == HOURS_MINUTES && !mNoHourMinute);

@ -453,8 +453,8 @@ void RecurrenceEdit::periodClicked(int id)
void RecurrenceEdit::slotAnyTimeToggled(bool on) void RecurrenceEdit::slotAnyTimeToggled(bool on)
{ {
TQButton* button = mRuleButtonGroup->selected(); TQButton* button = mRuleButtonGroup->selected();
mEndTimeEdit->setEnabled(button == mAtLoginButton && !on mEndTimeEdit->setEnabled((button == mAtLoginButton && !on)
|| button == mSubDailyButton && mEndDateButton->isChecked()); || (button == mSubDailyButton && mEndDateButton->isChecked()));
} }
/****************************************************************************** /******************************************************************************
@ -465,7 +465,7 @@ void RecurrenceEdit::rangeTypeClicked()
bool endDate = mEndDateButton->isOn(); bool endDate = mEndDateButton->isOn();
mEndDateEdit->setEnabled(endDate); mEndDateEdit->setEnabled(endDate);
mEndTimeEdit->setEnabled(endDate mEndTimeEdit->setEnabled(endDate
&& (mAtLoginButton->isOn() && !mEndAnyTimeCheckBox->isChecked() && ((mAtLoginButton->isOn() && !mEndAnyTimeCheckBox->isChecked())
|| mSubDailyButton->isOn())); || mSubDailyButton->isOn()));
bool repeatCount = mRepeatCountButton->isOn(); bool repeatCount = mRepeatCountButton->isOn();
mRepeatCountEntry->setEnabled(repeatCount); mRepeatCountEntry->setEnabled(repeatCount);
@ -997,7 +997,7 @@ bool RecurrenceEdit::stateChanged() const
{ {
if (mSavedRuleButton != mRuleButtonGroup->selected() if (mSavedRuleButton != mRuleButtonGroup->selected()
|| mSavedRangeButton != mRangeButtonGroup->selected() || mSavedRangeButton != mRangeButtonGroup->selected()
|| mRule && mRule->stateChanged()) || (mRule && mRule->stateChanged()))
return true; return true;
if (mSavedRangeButton == mRepeatCountButton if (mSavedRangeButton == mRepeatCountButton
&& mSavedRecurCount != mRepeatCountEntry->value()) && mSavedRecurCount != mRepeatCountEntry->value())

@ -95,7 +95,7 @@ TrayWindow::TrayWindow(MainWindow* parent, const char* name)
// Replace the default handler for the Quit context menu item // Replace the default handler for the Quit context menu item
const char* quitName = KStdAction::name(KStdAction::Quit); const char* quitName = KStdAction::name(KStdAction::Quit);
actcol->remove(actcol->action(quitName)); actcol->remove(actcol->action(quitName));
actcol->accel()->remove(quitName); actcol->tdeaccel()->remove(quitName);
KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actcol); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actcol);
// Set icon to correspond with the alarms enabled menu status // Set icon to correspond with the alarms enabled menu status

Loading…
Cancel
Save