summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
authorzautrix <zautrix>2005-11-30 08:30:24 (UTC)
committer zautrix <zautrix>2005-11-30 08:30:24 (UTC)
commit042f35a481acf6c4e711e98184abb6c9f6542429 (patch) (side-by-side diff)
tree47622f89ebfb6c677797d7906f167ba80976ab7d /korganizer/koeditorgeneral.cpp
parent14bd7cc7412ffdbca09e1cd63a230222a3fbfd53 (diff)
downloadkdepimpi-042f35a481acf6c4e711e98184abb6c9f6542429.zip
kdepimpi-042f35a481acf6c4e711e98184abb6c9f6542429.tar.gz
kdepimpi-042f35a481acf6c4e711e98184abb6c9f6542429.tar.bz2
commit
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 92e5a0f..21f220c 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -134,25 +134,24 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
headerLayout->setColStretch( 1, str);
headerLayout->setColStretch( 2, 1);
}
}
void KOEditorGeneral::setFocusOn( int i )
{
mNextFocus = i;
QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));
}
void KOEditorGeneral::slotSetFocusOn()
{
- mNextFocus;
if ( mNextFocus == 1 ) {
mDescriptionEdit->setFocus();
mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
}
if ( mNextFocus == 2 ) {
mSummaryEdit->setFocus();
}
}
void KOEditorGeneral::editCategories()
{
// qDebug("KOEditorGeneral::editCategories() ");
KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
@@ -346,25 +345,25 @@ void KOEditorGeneral::pickAlarmProgram()
mAlarmProgramButton->setOn(!oldState);
mAlarmSoundButton->setOn(oldState);
}
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
-QString KOEditorGeneral::getFittingPath( const QString s )
+QString KOEditorGeneral::getFittingPath( const QString & s )
{
int maxlen = 50;
if ( QApplication::desktop()->width() < 640 ) {
if ( QApplication::desktop()->width() < 320 )
maxlen = 22;
else
maxlen = 35;
}
if ( s.length() > maxlen ) {
return "..."+s.right(maxlen -3);
}
return s;
@@ -611,14 +610,16 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
alarm->setType(Alarm::Invalid);
//alarm->setAudioAlarm("default");
// TODO: Deal with multiple alarms
break; // For now, stop after the first alarm
}
} else {
Alarm* alarm = event->alarms().first();
if ( alarm ) {
alarm->setEnabled(false);
alarm->setType(Alarm::Invalid);
}
}
- event->setCalID( getCalendarID() );
+ int id = getCalendarID();
+ event->setCalID( id );
+ event->setAlarmEnabled( KOPrefs::instance()->getCalendar( id )->isAlarmEnabled );
}