summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-09-19 08:10:37 (UTC)
committer harlekin <harlekin>2002-09-19 08:10:37 (UTC)
commit390fc683967b74607aa93a176db33b30cd63b9c6 (patch) (side-by-side diff)
tree1ac9846defcf76f180cc419c40b6a9f67fba7f5f
parent474222487ba86a76b7d494aefd250222327ca12e (diff)
downloadopie-390fc683967b74607aa93a176db33b30cd63b9c6.zip
opie-390fc683967b74607aa93a176db33b30cd63b9c6.tar.gz
opie-390fc683967b74607aa93a176db33b30cd63b9c6.tar.bz2
fixed config option
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp10
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.cpp5
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.cpp6
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.h1
4 files changed, 10 insertions, 12 deletions
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp
index f5f6ed6..7ab27a0 100644
--- a/core/pim/today/plugins/todolist/todoplugin.cpp
+++ b/core/pim/today/plugins/todolist/todoplugin.cpp
@@ -32,7 +32,7 @@ QString TodolistPlugin::pluginName() const {
}
double TodolistPlugin::versionNumber() const {
- return 0.1;
+ return 0.7;
}
QString TodolistPlugin::pixmapNameWidget() const {
@@ -52,7 +52,7 @@ ConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) {
}
QString TodolistPlugin::appName() const {
- return "Todolist";
+ return QObject::tr( "Todolist" );
}
int TodolistPlugin::minHeight() const {
@@ -63,9 +63,3 @@ int TodolistPlugin::maxHeight() const {
return 100;
}
-
-
-
- int main() {
-}
-
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp
index da81600..2d8f1b6 100644
--- a/core/pim/today/plugins/todolist/todopluginconfig.cpp
+++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp
@@ -50,7 +50,7 @@ TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name)
}
void TodolistPluginConfig::readConfig() {
- Config cfg( "todaydatebookplugin" );
+ Config cfg( "todaytodoplugin" );
cfg.setGroup( "config" );
m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 );
SpinBox2->setValue( m_max_lines_task );
@@ -58,8 +58,9 @@ void TodolistPluginConfig::readConfig() {
void TodolistPluginConfig::writeConfig() {
- Config cfg( "todaydatebookplugin" );
+ Config cfg( "todaytodoplugin" );
cfg.setGroup( "config" );
+ m_max_lines_task = SpinBox2->value();
cfg.writeEntry( "maxlinestask", m_max_lines_task );
cfg.write();
}
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp
index 2a0e5a3..4731b43 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.cpp
+++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp
@@ -31,8 +31,8 @@ TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name)
: QWidget(parent, name ) {
todoLabel= 0l;
-
todo = 0l;
+
if ( todo ) {
delete todo;
}
@@ -47,8 +47,9 @@ TodolistPluginWidget::~TodolistPluginWidget() {
delete todo;
}
+
void TodolistPluginWidget::readConfig() {
- Config cfg( "todaytodolistplugin" );
+ Config cfg( "todaytodoplugin" );
cfg.setGroup( "config" );
m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 );
}
@@ -68,6 +69,7 @@ void TodolistPluginWidget::getTodo() {
todoLabel = new OClickableLabel( this );
todoLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) );
+
QString output;
QString tmpout;
int count = 0;
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.h b/core/pim/today/plugins/todolist/todopluginwidget.h
index ccc312a..970f430 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.h
+++ b/core/pim/today/plugins/todolist/todopluginwidget.h
@@ -38,6 +38,7 @@ protected slots:
private:
OClickableLabel *todoLabel;
ToDoDB *todo;
+
void readConfig();
void getTodo();
int m_maxLinesTask;