From f6c8249db564c1276d4c7ed5ad88c6fbac361b8d Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 03 Apr 2005 04:33:19 +0000 Subject: fixes --- (limited to 'kalarmd/alarmdialog.cpp') 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 #include #include +#include #ifndef DESKTOP_VERSION #define protected public #include @@ -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) { -- cgit v0.9.0.2