-rw-r--r-- | korganizer/calendarview.cpp | 19 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 4 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 69 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 11 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 |
5 files changed, 62 insertions, 42 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index beb19d9..76cce26 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -532,2 +532,7 @@ void CalendarView::startAlarm( QString mess , QString filename) { + + topLevelWidget()->showNormal(); + topLevelWidget()->setActiveWindow(); + topLevelWidget()->raise(); + mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); @@ -4096,3 +4101,3 @@ void CalendarView::showNextAlarms() - message = i18n("The next alarm is in:\n"); + //message = i18n("The next alarm is in:\n"); if ( days > 1 ) @@ -4109,3 +4114,6 @@ void CalendarView::showNextAlarms() message += i18n("1 minute\n"); - + if ( message.isEmpty() ) + message = i18n("The next alarm is in\nless than one minute!"); + else + message = i18n("The next alarm is in:\n") + message; message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; @@ -4115,2 +4123,9 @@ void CalendarView::showNextAlarms() } +#ifdef DESKTOP_VERSION + if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { + message += i18n("\nThe internal alarm notification is disabled!\n"); + message += i18n("Enable it in the settings menu, TAB alarm."); + } + +#endif KMessageBox::information( this, message); diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index d450a97..6d1e6d5 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -155,3 +155,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) while (y < cy + ch+mCellHeight) { - p->drawLine(startW-tw2 ,y,cw+2,y); + p->drawLine(startW-tw2+1 ,y,cw+2,y); hour.setNum(cell); @@ -217,3 +217,3 @@ void TimeLabels::updateConfig() mCellHeight = KOPrefs::instance()->mHourSize*4; - resizeContents(50,mRows * mCellHeight); + resizeContents(mMiniWidth,mRows * mCellHeight+1); } diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index b14ca43..abc80d4 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -229,23 +229,22 @@ void KOEditorGeneral::pickAlarmSound() qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); - //QString prefix = mAlarmSound; - if (!mAlarmSoundButton->isOn()) { + + bool oldState = mAlarmSoundButton->isOn(); + + QString fileName(KFileDialog::getOpenFileName(mAlarmSound, + i18n("*.wav|Wav Files"), 0)); + if (!fileName.isEmpty()) { + mAlarmSound = fileName; + QToolTip::remove(mAlarmSoundButton); + QString dispStr = i18n("Playing '%1'").arg(fileName); + QToolTip::add(mAlarmSoundButton, dispStr); + mAlarmProgramButton->setOn(false); mAlarmSoundButton->setOn(true); - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); + QToolTip::add(mAlarmProgramButton, i18n("No program set")); } else { - QString fileName(KFileDialog::getOpenFileName(mAlarmSound, - i18n("*.wav|Wav Files"), 0)); - if (!fileName.isEmpty()) { - mAlarmSound = fileName; - QToolTip::remove(mAlarmSoundButton); - QString dispStr = i18n("Playing '%1'").arg(fileName); - QToolTip::add(mAlarmSoundButton, dispStr); - mAlarmProgramButton->setOn(false); - mAlarmSoundButton->setOn(true); - } else { - mAlarmProgramButton->setOn(true); - mAlarmSoundButton->setOn(false); - - } + mAlarmProgramButton->setOn(oldState); + mAlarmSoundButton->setOn(!oldState); + + } -#if 0 + if (mAlarmProgramButton->isOn()) @@ -254,3 +253,3 @@ void KOEditorGeneral::pickAlarmSound() ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); -#endif + } @@ -259,20 +258,18 @@ void KOEditorGeneral::pickAlarmProgram() { - if (!mAlarmProgramButton->isOn()) { + bool oldState = mAlarmProgramButton->isOn(); + + QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); + if (!fileName.isEmpty()) { + mAlarmProgram = fileName; + QToolTip::remove(mAlarmProgramButton); + QString dispStr = i18n("Running '%1'").arg(fileName); + QToolTip::add(mAlarmProgramButton, dispStr); + mAlarmSoundButton->setOn(false); mAlarmProgramButton->setOn(true); - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); - } else { - QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); - if (!fileName.isEmpty()) { - mAlarmProgram = fileName; - QToolTip::remove(mAlarmProgramButton); - QString dispStr = i18n("Running '%1'").arg(fileName); - QToolTip::add(mAlarmProgramButton, dispStr); - mAlarmSoundButton->setOn(false); - mAlarmProgramButton->setOn(true); - } else { - mAlarmProgramButton->setOn(false); - mAlarmSoundButton->setOn(true); - } + QToolTip::add(mAlarmSoundButton, i18n("No sound set")); + } else { + mAlarmProgramButton->setOn(!oldState); + mAlarmSoundButton->setOn(oldState); } -#if 0 + if (mAlarmProgramButton->isOn()) @@ -281,3 +278,3 @@ void KOEditorGeneral::pickAlarmProgram() ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); -#endif + } diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 01cf0ff..395325c 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -206,2 +206,6 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) } +void KOTodoListView::wheelEvent (QWheelEvent *e) +{ + QListView::wheelEvent (e); +} @@ -229,5 +233,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) mMousePressed = false; - if (! rootClicked ) { + if (! rootClicked && !( e->button() == RightButton) ) { mPressPos = e->pos(); mMousePressed = true; + } else { + mMousePressed = false; } @@ -1084,3 +1090,3 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) } else { - if ( row == 1 ) { + if ( row == 1 || row == 2 ) { mActiveItem = (KOTodoViewItem *) item; @@ -1273,2 +1279,3 @@ void KOTodoView::purgeCompleted() emit purgeCompletedSignal(); + } diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index e553d0e..39976cf 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -70,2 +70,3 @@ class KOTodoListView : public KListView protected: + void wheelEvent (QWheelEvent *e); void contentsDragEnterEvent(QDragEnterEvent *); |