author | zautrix <zautrix> | 2005-04-03 04:33:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-03 04:33:19 (UTC) |
commit | f6c8249db564c1276d4c7ed5ad88c6fbac361b8d (patch) (unidiff) | |
tree | 8e5b6e2d6f9a7bc00326f7c0115bf2af53ae9ce8 /kalarmd | |
parent | 40e5edc1ab153144f0e824ad2d3a0ab37357e408 (diff) | |
download | kdepimpi-f6c8249db564c1276d4c7ed5ad88c6fbac361b8d.zip kdepimpi-f6c8249db564c1276d4c7ed5ad88c6fbac361b8d.tar.gz kdepimpi-f6c8249db564c1276d4c7ed5ad88c6fbac361b8d.tar.bz2 |
fixes
-rw-r--r-- | kalarmd/alarmdialog.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index bdeee4a..53ff488 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qsound.h> | 33 | #include <qsound.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #include <qregexp.h> | ||
35 | #ifndef DESKTOP_VERSION | 36 | #ifndef DESKTOP_VERSION |
36 | #define protected public | 37 | #define protected public |
37 | #include <qspinbox.h> | 38 | #include <qspinbox.h> |
@@ -58,7 +59,7 @@ | |||
58 | 59 | ||
59 | 60 | ||
60 | AlarmDialog::AlarmDialog(QWidget *parent,const char *name) | 61 | AlarmDialog::AlarmDialog(QWidget *parent,const char *name) |
61 | : QDialog (parent, name, true, Qt::WStyle_StaysOnTop ) | 62 | : QDialog (parent, name, true, Qt::WStyle_Customize |Qt::WStyle_StaysOnTop | Qt::WStyle_DialogBorder) |
62 | { | 63 | { |
63 | setCaption( "KO/Pi Alarm!" ); | 64 | setCaption( "KO/Pi Alarm!" ); |
64 | QVBoxLayout* layout = new QVBoxLayout( this); | 65 | QVBoxLayout* layout = new QVBoxLayout( this); |
@@ -232,7 +233,9 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo | |||
232 | mSilent = false; | 233 | mSilent = false; |
233 | if ( !mMessage->text().stripWhiteSpace().isEmpty() ) { | 234 | if ( !mMessage->text().stripWhiteSpace().isEmpty() ) { |
234 | mMissedAlarmsCombo->show(); | 235 | mMissedAlarmsCombo->show(); |
235 | mMissedAlarmsCombo->insertItem( mMessage->text().stripWhiteSpace() ); | 236 | QString newItem = mMessage->text().stripWhiteSpace(); |
237 | newItem.replace( QRegExp("\n"), QString(" ") ); | ||
238 | mMissedAlarmsCombo->insertItem( newItem ); | ||
236 | mMissedAlarms->setText( "Missed alarms:"); | 239 | mMissedAlarms->setText( "Missed alarms:"); |
237 | } else | 240 | } else |
238 | mMissedAlarmsCombo->hide(); | 241 | mMissedAlarmsCombo->hide(); |
@@ -265,13 +268,13 @@ void AlarmDialog::playSound () | |||
265 | 268 | ||
266 | if (mStopAlarm ) | 269 | if (mStopAlarm ) |
267 | return; | 270 | return; |
268 | if (mSilent ) | 271 | if ( mSilent ) |
269 | return; | 272 | return; |
270 | showNormal(); | 273 | showNormal(); |
271 | setActiveWindow(); | 274 | setActiveWindow(); |
275 | raise(); | ||
272 | mSuspendSpin->setFocus(); | 276 | mSuspendSpin->setFocus(); |
273 | raise(); | 277 | |
274 | repaint(); | ||
275 | 278 | ||
276 | qApp->processEvents(); | 279 | qApp->processEvents(); |
277 | if ( alarmCounter < maxAlarmReplay && ! mSilent) { | 280 | if ( alarmCounter < maxAlarmReplay && ! mSilent) { |