summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-09 20:54:29 (UTC)
committer zautrix <zautrix>2005-04-09 20:54:29 (UTC)
commitae58b2fe29fcd8b3690dcbb6d64976674f6294e0 (patch) (side-by-side diff)
tree7a321b610fa1f7cab980370a44bf78fea88bf481
parent9e43ebbe5867b2da957bb17c35bd357715424cba (diff)
downloadkdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.zip
kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.tar.gz
kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.tar.bz2
cool
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp2
-rw-r--r--libkcal/todo.cpp16
-rw-r--r--microkde/kglobalsettings.cpp10
-rw-r--r--microkde/kglobalsettings.h1
4 files changed, 27 insertions, 2 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 66f8d06..8cb6b83 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -129,7 +129,7 @@ void KOTodoViewItem::construct()
QTime t = mTodo->runStart().time();
skeyt.sprintf("%02d%02d",t.hour(),t.minute());
skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
- keyd = KGlobal::locale()->formatDate( d );
+ keyd = KGlobal::locale()->formatDate( d , true);
keyt = KGlobal::locale()->formatTime( t );
} else {
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 7dee4cd..c008fe1 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -19,8 +19,10 @@
*/
#include <kglobal.h>
+#include <kglobalsettings.h>
#include <klocale.h>
#include <kdebug.h>
+#include <qregexp.h>
#include "todo.h"
@@ -75,7 +77,19 @@ void Todo::setRunning( bool run )
void Todo::saveRunningInfoToFile()
{
- qDebug("Todo::saveRunningInfoToFile() ");
+ qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1());
+
+ QString dir = KGlobalSettings::timeTrackerDir();
+ qDebug("%s ", dir.latin1());
+ QString file = "%1-%2-%3-%4-%5-%6-%7.tt";
+
+ file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ).arg( mRunStart.time().msec(), 3 );
+ file.replace ( QRegExp (" "), "0" );
+ file = dir +"/" +file;
+ qDebug("%s ", file.latin1());
+
+
+
}
int Todo::runTime()
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index b837b23..e54b0d9 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -37,6 +37,16 @@ QFont KGlobalSettings::generalMaxFont()
f.setPointSize( size );
return f;
}
+
+QString KGlobalSettings::timeTrackerDir()
+{
+ static QString dir;
+ if ( dir.isEmpty() ) {
+ dir = locateLocal( "data", "timetracker" );
+ }
+ return dir;
+}
+
QFont KGlobalSettings::toolBarFont()
{
return QApplication::font();
diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h
index 075bb1c..3eeda35 100644
--- a/microkde/kglobalsettings.h
+++ b/microkde/kglobalsettings.h
@@ -17,6 +17,7 @@ class KGlobalSettings
static QColor toolBarHighlightColor();
static QRect desktopGeometry( QWidget * );
+ static QString timeTrackerDir();
/**
* Returns whether KDE runs in single (default) or double click