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 | |||
101 | * Autostart, uses the new (opie only) autostart method in the launcher code. | 101 | * Autostart, uses the new (opie only) autostart method in the launcher code. |
102 | * If registered against that today ist started on each resume. | 102 | * If registered against that today ist started on each resume. |
103 | */ | 103 | */ |
104 | void TodayConfig::setAutoStart() { | 104 | void TodayConfig::setAutoStart() { |
105 | Config cfg( "today" ); | 105 | Config cfg( "today" ); |
106 | cfg.setGroup( "Autostart" ); | 106 | cfg.setGroup( "Autostart" ); |
107 | int autostart = cfg.readNumEntry( "autostart", 1 ); | 107 | if ( m_autoStart ) { |
108 | if ( autostart ) { | ||
109 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); | 108 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); |
110 | e << QString( "add" ); | 109 | e << QString( "add" ); |
111 | e << QString( "today" ); | 110 | e << QString( "today" ); |
112 | e << m_autoStartTimer; | 111 | e << QString("%1").arg( m_autoStartTimer ); |
113 | } else { | 112 | } else { |
114 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); | 113 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); |
115 | e << QString( "remove" ); | 114 | e << QString( "remove" ); |
116 | e << QString( "today" ); | 115 | e << QString( "today" ); |
117 | } | 116 | } |
118 | } | 117 | } |
@@ -122,14 +121,14 @@ void TodayConfig::setAutoStart() { | |||
122 | */ | 121 | */ |
123 | void TodayConfig::readConfig() { | 122 | void TodayConfig::readConfig() { |
124 | Config cfg( "today" ); | 123 | Config cfg( "today" ); |
125 | cfg.setGroup( "Autostart" ); | 124 | cfg.setGroup( "Autostart" ); |
126 | m_autoStart = cfg.readNumEntry( "autostart", 1 ); | 125 | m_autoStart = cfg.readNumEntry( "autostart", 1 ); |
127 | CheckBoxAuto->setChecked( m_autoStart ); | 126 | CheckBoxAuto->setChecked( m_autoStart ); |
128 | m_autoStartTimer = cfg.readEntry( "autostartdelay", "0" ); | 127 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); |
129 | SpinBoxTime->setValue( m_autoStartTimer.toInt() ); | 128 | SpinBoxTime->setValue( m_autoStartTimer ); |
130 | 129 | ||
131 | cfg.setGroup( "Plugins" ); | 130 | cfg.setGroup( "Plugins" ); |
132 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 131 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
133 | } | 132 | } |
134 | 133 | ||
135 | /** | 134 | /** |
@@ -165,13 +164,16 @@ void TodayConfig::writeConfig() { | |||
165 | } | 164 | } |
166 | 165 | ||
167 | cfg.setGroup( "Autostart" ); | 166 | cfg.setGroup( "Autostart" ); |
168 | m_autoStart = CheckBoxAuto->isChecked(); | 167 | m_autoStart = CheckBoxAuto->isChecked(); |
169 | cfg.writeEntry( "autostart", m_autoStart ); | 168 | cfg.writeEntry( "autostart", m_autoStart ); |
170 | m_autoStartTimer = SpinBoxTime->value(); | 169 | m_autoStartTimer = SpinBoxTime->value(); |
171 | cfg.readEntry( "autostartdelay", m_autoStartTimer ); | 170 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); |
171 | |||
172 | // set autostart settings | ||
173 | setAutoStart(); | ||
172 | } | 174 | } |
173 | 175 | ||
174 | 176 | ||
175 | void TodayConfig::moveSelectedUp() { | 177 | void TodayConfig::moveSelectedUp() { |
176 | QListViewItem *item = m_appletListView->selectedItem(); | 178 | QListViewItem *item = m_appletListView->selectedItem(); |
177 | if ( item && item->itemAbove() ) { | 179 | if ( item && item->itemAbove() ) { |