author | harlekin <harlekin> | 2002-10-02 11:27:35 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-02 11:27:35 (UTC) |
commit | ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38 (patch) (side-by-side diff) | |
tree | 6fab13be118de545153d3081dba989864ba3b57c /core/pim/today/todayconfig.cpp | |
parent | 8f904d99e7b6e04b6043226a63f6c417171a7cad (diff) | |
download | opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.zip opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.tar.gz opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.tar.bz2 |
fixed broken autostart handling
Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 9ff9ba6..3fc5830 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp @@ -101,18 +101,17 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags * Autostart, uses the new (opie only) autostart method in the launcher code. * If registered against that today ist started on each resume. */ void TodayConfig::setAutoStart() { Config cfg( "today" ); cfg.setGroup( "Autostart" ); - int autostart = cfg.readNumEntry( "autostart", 1 ); - if ( autostart ) { + if ( m_autoStart ) { QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); e << QString( "add" ); e << QString( "today" ); - e << m_autoStartTimer; + e << QString("%1").arg( m_autoStartTimer ); } else { QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); e << QString( "remove" ); e << QString( "today" ); } } @@ -122,14 +121,14 @@ void TodayConfig::setAutoStart() { */ void TodayConfig::readConfig() { Config cfg( "today" ); cfg.setGroup( "Autostart" ); m_autoStart = cfg.readNumEntry( "autostart", 1 ); CheckBoxAuto->setChecked( m_autoStart ); - m_autoStartTimer = cfg.readEntry( "autostartdelay", "0" ); - SpinBoxTime->setValue( m_autoStartTimer.toInt() ); + m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); + SpinBoxTime->setValue( m_autoStartTimer ); cfg.setGroup( "Plugins" ); m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); } /** @@ -165,13 +164,16 @@ void TodayConfig::writeConfig() { } cfg.setGroup( "Autostart" ); m_autoStart = CheckBoxAuto->isChecked(); cfg.writeEntry( "autostart", m_autoStart ); m_autoStartTimer = SpinBoxTime->value(); - cfg.readEntry( "autostartdelay", m_autoStartTimer ); + cfg.writeEntry( "autostartdelay", m_autoStartTimer ); + + // set autostart settings + setAutoStart(); } void TodayConfig::moveSelectedUp() { QListViewItem *item = m_appletListView->selectedItem(); if ( item && item->itemAbove() ) { |