-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 @@ -33,4 +33,5 @@ #include <qsound.h> #include <qpushbutton.h> +#include <qregexp.h> #ifndef DESKTOP_VERSION #define protected public @@ -59,5 +60,5 @@ 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!" ); @@ -233,5 +234,7 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo 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 @@ -266,11 +269,11 @@ void AlarmDialog::playSound () if (mStopAlarm ) return; - if (mSilent ) + if ( mSilent ) return; showNormal(); setActiveWindow(); + raise(); mSuspendSpin->setFocus(); - raise(); - repaint(); + qApp->processEvents(); |