-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 | |||
@@ -531,4 +531,9 @@ void CalendarView::suspendAlarm() | |||
531 | void CalendarView::startAlarm( QString mess , QString filename) | 531 | void CalendarView::startAlarm( QString mess , QString filename) |
532 | { | 532 | { |
533 | |||
534 | topLevelWidget()->showNormal(); | ||
535 | topLevelWidget()->setActiveWindow(); | ||
536 | topLevelWidget()->raise(); | ||
537 | |||
533 | mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); | 538 | mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); |
534 | QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); | 539 | QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); |
@@ -4095,5 +4100,5 @@ void CalendarView::showNextAlarms() | |||
4095 | hours = hours % 24; | 4100 | hours = hours % 24; |
4096 | 4101 | ||
4097 | message = i18n("The next alarm is in:\n"); | 4102 | //message = i18n("The next alarm is in:\n"); |
4098 | if ( days > 1 ) | 4103 | if ( days > 1 ) |
4099 | message += i18n("%1 days\n").arg( days ); | 4104 | message += i18n("%1 days\n").arg( days ); |
@@ -4108,5 +4113,8 @@ void CalendarView::showNextAlarms() | |||
4108 | else if ( min == 1 ) | 4113 | else if ( min == 1 ) |
4109 | message += i18n("1 minute\n"); | 4114 | message += i18n("1 minute\n"); |
4110 | 4115 | if ( message.isEmpty() ) | |
4116 | message = i18n("The next alarm is in\nless than one minute!"); | ||
4117 | else | ||
4118 | message = i18n("The next alarm is in:\n") + message; | ||
4111 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; | 4119 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; |
4112 | } else { | 4120 | } else { |
@@ -4114,4 +4122,11 @@ void CalendarView::showNextAlarms() | |||
4114 | 4122 | ||
4115 | } | 4123 | } |
4124 | #ifdef DESKTOP_VERSION | ||
4125 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | ||
4126 | message += i18n("\nThe internal alarm notification is disabled!\n"); | ||
4127 | message += i18n("Enable it in the settings menu, TAB alarm."); | ||
4128 | } | ||
4129 | |||
4130 | #endif | ||
4116 | KMessageBox::information( this, message); | 4131 | KMessageBox::information( this, message); |
4117 | } | 4132 | } |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index d450a97..6d1e6d5 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -154,5 +154,5 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) | |||
154 | //p->drawLine(0,0,0,contentsHeight()); | 154 | //p->drawLine(0,0,0,contentsHeight()); |
155 | while (y < cy + ch+mCellHeight) { | 155 | while (y < cy + ch+mCellHeight) { |
156 | p->drawLine(startW-tw2 ,y,cw+2,y); | 156 | p->drawLine(startW-tw2+1 ,y,cw+2,y); |
157 | hour.setNum(cell); | 157 | hour.setNum(cell); |
158 | // handle 24h and am/pm time formats | 158 | // handle 24h and am/pm time formats |
@@ -216,5 +216,5 @@ void TimeLabels::updateConfig() | |||
216 | // update HourSize | 216 | // update HourSize |
217 | mCellHeight = KOPrefs::instance()->mHourSize*4; | 217 | mCellHeight = KOPrefs::instance()->mHourSize*4; |
218 | resizeContents(50,mRows * mCellHeight); | 218 | resizeContents(mMiniWidth,mRows * mCellHeight+1); |
219 | } | 219 | } |
220 | 220 | ||
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index b14ca43..abc80d4 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -228,57 +228,54 @@ void KOEditorGeneral::pickAlarmSound() | |||
228 | 228 | ||
229 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); | 229 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); |
230 | //QString prefix = mAlarmSound; | 230 | |
231 | if (!mAlarmSoundButton->isOn()) { | 231 | bool oldState = mAlarmSoundButton->isOn(); |
232 | |||
233 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, | ||
234 | i18n("*.wav|Wav Files"), 0)); | ||
235 | if (!fileName.isEmpty()) { | ||
236 | mAlarmSound = fileName; | ||
237 | QToolTip::remove(mAlarmSoundButton); | ||
238 | QString dispStr = i18n("Playing '%1'").arg(fileName); | ||
239 | QToolTip::add(mAlarmSoundButton, dispStr); | ||
240 | mAlarmProgramButton->setOn(false); | ||
232 | mAlarmSoundButton->setOn(true); | 241 | mAlarmSoundButton->setOn(true); |
233 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 242 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
234 | } else { | 243 | } else { |
235 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, | 244 | mAlarmProgramButton->setOn(oldState); |
236 | i18n("*.wav|Wav Files"), 0)); | 245 | mAlarmSoundButton->setOn(!oldState); |
237 | if (!fileName.isEmpty()) { | 246 | |
238 | mAlarmSound = fileName; | 247 | |
239 | QToolTip::remove(mAlarmSoundButton); | ||
240 | QString dispStr = i18n("Playing '%1'").arg(fileName); | ||
241 | QToolTip::add(mAlarmSoundButton, dispStr); | ||
242 | mAlarmProgramButton->setOn(false); | ||
243 | mAlarmSoundButton->setOn(true); | ||
244 | } else { | ||
245 | mAlarmProgramButton->setOn(true); | ||
246 | mAlarmSoundButton->setOn(false); | ||
247 | |||
248 | } | ||
249 | } | 248 | } |
250 | #if 0 | 249 | |
251 | if (mAlarmProgramButton->isOn()) | 250 | if (mAlarmProgramButton->isOn()) |
252 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 251 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
253 | if ( mAlarmSoundButton->isOn()) | 252 | if ( mAlarmSoundButton->isOn()) |
254 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 253 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
255 | #endif | 254 | |
256 | } | 255 | } |
257 | 256 | ||
258 | void KOEditorGeneral::pickAlarmProgram() | 257 | void KOEditorGeneral::pickAlarmProgram() |
259 | { | 258 | { |
260 | if (!mAlarmProgramButton->isOn()) { | 259 | bool oldState = mAlarmProgramButton->isOn(); |
260 | |||
261 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); | ||
262 | if (!fileName.isEmpty()) { | ||
263 | mAlarmProgram = fileName; | ||
264 | QToolTip::remove(mAlarmProgramButton); | ||
265 | QString dispStr = i18n("Running '%1'").arg(fileName); | ||
266 | QToolTip::add(mAlarmProgramButton, dispStr); | ||
267 | mAlarmSoundButton->setOn(false); | ||
261 | mAlarmProgramButton->setOn(true); | 268 | mAlarmProgramButton->setOn(true); |
262 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 269 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); |
263 | } else { | 270 | } else { |
264 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); | 271 | mAlarmProgramButton->setOn(!oldState); |
265 | if (!fileName.isEmpty()) { | 272 | mAlarmSoundButton->setOn(oldState); |
266 | mAlarmProgram = fileName; | ||
267 | QToolTip::remove(mAlarmProgramButton); | ||
268 | QString dispStr = i18n("Running '%1'").arg(fileName); | ||
269 | QToolTip::add(mAlarmProgramButton, dispStr); | ||
270 | mAlarmSoundButton->setOn(false); | ||
271 | mAlarmProgramButton->setOn(true); | ||
272 | } else { | ||
273 | mAlarmProgramButton->setOn(false); | ||
274 | mAlarmSoundButton->setOn(true); | ||
275 | } | ||
276 | } | 273 | } |
277 | #if 0 | 274 | |
278 | if (mAlarmProgramButton->isOn()) | 275 | if (mAlarmProgramButton->isOn()) |
279 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 276 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
280 | if ( mAlarmSoundButton->isOn()) | 277 | if ( mAlarmSoundButton->isOn()) |
281 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 278 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
282 | #endif | 279 | |
283 | } | 280 | } |
284 | 281 | ||
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 01cf0ff..395325c 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -205,4 +205,8 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) | |||
205 | #endif | 205 | #endif |
206 | } | 206 | } |
207 | void KOTodoListView::wheelEvent (QWheelEvent *e) | ||
208 | { | ||
209 | QListView::wheelEvent (e); | ||
210 | } | ||
207 | 211 | ||
208 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 212 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
@@ -228,7 +232,9 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | |||
228 | #ifndef KORG_NODND | 232 | #ifndef KORG_NODND |
229 | mMousePressed = false; | 233 | mMousePressed = false; |
230 | if (! rootClicked ) { | 234 | if (! rootClicked && !( e->button() == RightButton) ) { |
231 | mPressPos = e->pos(); | 235 | mPressPos = e->pos(); |
232 | mMousePressed = true; | 236 | mMousePressed = true; |
237 | } else { | ||
238 | mMousePressed = false; | ||
233 | } | 239 | } |
234 | #endif | 240 | #endif |
@@ -1083,5 +1089,5 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) | |||
1083 | return; | 1089 | return; |
1084 | } else { | 1090 | } else { |
1085 | if ( row == 1 ) { | 1091 | if ( row == 1 || row == 2 ) { |
1086 | mActiveItem = (KOTodoViewItem *) item; | 1092 | mActiveItem = (KOTodoViewItem *) item; |
1087 | newSubTodo(); | 1093 | newSubTodo(); |
@@ -1272,4 +1278,5 @@ void KOTodoView::purgeCompleted() | |||
1272 | { | 1278 | { |
1273 | emit purgeCompletedSignal(); | 1279 | emit purgeCompletedSignal(); |
1280 | |||
1274 | } | 1281 | } |
1275 | void KOTodoView::toggleQuickTodo() | 1282 | void KOTodoView::toggleQuickTodo() |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index e553d0e..39976cf 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -69,4 +69,5 @@ class KOTodoListView : public KListView | |||
69 | void deleteTodo( Todo * ); | 69 | void deleteTodo( Todo * ); |
70 | protected: | 70 | protected: |
71 | void wheelEvent (QWheelEvent *e); | ||
71 | void contentsDragEnterEvent(QDragEnterEvent *); | 72 | void contentsDragEnterEvent(QDragEnterEvent *); |
72 | void contentsDragMoveEvent(QDragMoveEvent *); | 73 | void contentsDragMoveEvent(QDragMoveEvent *); |