summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-05 11:20:37 (UTC)
committer harlekin <harlekin>2003-12-05 11:20:37 (UTC)
commit2b37759fc317b5efd9b371210b16117f7d346455 (patch) (side-by-side diff)
treef99beb5ff1c886f9b41a2d3a34300f8f121cf738
parent1ef5137234e2b7cd0be2a220a86d848503196269 (diff)
downloadopie-2b37759fc317b5efd9b371210b16117f7d346455.zip
opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.gz
opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.bz2
today in HEAD up to date
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/.cvsignore2
-rw-r--r--core/pim/today/changelog6
-rw-r--r--core/pim/today/main.cpp16
-rw-r--r--core/pim/today/plugin.cpp17
-rw-r--r--core/pim/today/plugins/datebook/.cvsignore1
-rw-r--r--core/pim/today/plugins/datebook/config.in2
-rw-r--r--core/pim/today/plugins/datebook/datebook.pro19
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp48
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.h5
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp7
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.h1
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp38
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h4
-rw-r--r--core/pim/today/plugins/mail/config.in2
-rw-r--r--core/pim/today/plugins/mail/mail.pro20
-rw-r--r--core/pim/today/plugins/mail/mailplugin.cpp3
-rw-r--r--core/pim/today/plugins/mail/mailplugin.h1
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp2
-rw-r--r--core/pim/today/plugins/mail/opie-today-mailplugin.control9
-rw-r--r--core/pim/today/plugins/todolist/.cvsignore1
-rw-r--r--core/pim/today/plugins/todolist/config.in2
-rw-r--r--core/pim/today/plugins/todolist/todolist.pro19
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp8
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.h1
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.cpp13
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.h1
-rw-r--r--core/pim/today/today.cpp17
-rw-r--r--core/pim/today/today.pro7
-rw-r--r--core/pim/today/todayconfig.cpp73
-rw-r--r--core/pim/today/todayconfig.h13
30 files changed, 199 insertions, 159 deletions
diff --git a/core/pim/today/.cvsignore b/core/pim/today/.cvsignore
index 1ee9a27..11e7045 100644
--- a/core/pim/today/.cvsignore
+++ b/core/pim/today/.cvsignore
@@ -2,2 +2,4 @@
Makefile*
moc_*
+todayconfigmiscbase.cpp
+todayconfigmiscbase.h
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index a77e581..b492435 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,2 +1,8 @@
+0.7
+
+* now all plugins in a big scrollview
+* config dialogs guis are ui files now
+* plugin interface has one new virtual method - reinitialize ( used when coming back from config dialog )
+
0.6.2
diff --git a/core/pim/today/main.cpp b/core/pim/today/main.cpp
index 72c0a2e..156cd0f 100644
--- a/core/pim/today/main.cpp
+++ b/core/pim/today/main.cpp
@@ -20,17 +20,5 @@
#include "today.h"
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-QPEApplication *todayApp;
-
-int main( int argc, char ** argv )
-{
- QPEApplication a(argc, argv);
- todayApp=&a;
-
- Today t;
-
- t.setCaption( Today::tr("Today") );
- a.showMainWidget(&t);
-
- return a.exec();
-}
+OPIE_EXPORT_APP( OApplicationFactory<Today> )
diff --git a/core/pim/today/plugin.cpp b/core/pim/today/plugin.cpp
deleted file mode 100644
index 349413b..0000000
--- a/core/pim/today/plugin.cpp
+++ b/dev/null
@@ -1,17 +0,0 @@
-#include "today.h"
-#include <qwidget.h>
-#include <qcombobox.h>
-#include <oappplugin.h>
-
-#define Q_BASEINSTANCE( i ) \
- QUnknownInterface* iface = 0; \
- i->queryInterface( IID_QUnknown, &iface ); \
- return iface
-
-Q_EXPORT_INTERFACE()
-{
- Today *t = new Today;
- t->setCaption( Today::tr("Today") );
- OAppPlugin *comp = new OAppPlugin(t);
- Q_BASEINSTANCE( comp );
-}
diff --git a/core/pim/today/plugins/datebook/.cvsignore b/core/pim/today/plugins/datebook/.cvsignore
index 2888d4a..10cf625 100644
--- a/core/pim/today/plugins/datebook/.cvsignore
+++ b/core/pim/today/plugins/datebook/.cvsignore
@@ -1,2 +1,3 @@
Makefile*
+datebookpluginconfigbase*
moc*
diff --git a/core/pim/today/plugins/datebook/config.in b/core/pim/today/plugins/datebook/config.in
index 621510f..7a14438 100644
--- a/core/pim/today/plugins/datebook/config.in
+++ b/core/pim/today/plugins/datebook/config.in
@@ -1,4 +1,4 @@
config TODAY_DATEBOOK
- boolean "opie-today-datebookplugin (datebook plugin)"
+ boolean "datebook"
default "y"
depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro
index bd45f71..1f75964 100644
--- a/core/pim/today/plugins/datebook/datebook.pro
+++ b/core/pim/today/plugins/datebook/datebook.pro
@@ -19,3 +19,22 @@ DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todaydatebookplugin
+TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
+ ../../../../../i18n/nl/libtodaydatebookplugin.ts \
+ ../../../../../i18n/xx/libtodaydatebookplugin.ts \
+ ../../../../../i18n/en/libtodaydatebookplugin.ts \
+ ../../../../../i18n/es/libtodaydatebookplugin.ts \
+ ../../../../../i18n/fr/libtodaydatebookplugin.ts \
+ ../../../../../i18n/hu/libtodaydatebookplugin.ts \
+ ../../../../../i18n/ja/libtodaydatebookplugin.ts \
+ ../../../../../i18n/ko/libtodaydatebookplugin.ts \
+ ../../../../../i18n/no/libtodaydatebookplugin.ts \
+ ../../../../../i18n/pl/libtodaydatebookplugin.ts \
+ ../../../../../i18n/pt/libtodaydatebookplugin.ts \
+ ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
+ ../../../../../i18n/sl/libtodaydatebookplugin.ts \
+ ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
+ ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
+ ../../../../../i18n/it/libtodaydatebookplugin.ts \
+ ../../../../../i18n/da/libtodaydatebookplugin.ts
+
include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp
index 3c1e97a..e595047 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -2,5 +2,5 @@
* datebookevent.cpp
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003 by Maximilian Reiß
* email : harlekin@handhelds.org
*
@@ -20,4 +20,5 @@
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
+#include <qpe/calendar.h>
#include <opie/odevice.h>
@@ -29,4 +30,5 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
bool show_location,
bool show_notes,
+ bool timeExtraLine,
int maxCharClip,
const char* name,
@@ -53,15 +55,23 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
}
+ QString timeSpacer = " ";
+ if ( timeExtraLine ) {
+ timeSpacer = "<br>";
+ }
+
if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
&& ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
- msg += "<br>All day";
+ msg += tr ( "All day" );
} else {
// start time of event
- QDate tempDate = (ev).event().start().date();
- msg += "<br>"
- + ampmTime( QTime( (ev).event().start().time() ) )
+// QDate tempDate = (ev).event().start().date();
+ msg += timeSpacer;
+ msg += ampmTime( QTime( (ev).event().start().time() ) )
// end time of event
- + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) )
- + differDate( tempDate );
+ + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) );
+ }
+
+ if ( (ev).date() != QDate::currentDate() ) {
+ msg += differDate( (ev).date() /* tempDate*/ );
}
@@ -102,16 +112,16 @@ QString DateBookEvent::ampmTime( QTime tm ) {
QString DateBookEvent::differDate( QDate date ) {
- QDate currentDate = QDate::currentDate();
+// QDate currentDate = QDate::currentDate();
QString returnText = "<font color = #407DD9><b> ";
- int differDate = currentDate.daysTo( date );
- if ( currentDate.dayOfWeek() == date.dayOfWeek() ) {
- returnText += "" ;
- // not working right for recurring events
- //} else if ( differDate == 1 ) {
- //returnText += tr( "tomorrow" );
- } else {
- //returnText += tr( "in %1 days" ).arg( differDate );
- returnText += " [ " + date.dayName( date.dayOfWeek() ) + " ] ";
- }
+// int differDate = currentDate.daysTo( date );
+// if ( currentDate.dayOfWeek() == date.dayOfWeek() ) {
+// returnText += "" ;
+// // not working right for recurring events
+// //} else if ( differDate == 1 ) {
+// //returnText += tr( "tomorrow" );
+// } else {
+// returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
+// }
+ returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
returnText += "</b></font>";
return returnText;
@@ -127,5 +137,5 @@ void DateBookEvent::editEventSlot( const Event &e ) {
QCopEnvelope env( "QPE/Application/datebook", "raise()" );
} else {
- QCopEnvelope env( "QPE/Datebook", "editEvent(int)" );
+ QCopEnvelope env( "QPE/Application/datebook", "editEvent(int)" );
env << e.uid();
}
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h
index 8027809..1a090e3 100644
--- a/core/pim/today/plugins/datebook/datebookevent.h
+++ b/core/pim/today/plugins/datebook/datebookevent.h
@@ -2,5 +2,5 @@
* datebookplugin.h
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003 by Maximilian Reiß
* email : harlekin@handhelds.org
*
@@ -31,8 +31,10 @@ public:
bool show_location = 0,
bool show_notes = 0,
+ bool timeExtraLine = 0,
int maxCharClip = 0,
const char* name = 0,
WFlags fl = 0 );
~DateBookEvent();
+
signals:
void editEvent( const Event &e );
@@ -41,4 +43,5 @@ private slots:
void editEventSlot( const Event &e );
void editMe();
+
private:
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp
index 4e650ee..f77e440 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.cpp
+++ b/core/pim/today/plugins/datebook/datebookplugin.cpp
@@ -70,2 +70,9 @@ void DatebookPlugin::refresh() {
}
}
+
+void DatebookPlugin::reinitialize() {
+ if ( m_widget ) {
+ m_widget->reinitialize();
+ }
+}
+
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h
index db899e8..890c59b 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.h
+++ b/core/pim/today/plugins/datebook/datebookplugin.h
@@ -40,4 +40,5 @@ public:
bool excludeFromRefresh() const;
void refresh();
+ void reinitialize();
private:
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 1970654..9e95bcd 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -31,9 +31,4 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
m_layoutDates = 0l;
- if ( db ) {
- delete db;
- }
- db = new DateBookDB;
-
if ( m_layoutDates ) {
delete m_layoutDates;
@@ -46,5 +41,4 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
readConfig();
getDates();
- m_layoutDates->addStretch(5);
}
@@ -63,4 +57,10 @@ void DatebookPluginWidget::readConfig() {
m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
m_moreDays = cfg.readNumEntry( "moredays", 0 );
+ m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
+}
+
+void DatebookPluginWidget::reinitialize() {
+ readConfig();
+ refresh();
}
@@ -75,5 +75,4 @@ void DatebookPluginWidget::refresh() {
getDates();
- m_layoutDates->addStretch(5);
}
@@ -83,4 +82,10 @@ void DatebookPluginWidget::refresh() {
void DatebookPluginWidget::getDates() {
+
+ if ( db ) {
+ delete db;
+ }
+ db = new DateBookDB;
+
QDate date = QDate::currentDate();
QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
@@ -95,12 +100,24 @@ void DatebookPluginWidget::getDates() {
if ( !m_onlyLater ) {
count++;
- DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
+ DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
l->show();
QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
- } else if ( QDateTime::currentDateTime() <= (*it).event().end() || (*it).event().start().date() != date ) {
+ } else {
+ if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
+ // Show events which span over many days and are not elapsed.
+ || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
+ // Show repeated event for today that is not elapsed.
+ || ( ( (*it).event().repeatType() != Event::NoRepeat )
+ && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
+ && ( QTime::currentTime() < (*it).event().start().time() ) ) )
+ // Show repeated event for next days.
+ || ( ( (*it).event().repeatType() != Event::NoRepeat )
+ && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
+ )
+ {
count++;
// show only later appointments
- DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
+ DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
l->show();
@@ -109,4 +126,5 @@ void DatebookPluginWidget::getDates() {
}
}
+ }
if ( m_onlyLater && count == 0 ) {
QLabel* noMoreEvents = new QLabel( this );
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h
index 35d43cd..8988073 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.h
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h
@@ -35,4 +35,5 @@ public:
~DatebookPluginWidget();
void refresh();
+ void reinitialize();
private:
@@ -53,5 +54,6 @@ private:
bool m_onlyLater;
int m_moreDays;
-
+ // true if time of an appointment should be an extra line
+ bool m_timeExtraLine;
};
diff --git a/core/pim/today/plugins/mail/config.in b/core/pim/today/plugins/mail/config.in
index 6f3e06d..6f4450f 100644
--- a/core/pim/today/plugins/mail/config.in
+++ b/core/pim/today/plugins/mail/config.in
@@ -1,4 +1,4 @@
config TODAY_MAIL
- boolean "opie-today-mailplugin (mail plugin)"
+ boolean "mail"
default "y"
depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro
index 60ed87d..70c484d 100644
--- a/core/pim/today/plugins/mail/mail.pro
+++ b/core/pim/today/plugins/mail/mail.pro
@@ -1,5 +1,5 @@
TEMPLATE = lib
CONFIG -= moc
-CONFIG += qt plugin release
+CONFIG += qt release
# Input
@@ -17,3 +17,21 @@ DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todaymailplugin
+TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
+ ../../../../../i18n/nl/libtodaymailplugin.ts \
+ ../../../../../i18n/xx/libtodaymailplugin.ts \
+ ../../../../../i18n/en/libtodaymailplugin.ts \
+ ../../../../../i18n/es/libtodaymailplugin.ts \
+ ../../../../../i18n/fr/libtodaymailplugin.ts \
+ ../../../../../i18n/hu/libtodaymailplugin.ts \
+ ../../../../../i18n/ja/libtodaymailplugin.ts \
+ ../../../../../i18n/ko/libtodaymailplugin.ts \
+ ../../../../../i18n/no/libtodaymailplugin.ts \
+ ../../../../../i18n/pl/libtodaymailplugin.ts \
+ ../../../../../i18n/pt/libtodaymailplugin.ts \
+ ../../../../../i18n/pt_BR/libtodaymailplugin.ts \
+ ../../../../../i18n/sl/libtodaymailplugin.ts \
+ ../../../../../i18n/zh_CN/libtodaymailplugin.ts \
+ ../../../../../i18n/zh_TW/libtodaymailplugin.ts \
+ ../../../../../i18n/it/libtodaymailplugin.ts \
+ ../../../../../i18n/da/libtodaymailplugin.ts
include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp
index 9430c30..bf30538 100644
--- a/core/pim/today/plugins/mail/mailplugin.cpp
+++ b/core/pim/today/plugins/mail/mailplugin.cpp
@@ -68,2 +68,5 @@ void MailPlugin::refresh() {
}
}
+
+void MailPlugin::reinitialize() {
+}
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h
index 295a88c..5b93314 100644
--- a/core/pim/today/plugins/mail/mailplugin.h
+++ b/core/pim/today/plugins/mail/mailplugin.h
@@ -42,4 +42,5 @@ public:
bool excludeFromRefresh() const;
void refresh();
+ void reinitialize();
private:
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index 3c1d908..646996a 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -30,5 +30,5 @@ MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
}
m_mailLabel = new OClickableLabel( this );
- m_mailLabel->setMaximumHeight( 15 );
+ //m_mailLabel->setMaximumHeight( 15 );
connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
diff --git a/core/pim/today/plugins/mail/opie-today-mailplugin.control b/core/pim/today/plugins/mail/opie-today-mailplugin.control
index 1419557..e69de29 100644
--- a/core/pim/today/plugins/mail/opie-today-mailplugin.control
+++ b/core/pim/today/plugins/mail/opie-today-mailplugin.control
@@ -1,9 +0,0 @@
-Package: opie-today-mailplugin
-Files: plugins/today/libtodaymailplugin.so*
-Priority: optional
-Section: opie/applications
-Maintainer: Maximilian Reiss <harlekin@handhelds.org>
-Architecture: arm
-Version: $QPE_VERSION-$SUB_VERSION
-Depends: libqte2, opie-today
-Description: Mail plugin for today
diff --git a/core/pim/today/plugins/todolist/.cvsignore b/core/pim/today/plugins/todolist/.cvsignore
index 2888d4a..b9284b8 100644
--- a/core/pim/today/plugins/todolist/.cvsignore
+++ b/core/pim/today/plugins/todolist/.cvsignore
@@ -1,2 +1,3 @@
Makefile*
+todopluginconfigbase*
moc*
diff --git a/core/pim/today/plugins/todolist/config.in b/core/pim/today/plugins/todolist/config.in
index c862f37..48ba226 100644
--- a/core/pim/today/plugins/todolist/config.in
+++ b/core/pim/today/plugins/todolist/config.in
@@ -1,4 +1,4 @@
config TODAY_TODOLIST
- boolean "opie-today-todolistplugin (shows the next todo entries)"
+ boolean "todolist"
default "y"
depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro
index 0343223..6a63f4e 100644
--- a/core/pim/today/plugins/todolist/todolist.pro
+++ b/core/pim/today/plugins/todolist/todolist.pro
@@ -20,3 +20,22 @@ DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todaytodolistplugin
+TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \
+ ../../../../../i18n/nl/libtodaytodolistplugin.ts \
+ ../../../../../i18n/xx/libtodaytodolistplugin.ts \
+ ../../../../../i18n/en/libtodaytodolistplugin.ts \
+ ../../../../../i18n/es/libtodaytodolistplugin.ts \
+ ../../../../../i18n/fr/libtodaytodolistplugin.ts \
+ ../../../../../i18n/hu/libtodaytodolistplugin.ts \
+ ../../../../../i18n/ja/libtodaytodolistplugin.ts \
+ ../../../../../i18n/ko/libtodaytodolistplugin.ts \
+ ../../../../../i18n/no/libtodaytodolistplugin.ts \
+ ../../../../../i18n/pl/libtodaytodolistplugin.ts \
+ ../../../../../i18n/pt/libtodaytodolistplugin.ts \
+ ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \
+ ../../../../../i18n/sl/libtodaytodolistplugin.ts \
+ ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \
+ ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \
+ ../../../../../i18n/it/libtodaytodolistplugin.ts \
+ ../../../../../i18n/da/libtodaytodolistplugin.ts
+
include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp
index 7eeb8f1..801de9d 100644
--- a/core/pim/today/plugins/todolist/todoplugin.cpp
+++ b/core/pim/today/plugins/todolist/todoplugin.cpp
@@ -2,5 +2,5 @@
* todoplugin.cpp
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002,2003 by Maximilian Reiß
* email : harlekin@handhelds.org
*
@@ -69,2 +69,8 @@ void TodolistPlugin::refresh() {
}
}
+
+void TodolistPlugin::reinitialize() {
+ if ( m_widget ) {
+ m_widget->reinitialize();
+ }
+}
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h
index d7b51b4..f68162f 100644
--- a/core/pim/today/plugins/todolist/todoplugin.h
+++ b/core/pim/today/plugins/todolist/todoplugin.h
@@ -42,4 +42,5 @@ public:
bool excludeFromRefresh() const;
void refresh();
+ void reinitialize();
private:
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp
index 15081ec..0364f94 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.cpp
+++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp
@@ -65,4 +65,11 @@ void TodolistPluginWidget::readConfig() {
void TodolistPluginWidget:: refresh() {
+ todo->reload();
+ getTodo();
+}
+
+void TodolistPluginWidget::reinitialize() {
+ readConfig();
+ todo->reload();
getTodo();
}
@@ -80,5 +87,5 @@ void TodolistPluginWidget::getTodo() {
// get overdue todos first
- m_list = todo->overDue();
+ m_list = todo->sorted( true, 3, 2, 1);
for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
@@ -88,5 +95,5 @@ void TodolistPluginWidget::getTodo() {
desc = (*m_it).description();
}
- tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
+ tmpout += "<font color=#e00000><b>[" + QString("%1").arg((*m_it).priority() ) + "]" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
ammount++ ;
}
@@ -105,5 +112,5 @@ void TodolistPluginWidget::getTodo() {
desc = (*m_it).description();
}
- tmpout += "<b>-</b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
+ tmpout += "<b> [" + QString("%1").arg((*m_it).priority() ) + "] </b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
ammount++;
}
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.h b/core/pim/today/plugins/todolist/todopluginwidget.h
index 0db65c4..9cac43d 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.h
+++ b/core/pim/today/plugins/todolist/todopluginwidget.h
@@ -33,4 +33,5 @@ public:
void refresh();
+ void reinitialize();
protected slots:
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index dd8d59b..d4a0ae6 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -193,10 +193,5 @@ void Today::loadPlugins() {
QString path = QPEApplication::qpeDir() + "/plugins/today";
- qWarning("Searching for Plugins in: %s", path.latin1());
-#ifdef Q_OS_MACX
- QDir dir( path, "lib*.dylib" );
-#else
QDir dir( path, "lib*.so" );
-#endif
QStringList list = dir.entryList();
@@ -221,12 +216,9 @@ void Today::loadPlugins() {
QString type = (*it).left( (*it).find(".") );
- // grr, sharp rom does not know Global::languageList();
- // QStringList langs = Global::languageList();
- QString tfn = QPEApplication::qpeDir() + "/i18n/";
- QDir langDir = tfn;
- QStringList langs = langDir.entryList("*", QDir::Dirs );
+ QString lang;
+ Config config("locale");
+ config.setGroup("Language");
+ lang = config.readEntry( "Language", "en" );
- for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) {
- QString lang = *lit;
qDebug( "Languages: " + lang );
QTranslator * trans = new QTranslator( qApp );
@@ -237,5 +229,4 @@ void Today::loadPlugins() {
delete trans;
}
- }
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro
index 03ee795..2968e6a 100644
--- a/core/pim/today/today.pro
+++ b/core/pim/today/today.pro
@@ -2,10 +2,13 @@ CONFIG += qt warn on release quick-app
HEADERS = today.h todaybase.h todayconfig.h
-SOURCES = today.cpp todaybase.cpp todayconfig.cpp
+SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp
+INTERFACES = todayconfigmiscbase.ui
+
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
-INTERFACES =
+
TARGET = today
include ( $(OPIEDIR)/include.pro )
+}
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index a60f1d2..bfb5ec6 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -2,5 +2,5 @@
* todayconfig.cpp
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003 by Maximilian Reiß
* email : harlekin@handhelds.org
*
@@ -77,52 +77,11 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
+ // Misc tab
tab_3 = new QWidget( TabWidget3, "tab_3" );
QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
- tab3Layout->setMargin( 20 );
- QHBox *hbox_auto = new QHBox( tab_3 );
- TextLabel2 = new QLabel( hbox_auto, "AutoStart" );
- TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) );
- QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
- CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
- QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
-
- QHBox *hbox_hide = new QHBox( tab_3 );
- TextLabel4 = new QLabel( hbox_hide, "HideBanner" );
- TextLabel4->setText( tr( "Tiny Banner" ) );
- //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
- CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" );
- // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
-
- QHBox *hbox_inactive = new QHBox( tab_3 );
- TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
- TimeLabel->setText( tr( "minutes inactive" ) );
- QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
- SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
- SpinBoxTime->setMaxValue ( 1440 );
- QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
- QHBox *hbox_iconSize = new QHBox( tab_3 );
- QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
- iconSizeLabel->setText( tr( "Icon size" ) );
- QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) );
- SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" );
- SpinBoxIconSize->setMaxValue( 32 );
- QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) );
-
- QHBox *hbox_refresh = new QHBox( tab_3 );
- QLabel *refreshLabel = new QLabel( hbox_refresh );
- refreshLabel->setText( tr( "Refresh" ) );
- QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
- SpinRefresh = new QSpinBox( hbox_refresh );
- SpinRefresh->setMinValue( 0 );
- SpinRefresh->setSuffix( tr( " sec" ) );
- SpinRefresh->setMaxValue ( 7200 );
- SpinRefresh->setSpecialValueText ( tr("never") );
- QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
-
- tab3Layout->addWidget( hbox_auto );
- tab3Layout->addWidget( hbox_hide );
- tab3Layout->addWidget( hbox_inactive );
- tab3Layout->addWidget( hbox_iconSize );
- tab3Layout->addWidget( hbox_refresh );
+
+ m_guiMisc = new TodayConfigMiscBase( tab_3 );
+
+ tab3Layout->addWidget( m_guiMisc );
TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
@@ -162,13 +121,13 @@ void TodayConfig::readConfig() {
cfg.setGroup( "Autostart" );
m_autoStart = cfg.readNumEntry( "autostart", 1 );
- CheckBoxAuto->setChecked( m_autoStart );
+ m_guiMisc->CheckBoxAuto->setChecked( m_autoStart );
m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 );
- SpinBoxTime->setValue( m_autoStartTimer );
+ m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer );
cfg.setGroup( "General" );
m_iconSize = cfg.readNumEntry( "IconSize", 18 );
- SpinBoxIconSize->setValue( m_iconSize );
- SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
- CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
+ m_guiMisc->SpinBoxIconSize->setValue( m_iconSize );
+ m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
+ m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
@@ -210,14 +169,14 @@ void TodayConfig::writeConfig() {
cfg.setGroup( "Autostart" );
- m_autoStart = CheckBoxAuto->isChecked();
+ m_autoStart = m_guiMisc->CheckBoxAuto->isChecked();
cfg.writeEntry( "autostart", m_autoStart );
- m_autoStartTimer = SpinBoxTime->value();
+ m_autoStartTimer = m_guiMisc->SpinBoxTime->value();
cfg.writeEntry( "autostartdelay", m_autoStartTimer );
- m_iconSize = SpinBoxIconSize->value();
+ m_iconSize = m_guiMisc->SpinBoxIconSize->value();
cfg.setGroup( "General" );
cfg.writeEntry( "IconSize", m_iconSize );
- cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() );
- cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 );
+ cfg.writeEntry( "HideBanner", m_guiMisc->CheckBoxHide->isChecked() );
+ cfg.writeEntry( "checkinterval", m_guiMisc->SpinRefresh->value()*1000 );
// set autostart settings
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 41bd44b..0a7687c 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -2,5 +2,5 @@
* todayconfig.h
*
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002,2003 by Maximilian Reiß
* email : harlekin@handhelds.org
*
@@ -23,4 +23,7 @@
#include <opie/otabwidget.h>
+
+#include "todayconfigmiscbase.h"
+
class QCheckBox;
class QLabel;
@@ -60,14 +63,10 @@ private:
bool m_applets_changed;
- QLabel* TextLabel2;
- QCheckBox* CheckBoxAuto, *CheckBoxHide;
QWidget* tab_2;
QWidget* tab_3;
QLabel* TextLabel1, *TextLabel4;
QSpinBox* SpinBox7;
- QLabel* TimeLabel;
- QSpinBox* SpinBoxTime;
- QSpinBox* SpinRefresh;
- QSpinBox* SpinBoxIconSize;
+
+ TodayConfigMiscBase *m_guiMisc;
};