summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-02 11:27:35 (UTC)
committer harlekin <harlekin>2002-10-02 11:27:35 (UTC)
commitff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38 (patch) (side-by-side diff)
tree6fab13be118de545153d3081dba989864ba3b57c
parent8f904d99e7b6e04b6043226a63f6c417171a7cad (diff)
downloadopie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.zip
opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.tar.gz
opie-ff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38.tar.bz2
fixed broken autostart handling
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/TODO6
-rw-r--r--core/pim/today/todayconfig.cpp14
-rw-r--r--core/pim/today/todayconfig.h2
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,9 +1,15 @@
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
@@ -99,39 +99,38 @@ 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" );
}
}
/**
* Read the config part
*/
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", ',' );
}
/**
* Write the config part
*/
@@ -163,17 +162,20 @@ void TodayConfig::writeConfig() {
cfg.writeEntry( "IncludeApplets", include, ',' );
cfg.writeEntry( "AllApplets", all_applets, ',' );
}
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() ) {
item->itemAbove()->moveItem( item );
}
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
@@ -49,17 +49,17 @@ protected slots:
private:
void setAutoStart();
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;
QWidget* tab_3;
QLabel* TextLabel1;