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 | |
parent | 8f904d99e7b6e04b6043226a63f6c417171a7cad (diff) | |
download | opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.zip opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.tar.gz opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.tar.bz2 |
fixed broken autostart handling
-rw-r--r-- | core/pim/today/TODO | 6 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 14 | ||||
-rw-r--r-- | core/pim/today/todayconfig.h | 2 |
3 files changed, 15 insertions, 7 deletions
diff --git a/core/pim/today/TODO b/core/pim/today/TODO index 6634cad..49503bd 100644 --- a/core/pim/today/TODO +++ b/core/pim/today/TODO @@ -1,8 +1,14 @@ TODO for today: +- all icons clickable + +- retail rom mail plugin (z) + +- autostart on retail rom (Z) + * show "upcoming appointents the next days * show alarm icons on alarm events (partly done) * qcop integration for updating events? 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() ) { diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h index 7c261bd..f23b850 100644 --- a/core/pim/today/todayconfig.h +++ b/core/pim/today/todayconfig.h @@ -51,13 +51,13 @@ private: void readConfig(); QListView* m_appletListView; QMap<QString,QCheckListItem*> m_applets; int m_autoStart; - QString m_autoStartTimer; + int m_autoStartTimer; QStringList m_excludeApplets; bool m_applets_changed; QLabel* TextLabel2; QCheckBox* CheckBoxAuto; QWidget* tab_2; |