summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog4
-rw-r--r--core/pim/today/opie-today.control2
-rw-r--r--core/pim/today/today.cpp17
-rw-r--r--core/pim/today/today.h4
-rw-r--r--core/pim/today/todayconfig.cpp14
-rw-r--r--core/pim/today/todayconfig.h1
6 files changed, 39 insertions, 3 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index 25d63ef..eb2496a 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,2 +1,6 @@
10.5.2
2
3* refresh settings
4
10.5.1 50.5.1
2 6
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control
index 28087f9..267a195 100644
--- a/core/pim/today/opie-today.control
+++ b/core/pim/today/opie-today.control
@@ -4,5 +4,5 @@ Section: opie/applications
4Maintainer: Maximilian Reiß <harlekin@handhelds.org> 4Maintainer: Maximilian Reiß <harlekin@handhelds.org>
5Architecture: arm 5Architecture: arm
6Version: 0.5.1-$SUB_VERSION 6Version: 0.5.2-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION)
8License: GPL 8License: GPL
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index dd98824..8184730 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -66,4 +66,7 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
66 66
67 setOwnerField(); 67 setOwnerField();
68 m_refreshTimer = new QTimer( this );
69 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
70 m_refreshTimer->start( 15000 );
68 refresh(); 71 refresh();
69 showMaximized(); 72 showMaximized();
@@ -82,4 +85,12 @@ void Today::channelReceived( const QCString &msg, const QByteArray & data ) {
82} 85}
83 86
87void Today::setRefreshTimer( int interval ) {
88
89 if ( m_refreshTimerEnabled ) {
90 m_refreshTimer->changeInterval( interval );
91 }
92}
93
94
84/** 95/**
85 * Initialises the owner field with the default value, the username 96 * Initialises the owner field with the default value, the username
@@ -112,10 +123,13 @@ void Today::init() {
112 // read config 123 // read config
113 Config cfg( "today" ); 124 Config cfg( "today" );
114 cfg.setGroup( "Plugins" );
115 125
126 cfg.setGroup( "Plugins" );
116 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 127 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
117 m_allApplets = cfg.readListEntry( "AllApplets", ',' ); 128 m_allApplets = cfg.readListEntry( "AllApplets", ',' );
129
118 cfg.setGroup( "General" ); 130 cfg.setGroup( "General" );
119 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 131 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
132 m_refreshTimer->changeInterval( cfg.readNumEntry( "checkinterval", 15000 ) );
133
120} 134}
121 135
@@ -294,4 +308,5 @@ void Today::refresh() {
294 init(); 308 init();
295 309
310 qDebug(" refresh ");
296 // set the date in top label 311 // set the date in top label
297 QDate date = QDate::currentDate(); 312 QDate date = QDate::currentDate();
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 6f13df6..4485a0b 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -57,4 +57,5 @@ private:
57 void loadPlugins(); 57 void loadPlugins();
58 void draw(); 58 void draw();
59 void setRefreshTimer( int );
59 60
60private slots: 61private slots:
@@ -66,4 +67,7 @@ private slots:
66 QStringList m_allApplets; 67 QStringList m_allApplets;
67 68
69 QTimer *m_refreshTimer;
70
71 bool m_refreshTimerEnabled;
68 int m_newStart; 72 int m_newStart;
69 int m_iconSize; 73 int m_iconSize;
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index f9dd8f7..db1141a 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -100,7 +100,17 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
100 QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) ); 100 QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) );
101 101
102 QHBox *hbox_refresh = new QHBox( tab_3 );
103 QLabel *refreshLabel = new QLabel( hbox_refresh );
104 refreshLabel->setText( tr( "Refresh" ) );
105 QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
106 SpinRefresh = new QSpinBox( hbox_refresh );
107 SpinRefresh->setMinValue( 2 );
108 SpinRefresh->setSuffix( tr( " seconds" ) );
109 QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
110
102 tab3Layout->addWidget( hbox_auto ); 111 tab3Layout->addWidget( hbox_auto );
103 tab3Layout->addWidget( hbox_inactive ); 112 tab3Layout->addWidget( hbox_inactive );
104 tab3Layout->addWidget( hbox_iconSize ); 113 tab3Layout->addWidget( hbox_iconSize );
114 tab3Layout->addWidget( hbox_refresh );
105 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); 115 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
106 116
@@ -147,4 +157,6 @@ void TodayConfig::readConfig() {
147 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 157 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
148 SpinBoxIconSize->setValue( m_iconSize ); 158 SpinBoxIconSize->setValue( m_iconSize );
159 SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
160
149 161
150 cfg.setGroup( "Plugins" ); 162 cfg.setGroup( "Plugins" );
@@ -193,5 +205,5 @@ void TodayConfig::writeConfig() {
193 cfg.setGroup( "General" ); 205 cfg.setGroup( "General" );
194 cfg.writeEntry( "IconSize", m_iconSize ); 206 cfg.writeEntry( "IconSize", m_iconSize );
195 207 cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 );
196 208
197 // set autostart settings 209 // set autostart settings
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 827e106..68483c2 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -68,4 +68,5 @@ private:
68 QLabel* TimeLabel; 68 QLabel* TimeLabel;
69 QSpinBox* SpinBoxTime; 69 QSpinBox* SpinBoxTime;
70 QSpinBox* SpinRefresh;
70 QSpinBox* SpinBoxIconSize; 71 QSpinBox* SpinBoxIconSize;
71}; 72};