summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -83,113 +83,115 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags
QHBox *hbox_inactive = new QHBox( tab_3 );
TimeLabel = new QLabel( hbox_inactive , "TimeLabel" );
TimeLabel->setText( tr( "minutes inactive" ) );
SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
tab3Layout->addWidget( hbox_auto );
tab3Layout->addWidget( hbox_inactive );
TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
m_applets_changed = false;
connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) );
readConfig();
showMaximized();
}
/**
* 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
*/
void TodayConfig::writeConfig() {
Config cfg( "today" );
cfg.setGroup( "Plugins" );
if ( m_applets_changed ) {
QStringList exclude;
QStringList include;
QStringList all_applets;
QListViewItemIterator list_it( m_appletListView );
// this makes sure the names get saved in the order selected
for ( ; list_it.current(); ++list_it ) {
QMap <QString, QCheckListItem *>::Iterator it;
for ( it = m_applets.begin(); it != m_applets. end (); ++it ) {
if ( list_it.current() == (*it) && !(*it)-> isOn () ) {
exclude << it.key();
} else if ( list_it.current() == (*it) && (*it)-> isOn () ){
include << it.key();
}
if ( list_it.current() == (*it) ) {
all_applets << it.key();
}
}
}
cfg.writeEntry( "ExcludeApplets", exclude, ',' );
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 );
}
}
void TodayConfig::moveSelectedDown() {
QListViewItem *item = m_appletListView->selectedItem();
if ( item && item->itemBelow() ) {
item->moveItem( item->itemBelow() );
}
}
/**
* Set up the icons in the order/active tab
*/
void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon ) {
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
@@ -33,39 +33,39 @@ class TodayConfig : public QDialog {
public:
TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~TodayConfig();
OTabWidget* TabWidget3;
void writeConfig();
void pluginManagement( QString libName, QString name, QPixmap icon );
protected slots:
void appletChanged();
void moveSelectedUp();
void moveSelectedDown();
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;
QSpinBox* SpinBox7;
QLabel* TimeLabel;
QSpinBox* SpinBoxTime;
};
#endif