author | zautrix <zautrix> | 2005-04-03 04:33:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-03 04:33:19 (UTC) |
commit | f6c8249db564c1276d4c7ed5ad88c6fbac361b8d (patch) (side-by-side diff) | |
tree | 8e5b6e2d6f9a7bc00326f7c0115bf2af53ae9ce8 /kalarmd/alarmdialog.cpp | |
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 @@ #include <qtimer.h> #include <qsound.h> #include <qpushbutton.h> +#include <qregexp.h> #ifndef DESKTOP_VERSION #define protected public #include <qspinbox.h> @@ -58,7 +59,7 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) - : QDialog (parent, name, true, Qt::WStyle_StaysOnTop ) + : QDialog (parent, name, true, Qt::WStyle_Customize |Qt::WStyle_StaysOnTop | Qt::WStyle_DialogBorder) { setCaption( "KO/Pi Alarm!" ); QVBoxLayout* layout = new QVBoxLayout( this); @@ -232,7 +233,9 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo mSilent = false; if ( !mMessage->text().stripWhiteSpace().isEmpty() ) { mMissedAlarmsCombo->show(); - mMissedAlarmsCombo->insertItem( mMessage->text().stripWhiteSpace() ); + QString newItem = mMessage->text().stripWhiteSpace(); + newItem.replace( QRegExp("\n"), QString(" ") ); + mMissedAlarmsCombo->insertItem( newItem ); mMissedAlarms->setText( "Missed alarms:"); } else mMissedAlarmsCombo->hide(); @@ -265,13 +268,13 @@ void AlarmDialog::playSound () if (mStopAlarm ) return; - if (mSilent ) + if ( mSilent ) return; showNormal(); setActiveWindow(); + raise(); mSuspendSpin->setFocus(); - raise(); - repaint(); + qApp->processEvents(); if ( alarmCounter < maxAlarmReplay && ! mSilent) { |