summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt12
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt5
-rw-r--r--kalarmd/alarmdialog.cpp52
-rw-r--r--korganizer/calendarview.cpp18
-rw-r--r--korganizer/calendarview.h2
-rw-r--r--korganizer/mainwindow.cpp19
-rw-r--r--korganizer/mainwindow.h1
7 files changed, 95 insertions, 14 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index d4ec863..4250fb3 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -16,6 +16,18 @@ Many small usebility fixes in KO/Pi.
16Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. 16Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi.
17The set of possible "next views" are the views you have toolbar buttons for. 17The set of possible "next views" are the views you have toolbar buttons for.
18 18
19Made alarm sound working on Linux.
20
21KO/Pi alarm applet changed:
22Made buttons in alarm dialog much bigger.
23Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger.
24The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings.
25
26And because this version is realeased at Easter, I added an Easter-egg:
27With a new undocumented command you can get a message box about the next alarm.
28Good luck to find it!
29
30
19 31
20********** VERSION 2.0.20 ************ 32********** VERSION 2.0.20 ************
21 33
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index b6293b5..ce55780 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1304,10 +1304,13 @@
1304{ "Show current time","Zeige aktuelle Zeit" }, 1304{ "Show current time","Zeige aktuelle Zeit" },
1305{ "Edit new item","Bearbeite neuen Eintrag" }, 1305{ "Edit new item","Bearbeite neuen Eintrag" },
1306{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1306{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1307{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1308{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1309{ "The next alarm is on:\n%1\nat: %2\n\n%3\n(%4)","Der nächste Alarm in am:\n%1\num: %2\n\n%3\n(%4)" },
1307{ "","" }, 1310{ "","" },
1308{ "","" }, 1311{ "","" },
1309{ "","" }, 1312{ "","" },
1310{ "","" }, 1313{ "","" },
1311{ "","" }, 1314{ "","" },
1312{ "","" }, 1315{ "","" },
1313{ "","" }, 1316 \ No newline at end of file
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp
index c939ae0..7ead3b9 100644
--- a/kalarmd/alarmdialog.cpp
+++ b/kalarmd/alarmdialog.cpp
@@ -47,6 +47,7 @@
47#include <qtopia/alarmserver.h> 47#include <qtopia/alarmserver.h>
48#include <qpe/resource.h> 48#include <qpe/resource.h>
49#include <qtopia/sound.h> 49#include <qtopia/sound.h>
50
50#endif 51#endif
51 52
52#include "alarmdialog.h" 53#include "alarmdialog.h"
@@ -91,14 +92,16 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
91 layout->addWidget ( mMissedAlarms ); 92 layout->addWidget ( mMissedAlarms );
92 mMissedAlarmsCombo = new QComboBox ( this ); 93 mMissedAlarmsCombo = new QComboBox ( this );
93 layout->addWidget ( mMissedAlarmsCombo ); 94 layout->addWidget ( mMissedAlarmsCombo );
94 QVBox *suspendBox = new QVBox( this ); 95
95 suspendBox->setSpacing(3); 96 QLabel* labb = new QLabel("Suspend duration (minutes):",this);
96 layout->addWidget ( suspendBox );
97 QLabel* labb = new QLabel("Suspend duration (minutes):",suspendBox);
98 labb->setAlignment(AlignCenter); 97 labb->setAlignment(AlignCenter);
98 layout->addWidget ( labb );
99 fo = font(); 99 fo = font();
100 fo.setPointSize( 36 ); 100 int pointSize = 36;
101 mSuspendSpin = new QSpinBox(1,1440,1,suspendBox); 101 if ( QApplication::desktop()->width() <= 320 )
102 pointSize = 24;
103 fo.setPointSize( pointSize );
104 mSuspendSpin = new QSpinBox(1,1440,1,this);
102 mSuspendSpin->setFont( fo ); 105 mSuspendSpin->setFont( fo );
103 mSuspendSpin->setValue(7); // default suspend duration 106 mSuspendSpin->setValue(7); // default suspend duration
104 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 107 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
@@ -108,11 +111,17 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
108 mSuspendSpin->downButton ()->setFixedSize( QSize( 48, 30 )); 111 mSuspendSpin->downButton ()->setFixedSize( QSize( 48, 30 ));
109#endif 112#endif
110 mSuspendSpin->setFixedSize( 100,62 ); 113 mSuspendSpin->setFixedSize( 100,62 );
111 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 114 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
115 QHBoxLayout* layoutSpin = new QHBoxLayout( layout );
116 layoutSpin->addStretch ();
117 layoutSpin->addWidget ( mSuspendSpin );
118 layoutSpin->addStretch ();
112 119
113 QVBox * bbox = new QVBox ( this ); 120 QVBox * bbox = new QVBox ( this );
114 layout->addWidget ( bbox ); 121 layout->addWidget ( bbox );
115 bbox->layout()->setSpacing( 2 ); 122 bbox->layout()->setSpacing( 2 );
123 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox);
124 labb->setAlignment(AlignCenter);
116 mSuspendButton = new QPushButton( "Suspend", bbox); 125 mSuspendButton = new QPushButton( "Suspend", bbox);
117 QPushButton* silen = new QPushButton( " Stop sound ", bbox); 126 QPushButton* silen = new QPushButton( " Stop sound ", bbox);
118 QPushButton* okbut = new QPushButton( "Ok", bbox); 127 QPushButton* okbut = new QPushButton( "Ok", bbox);
@@ -259,15 +268,38 @@ void AlarmDialog::playSound ()
259 qApp->processEvents(); 268 qApp->processEvents();
260 if ( alarmCounter < maxAlarmReplay && ! mSilent) { 269 if ( alarmCounter < maxAlarmReplay && ! mSilent) {
261 ++alarmCounter; 270 ++alarmCounter;
271#ifdef DESKTOP_VERSION
272 mPlayWav = true;
273#endif
262 if ( !mPlayWav || mFileName.length() < 2 ) { 274 if ( !mPlayWav || mFileName.length() < 2 ) {
263 275
264#ifndef DESKTOP_VERSION 276#ifdef DESKTOP_VERSION
277 qDebug("Sound play not possible - file not found");
278#else
265 Sound::soundAlarm (); 279 Sound::soundAlarm ();
266#endif 280#endif
267 } else { 281 } else
282
283 {
284#ifdef DESKTOP_VERSION
285#ifdef _WIN32_
286 QSound::play ( mFileName );
287#else
288
289 QString command = "playwave -r 22050 " + mFileName;
290 qDebug("KO: Playing file %s with 22kHz",mFileName.latin1() );
291 int ret = system ( command.latin1() );
292 if ( ret != 0 ) {
293 qDebug("Sound play command failed: %s ",command.latin1() );
294 }
295
296#endif
297
298#else
268 QSound::play ( mFileName ); 299 QSound::play ( mFileName );
300#endif
269 //qDebug("BEEP!"); 301 //qDebug("BEEP!");
270 } 302 }
271 } else { 303 } else {
272 if ( ! mSilent && mSuspendCounter > 0 ) { 304 if ( ! mSilent && mSuspendCounter > 0 ) {
273 --mSuspendCounter; 305 --mSuspendCounter;
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3a16fe6..73aa733 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -235,7 +235,7 @@ CalendarView::CalendarView( Calendar *calendar,
235 235
236void CalendarView::init() 236void CalendarView::init()
237{ 237{
238 238 mNextAlarmDateTime = QDateTime::currentDateTime();
239 setFocusPolicy ( WheelFocus ); 239 setFocusPolicy ( WheelFocus );
240 mViewerCallerIsSearchDialog = false; 240 mViewerCallerIsSearchDialog = false;
241 mBlockShowDates = false; 241 mBlockShowDates = false;
@@ -642,6 +642,7 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
642 642
643void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti ) 643void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
644{ 644{
645 mNextAlarmDateTime = qdt;
645 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 646 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
646 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 647 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
647#ifndef DESKTOP_VERSION 648#ifndef DESKTOP_VERSION
@@ -4064,3 +4065,18 @@ void CalendarView::resetFocus()
4064 } 4065 }
4065 mViewerCallerIsSearchDialog = false; 4066 mViewerCallerIsSearchDialog = false;
4066} 4067}
4068
4069void CalendarView::showNextAlarms()
4070{
4071 QString message;
4072 if ( mNextAlarmDateTime > QDateTime::currentDateTime() ) {
4073 QString sum = mCalendar->nextSummary();
4074 QDateTime nextA = mNextAlarmDateTime;
4075 QDateTime nextAl = mCalendar->nextAlarmEventDateTime();
4076 message = i18n("The next alarm is on:\n%1\nat: %2\n\n%3\n(%4)").arg( KGlobal::locale()->formatDate(nextA.date() , false)).arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ;
4077 } else {
4078 message = i18n("There is no next alarm.");
4079
4080 }
4081 KMessageBox::information( this, message);
4082}
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 16e671f..9782ffe 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -176,6 +176,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
176 176
177 177
178 public slots: 178 public slots:
179 void showNextAlarms();
179 void showOpenError(); 180 void showOpenError();
180 void watchSavedFile(); 181 void watchSavedFile();
181 void recheckTimerAlarm(); 182 void recheckTimerAlarm();
@@ -499,6 +500,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
499 Todo *selectedTodo(); 500 Todo *selectedTodo();
500 501
501 private: 502 private:
503 QDateTime mNextAlarmDateTime;
502 bool mViewerCallerIsSearchDialog; 504 bool mViewerCallerIsSearchDialog;
503 bool mBlockShowDates; 505 bool mBlockShowDates;
504 KSyncManager* mSyncManager; 506 KSyncManager* mSyncManager;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 95b836c..7a4275b 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -590,7 +590,7 @@ void MainWindow::initActions()
590 mWeekFont.setPointSize( fontPoint ); 590 mWeekFont.setPointSize( fontPoint );
591 QFontMetrics f( mWeekFont ); 591 QFontMetrics f( mWeekFont );
592 fontWid = f.width( "30" ); 592 fontWid = f.width( "30" );
593 qDebug("dec-- "); 593 //qDebug("dec-- ");
594 } 594 }
595 595
596 connect( mWeekAction, SIGNAL( activated() ), 596 connect( mWeekAction, SIGNAL( activated() ),
@@ -1748,7 +1748,10 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
1748 mView->toggleExpand(); 1748 mView->toggleExpand();
1749 break; 1749 break;
1750 case Qt::Key_A: 1750 case Qt::Key_A:
1751 mView->toggleAllDaySize(); 1751 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
1752 mView->showNextAlarms();
1753 else
1754 mView->toggleAllDaySize();
1752 break; 1755 break;
1753 case Qt::Key_T: 1756 case Qt::Key_T:
1754 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1757 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
@@ -2133,3 +2136,15 @@ void MainWindow::weekAction()
2133 } 2136 }
2134 delete popup; 2137 delete popup;
2135} 2138}
2139
2140void MainWindow::hideEvent ( QHideEvent * )
2141{
2142 QString message;
2143 QDateTime nextA = mCalendar->nextAlarmEventDateTime();
2144 if ( nextA.isValid() ) {
2145 QString sum = mCalendar->nextSummary();
2146
2147 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false));
2148 setCaption( message );
2149 }
2150}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 7604529..b3041dc 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -104,6 +104,7 @@ class MainWindow : public QMainWindow
104 void syncFileRequest(); 104 void syncFileRequest();
105 105
106 protected: 106 protected:
107 void hideEvent ( QHideEvent * );
107 QString sentSyncFile(); 108 QString sentSyncFile();
108 void displayText( QString, QString); 109 void displayText( QString, QString);
109 void enableIncidenceActions( bool ); 110 void enableIncidenceActions( bool );