summaryrefslogtreecommitdiff
Unidiff
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 @@
1TODO for today: 1TODO for today:
2 2
3- all icons clickable
4
5- retail rom mail plugin (z)
6
7- autostart on retail rom (Z)
8
3* show "upcoming appointents the next days 9* show "upcoming appointents the next days
4 10
5* show alarm icons on alarm events (partly done) 11* show alarm icons on alarm events (partly done)
6 12
7* qcop integration for updating events? 13* qcop integration for updating events?
8 14
9 15
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
@@ -95,47 +95,46 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags
95 readConfig(); 95 readConfig();
96 showMaximized(); 96 showMaximized();
97} 97}
98 98
99 99
100/** 100/**
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 */
104void TodayConfig::setAutoStart() { 104void 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}
119 118
120/** 119/**
121 * Read the config part 120 * Read the config part
122 */ 121 */
123void TodayConfig::readConfig() { 122void 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/**
136 * Write the config part 135 * Write the config part
137 */ 136 */
138void TodayConfig::writeConfig() { 137void TodayConfig::writeConfig() {
139 Config cfg( "today" ); 138 Config cfg( "today" );
140 cfg.setGroup( "Plugins" ); 139 cfg.setGroup( "Plugins" );
141 if ( m_applets_changed ) { 140 if ( m_applets_changed ) {
@@ -159,25 +158,28 @@ void TodayConfig::writeConfig() {
159 } 158 }
160 } 159 }
161 } 160 }
162 cfg.writeEntry( "ExcludeApplets", exclude, ',' ); 161 cfg.writeEntry( "ExcludeApplets", exclude, ',' );
163 cfg.writeEntry( "IncludeApplets", include, ',' ); 162 cfg.writeEntry( "IncludeApplets", include, ',' );
164 cfg.writeEntry( "AllApplets", all_applets, ',' ); 163 cfg.writeEntry( "AllApplets", all_applets, ',' );
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
175void TodayConfig::moveSelectedUp() { 177void TodayConfig::moveSelectedUp() {
176 QListViewItem *item = m_appletListView->selectedItem(); 178 QListViewItem *item = m_appletListView->selectedItem();
177 if ( item && item->itemAbove() ) { 179 if ( item && item->itemAbove() ) {
178 item->itemAbove()->moveItem( item ); 180 item->itemAbove()->moveItem( item );
179 } 181 }
180} 182}
181 183
182 184
183void TodayConfig::moveSelectedDown() { 185void TodayConfig::moveSelectedDown() {
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
@@ -45,25 +45,25 @@ protected slots:
45 void appletChanged(); 45 void appletChanged();
46 void moveSelectedUp(); 46 void moveSelectedUp();
47 void moveSelectedDown(); 47 void moveSelectedDown();
48 48
49private: 49private:
50 void setAutoStart(); 50 void setAutoStart();
51 void readConfig(); 51 void readConfig();
52 52
53 QListView* m_appletListView; 53 QListView* m_appletListView;
54 QMap<QString,QCheckListItem*> m_applets; 54 QMap<QString,QCheckListItem*> m_applets;
55 55
56 int m_autoStart; 56 int m_autoStart;
57 QString m_autoStartTimer; 57 int m_autoStartTimer;
58 QStringList m_excludeApplets; 58 QStringList m_excludeApplets;
59 bool m_applets_changed; 59 bool m_applets_changed;
60 60
61 QLabel* TextLabel2; 61 QLabel* TextLabel2;
62 QCheckBox* CheckBoxAuto; 62 QCheckBox* CheckBoxAuto;
63 QWidget* tab_2; 63 QWidget* tab_2;
64 QWidget* tab_3; 64 QWidget* tab_3;
65 QLabel* TextLabel1; 65 QLabel* TextLabel1;
66 QSpinBox* SpinBox7; 66 QSpinBox* SpinBox7;
67 QLabel* TimeLabel; 67 QLabel* TimeLabel;
68 QSpinBox* SpinBoxTime; 68 QSpinBox* SpinBoxTime;
69}; 69};