summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-05 11:20:37 (UTC)
committer harlekin <harlekin>2003-12-05 11:20:37 (UTC)
commit2b37759fc317b5efd9b371210b16117f7d346455 (patch) (unidiff)
treef99beb5ff1c886f9b41a2d3a34300f8f121cf738
parent1ef5137234e2b7cd0be2a220a86d848503196269 (diff)
downloadopie-2b37759fc317b5efd9b371210b16117f7d346455.zip
opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.gz
opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.bz2
today in HEAD up to date
Diffstat (more/less context) (ignore 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.cpp50
-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.cpp15
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.h1
-rw-r--r--core/pim/today/today.cpp33
-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, 214 insertions, 174 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 @@
2Makefile* 2Makefile*
3moc_* 3moc_*
4todayconfigmiscbase.cpp
5todayconfigmiscbase.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 @@
10.7
2
3* now all plugins in a big scrollview
4* config dialogs guis are ui files now
5* plugin interface has one new virtual method - reinitialize ( used when coming back from config dialog )
6
10.6.2 70.6.2
2 8
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 @@
20#include "today.h" 20#include "today.h"
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <opie/oapplicationfactory.h>
22 23
23QPEApplication *todayApp; 24OPIE_EXPORT_APP( OApplicationFactory<Today> )
24
25int main( int argc, char ** argv )
26{
27 QPEApplication a(argc, argv);
28 todayApp=&a;
29
30 Today t;
31
32 t.setCaption( Today::tr("Today") );
33 a.showMainWidget(&t);
34
35 return a.exec();
36}
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 @@
1#include "today.h"
2#include <qwidget.h>
3#include <qcombobox.h>
4#include <oappplugin.h>
5
6#define Q_BASEINSTANCE( i ) \
7 QUnknownInterface* iface = 0; \
8 i->queryInterface( IID_QUnknown, &iface ); \
9 return iface
10
11Q_EXPORT_INTERFACE()
12{
13 Today *t = new Today;
14 t->setCaption( Today::tr("Today") );
15 OAppPlugin *comp = new OAppPlugin(t);
16 Q_BASEINSTANCE( comp );
17}
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 @@
1Makefile* 1Makefile*
2datebookpluginconfigbase*
2moc* 3moc*
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 @@
1 config TODAY_DATEBOOK 1 config TODAY_DATEBOOK
2 boolean "opie-today-datebookplugin (datebook plugin)" 2 boolean "datebook"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 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
19TARGET = todaydatebookplugin 19TARGET = todaydatebookplugin
20 20
21TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
22 ../../../../../i18n/nl/libtodaydatebookplugin.ts \
23 ../../../../../i18n/xx/libtodaydatebookplugin.ts \
24 ../../../../../i18n/en/libtodaydatebookplugin.ts \
25 ../../../../../i18n/es/libtodaydatebookplugin.ts \
26 ../../../../../i18n/fr/libtodaydatebookplugin.ts \
27 ../../../../../i18n/hu/libtodaydatebookplugin.ts \
28 ../../../../../i18n/ja/libtodaydatebookplugin.ts \
29 ../../../../../i18n/ko/libtodaydatebookplugin.ts \
30 ../../../../../i18n/no/libtodaydatebookplugin.ts \
31 ../../../../../i18n/pl/libtodaydatebookplugin.ts \
32 ../../../../../i18n/pt/libtodaydatebookplugin.ts \
33 ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
34 ../../../../../i18n/sl/libtodaydatebookplugin.ts \
35 ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
36 ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
37 ../../../../../i18n/it/libtodaydatebookplugin.ts \
38 ../../../../../i18n/da/libtodaydatebookplugin.ts
39
21include ( $(OPIEDIR)/include.pro ) 40include ( $(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 @@
2 * datebookevent.cpp 2 * datebookevent.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002, 2003 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
@@ -20,4 +20,5 @@
20#include <qpe/qcopenvelope_qws.h> 20#include <qpe/qcopenvelope_qws.h>
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <qpe/calendar.h>
22 23
23#include <opie/odevice.h> 24#include <opie/odevice.h>
@@ -29,4 +30,5 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
29 bool show_location, 30 bool show_location,
30 bool show_notes, 31 bool show_notes,
32 bool timeExtraLine,
31 int maxCharClip, 33 int maxCharClip,
32 const char* name, 34 const char* name,
@@ -53,15 +55,23 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
53 } 55 }
54 56
57 QString timeSpacer = " ";
58 if ( timeExtraLine ) {
59 timeSpacer = "<br>";
60 }
61
55 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" ) 62 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
56 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) { 63 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
57 msg += "<br>All day"; 64 msg += tr ( "All day" );
58 } else { 65 } else {
59 // start time of event 66 // start time of event
60 QDate tempDate = (ev).event().start().date(); 67// QDate tempDate = (ev).event().start().date();
61 msg += "<br>" 68 msg += timeSpacer;
62 + ampmTime( QTime( (ev).event().start().time() ) ) 69 msg += ampmTime( QTime( (ev).event().start().time() ) )
63 // end time of event 70 // end time of event
64 + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) ) 71 + "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) );
65 + differDate( tempDate ); 72 }
73
74 if ( (ev).date() != QDate::currentDate() ) {
75 msg += differDate( (ev).date() /* tempDate*/ );
66 } 76 }
67 77
@@ -102,16 +112,16 @@ QString DateBookEvent::ampmTime( QTime tm ) {
102 112
103QString DateBookEvent::differDate( QDate date ) { 113QString DateBookEvent::differDate( QDate date ) {
104 QDate currentDate = QDate::currentDate(); 114// QDate currentDate = QDate::currentDate();
105 QString returnText = "<font color = #407DD9><b> "; 115 QString returnText = "<font color = #407DD9><b> ";
106 int differDate = currentDate.daysTo( date ); 116// int differDate = currentDate.daysTo( date );
107 if ( currentDate.dayOfWeek() == date.dayOfWeek() ) { 117// if ( currentDate.dayOfWeek() == date.dayOfWeek() ) {
108 returnText += "" ; 118// returnText += "" ;
109 // not working right for recurring events 119// // not working right for recurring events
110 //} else if ( differDate == 1 ) { 120// //} else if ( differDate == 1 ) {
111 //returnText += tr( "tomorrow" ); 121// //returnText += tr( "tomorrow" );
112 } else { 122// } else {
113 //returnText += tr( "in %1 days" ).arg( differDate ); 123// returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
114 returnText += " [ " + date.dayName( date.dayOfWeek() ) + " ] "; 124// }
115 } 125 returnText += " [ " + Calendar::nameOfDay( date.dayOfWeek() ) + " ] ";
116 returnText += "</b></font>"; 126 returnText += "</b></font>";
117 return returnText; 127 return returnText;
@@ -127,5 +137,5 @@ void DateBookEvent::editEventSlot( const Event &e ) {
127 QCopEnvelope env( "QPE/Application/datebook", "raise()" ); 137 QCopEnvelope env( "QPE/Application/datebook", "raise()" );
128 } else { 138 } else {
129 QCopEnvelope env( "QPE/Datebook", "editEvent(int)" ); 139 QCopEnvelope env( "QPE/Application/datebook", "editEvent(int)" );
130 env << e.uid(); 140 env << e.uid();
131 } 141 }
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 @@
2 * datebookplugin.h 2 * datebookplugin.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002, 2003 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
@@ -31,8 +31,10 @@ public:
31 bool show_location = 0, 31 bool show_location = 0,
32 bool show_notes = 0, 32 bool show_notes = 0,
33 bool timeExtraLine = 0,
33 int maxCharClip = 0, 34 int maxCharClip = 0,
34 const char* name = 0, 35 const char* name = 0,
35 WFlags fl = 0 ); 36 WFlags fl = 0 );
36 ~DateBookEvent(); 37 ~DateBookEvent();
38
37 signals: 39 signals:
38 void editEvent( const Event &e ); 40 void editEvent( const Event &e );
@@ -41,4 +43,5 @@ private slots:
41 void editEventSlot( const Event &e ); 43 void editEventSlot( const Event &e );
42 void editMe(); 44 void editMe();
45
43 private: 46 private:
44 47
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() {
70 } 70 }
71} 71}
72
73void DatebookPlugin::reinitialize() {
74 if ( m_widget ) {
75 m_widget->reinitialize();
76 }
77}
78
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:
40 bool excludeFromRefresh() const; 40 bool excludeFromRefresh() const;
41 void refresh(); 41 void refresh();
42 void reinitialize();
42 43
43 private: 44 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 )
31 m_layoutDates = 0l; 31 m_layoutDates = 0l;
32 32
33 if ( db ) {
34 delete db;
35 }
36 db = new DateBookDB;
37
38 if ( m_layoutDates ) { 33 if ( m_layoutDates ) {
39 delete m_layoutDates; 34 delete m_layoutDates;
@@ -46,5 +41,4 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
46 readConfig(); 41 readConfig();
47 getDates(); 42 getDates();
48 m_layoutDates->addStretch(5);
49} 43}
50 44
@@ -63,4 +57,10 @@ void DatebookPluginWidget::readConfig() {
63 m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); 57 m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
64 m_moreDays = cfg.readNumEntry( "moredays", 0 ); 58 m_moreDays = cfg.readNumEntry( "moredays", 0 );
59 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
60}
61
62void DatebookPluginWidget::reinitialize() {
63 readConfig();
64 refresh();
65} 65}
66 66
@@ -75,5 +75,4 @@ void DatebookPluginWidget::refresh() {
75 75
76 getDates(); 76 getDates();
77 m_layoutDates->addStretch(5);
78} 77}
79 78
@@ -83,4 +82,10 @@ void DatebookPluginWidget::refresh() {
83void DatebookPluginWidget::getDates() { 82void DatebookPluginWidget::getDates() {
84 83
84
85 if ( db ) {
86 delete db;
87 }
88 db = new DateBookDB;
89
85 QDate date = QDate::currentDate(); 90 QDate date = QDate::currentDate();
86 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) ); 91 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
@@ -95,16 +100,29 @@ void DatebookPluginWidget::getDates() {
95 if ( !m_onlyLater ) { 100 if ( !m_onlyLater ) {
96 count++; 101 count++;
97 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes ); 102 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
98 m_eventsList.append( l );
99 l->show();
100 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
101 } else if ( QDateTime::currentDateTime() <= (*it).event().end() || (*it).event().start().date() != date ) {
102 count++;
103 // show only later appointments
104 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
105 m_eventsList.append( l ); 103 m_eventsList.append( l );
106 l->show(); 104 l->show();
107 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 105 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
108 } 106 } else {
107 if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
108 // Show events which span over many days and are not elapsed.
109 || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
110 // Show repeated event for today that is not elapsed.
111 || ( ( (*it).event().repeatType() != Event::NoRepeat )
112 && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
113 && ( QTime::currentTime() < (*it).event().start().time() ) ) )
114 // Show repeated event for next days.
115 || ( ( (*it).event().repeatType() != Event::NoRepeat )
116 && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
117 )
118 {
119 count++;
120 // show only later appointments
121 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
122 m_eventsList.append( l );
123 l->show();
124 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
125 }
126 }
109 } 127 }
110 } 128 }
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:
35 ~DatebookPluginWidget(); 35 ~DatebookPluginWidget();
36 void refresh(); 36 void refresh();
37 void reinitialize();
37 38
38private: 39private:
@@ -53,5 +54,6 @@ private:
53 bool m_onlyLater; 54 bool m_onlyLater;
54 int m_moreDays; 55 int m_moreDays;
55 56 // true if time of an appointment should be an extra line
57 bool m_timeExtraLine;
56}; 58};
57 59
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 @@
1 config TODAY_MAIL 1 config TODAY_MAIL
2 boolean "opie-today-mailplugin (mail plugin)" 2 boolean "mail"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 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 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt plugin release 3CONFIG += qt release
4 4
5# Input 5# Input
@@ -17,3 +17,21 @@ DESTDIR = $(OPIEDIR)/plugins/today
17TARGET = todaymailplugin 17TARGET = todaymailplugin
18 18
19TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
20 ../../../../../i18n/nl/libtodaymailplugin.ts \
21 ../../../../../i18n/xx/libtodaymailplugin.ts \
22 ../../../../../i18n/en/libtodaymailplugin.ts \
23 ../../../../../i18n/es/libtodaymailplugin.ts \
24 ../../../../../i18n/fr/libtodaymailplugin.ts \
25 ../../../../../i18n/hu/libtodaymailplugin.ts \
26 ../../../../../i18n/ja/libtodaymailplugin.ts \
27 ../../../../../i18n/ko/libtodaymailplugin.ts \
28 ../../../../../i18n/no/libtodaymailplugin.ts \
29 ../../../../../i18n/pl/libtodaymailplugin.ts \
30 ../../../../../i18n/pt/libtodaymailplugin.ts \
31 ../../../../../i18n/pt_BR/libtodaymailplugin.ts \
32 ../../../../../i18n/sl/libtodaymailplugin.ts \
33 ../../../../../i18n/zh_CN/libtodaymailplugin.ts \
34 ../../../../../i18n/zh_TW/libtodaymailplugin.ts \
35 ../../../../../i18n/it/libtodaymailplugin.ts \
36 ../../../../../i18n/da/libtodaymailplugin.ts
19include ( $(OPIEDIR)/include.pro ) 37include ( $(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() {
68 } 68 }
69} 69}
70
71void MailPlugin::reinitialize() {
72}
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:
42 bool excludeFromRefresh() const; 42 bool excludeFromRefresh() const;
43 void refresh(); 43 void refresh();
44 void reinitialize();
44 45
45 private: 46 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)
30 } 30 }
31 m_mailLabel = new OClickableLabel( this ); 31 m_mailLabel = new OClickableLabel( this );
32 m_mailLabel->setMaximumHeight( 15 ); 32 //m_mailLabel->setMaximumHeight( 15 );
33 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); 33 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
34 34
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 @@
1Package: opie-today-mailplugin
2Files: plugins/today/libtodaymailplugin.so*
3Priority: optional
4Section: opie/applications
5Maintainer: Maximilian Reiss <harlekin@handhelds.org>
6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: libqte2, opie-today
9Description: 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 @@
1Makefile* 1Makefile*
2todopluginconfigbase*
2moc* 3moc*
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 @@
1 config TODAY_TODOLIST 1 config TODAY_TODOLIST
2 boolean "opie-today-todolistplugin (shows the next todo entries)" 2 boolean "todolist"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 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
20TARGET = todaytodolistplugin 20TARGET = todaytodolistplugin
21 21
22TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \
23 ../../../../../i18n/nl/libtodaytodolistplugin.ts \
24 ../../../../../i18n/xx/libtodaytodolistplugin.ts \
25 ../../../../../i18n/en/libtodaytodolistplugin.ts \
26 ../../../../../i18n/es/libtodaytodolistplugin.ts \
27 ../../../../../i18n/fr/libtodaytodolistplugin.ts \
28 ../../../../../i18n/hu/libtodaytodolistplugin.ts \
29 ../../../../../i18n/ja/libtodaytodolistplugin.ts \
30 ../../../../../i18n/ko/libtodaytodolistplugin.ts \
31 ../../../../../i18n/no/libtodaytodolistplugin.ts \
32 ../../../../../i18n/pl/libtodaytodolistplugin.ts \
33 ../../../../../i18n/pt/libtodaytodolistplugin.ts \
34 ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \
35 ../../../../../i18n/sl/libtodaytodolistplugin.ts \
36 ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \
37 ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \
38 ../../../../../i18n/it/libtodaytodolistplugin.ts \
39 ../../../../../i18n/da/libtodaytodolistplugin.ts
40
22include ( $(OPIEDIR)/include.pro ) 41include ( $(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 @@
2 * todoplugin.cpp 2 * todoplugin.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002,2003 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
@@ -69,2 +69,8 @@ void TodolistPlugin::refresh() {
69 } 69 }
70} 70}
71
72void TodolistPlugin::reinitialize() {
73 if ( m_widget ) {
74 m_widget->reinitialize();
75 }
76}
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:
42 bool excludeFromRefresh() const; 42 bool excludeFromRefresh() const;
43 void refresh(); 43 void refresh();
44 void reinitialize();
44 45
45 private: 46 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
@@ -64,5 +64,12 @@ void TodolistPluginWidget::readConfig() {
64} 64}
65 65
66void TodolistPluginWidget:: refresh() { 66void TodolistPluginWidget:: refresh() {
67 todo->reload();
68 getTodo();
69}
70
71void TodolistPluginWidget::reinitialize() {
72 readConfig();
73 todo->reload();
67 getTodo(); 74 getTodo();
68} 75}
@@ -80,5 +87,5 @@ void TodolistPluginWidget::getTodo() {
80 87
81 // get overdue todos first 88 // get overdue todos first
82 m_list = todo->overDue(); 89 m_list = todo->sorted( true, 3, 2, 1);
83 90
84 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 91 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
@@ -88,5 +95,5 @@ void TodolistPluginWidget::getTodo() {
88 desc = (*m_it).description(); 95 desc = (*m_it).description();
89 } 96 }
90 tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>"; 97 tmpout += "<font color=#e00000><b>[" + QString("%1").arg((*m_it).priority() ) + "]" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
91 ammount++ ; 98 ammount++ ;
92 } 99 }
@@ -105,5 +112,5 @@ void TodolistPluginWidget::getTodo() {
105 desc = (*m_it).description(); 112 desc = (*m_it).description();
106 } 113 }
107 tmpout += "<b>-</b>" + desc.mid( 0, m_maxCharClip ) + "<br>"; 114 tmpout += "<b> [" + QString("%1").arg((*m_it).priority() ) + "] </b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
108 ammount++; 115 ammount++;
109 } 116 }
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:
33 33
34 void refresh(); 34 void refresh();
35 void reinitialize();
35 36
36protected slots: 37protected 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() {
193 193
194 QString path = QPEApplication::qpeDir() + "/plugins/today"; 194 QString path = QPEApplication::qpeDir() + "/plugins/today";
195 qWarning("Searching for Plugins in: %s", path.latin1());
196#ifdef Q_OS_MACX
197 QDir dir( path, "lib*.dylib" );
198#else
199 QDir dir( path, "lib*.so" ); 195 QDir dir( path, "lib*.so" );
200#endif
201 196
202 QStringList list = dir.entryList(); 197 QStringList list = dir.entryList();
@@ -221,20 +216,16 @@ void Today::loadPlugins() {
221 QString type = (*it).left( (*it).find(".") ); 216 QString type = (*it).left( (*it).find(".") );
222 217
223 // grr, sharp rom does not know Global::languageList(); 218 QString lang;
224 // QStringList langs = Global::languageList(); 219 Config config("locale");
225 QString tfn = QPEApplication::qpeDir() + "/i18n/"; 220 config.setGroup("Language");
226 QDir langDir = tfn; 221 lang = config.readEntry( "Language", "en" );
227 QStringList langs = langDir.entryList("*", QDir::Dirs ); 222
228 223 qDebug( "Languages: " + lang );
229 for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { 224 QTranslator * trans = new QTranslator( qApp );
230 QString lang = *lit; 225 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
231 qDebug( "Languages: " + lang ); 226 if ( trans->load( tfn ) ) {
232 QTranslator * trans = new QTranslator( qApp ); 227 qApp->installTranslator( trans );
233 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; 228 } else {
234 if ( trans->load( tfn ) ) { 229 delete trans;
235 qApp->installTranslator( trans );
236 } else {
237 delete trans;
238 }
239 } 230 }
240 231
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
2 2
3 HEADERS = today.h todaybase.h todayconfig.h 3 HEADERS = today.h todaybase.h todayconfig.h
4 SOURCES = today.cpp todaybase.cpp todayconfig.cpp 4 SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp
5INTERFACES = todayconfigmiscbase.ui
6
5 INCLUDEPATH+= $(OPIEDIR)/include 7 INCLUDEPATH+= $(OPIEDIR)/include
6 DEPENDPATH+= $(OPIEDIR)/include 8 DEPENDPATH+= $(OPIEDIR)/include
7LIBS += -lqpe -lopie 9LIBS += -lqpe -lopie
8 INTERFACES= 10
9 TARGET = today 11 TARGET = today
10 12
11include ( $(OPIEDIR)/include.pro ) 13include ( $(OPIEDIR)/include.pro )
14}
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 @@
2 * todayconfig.cpp 2 * todayconfig.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002, 2003 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
@@ -77,52 +77,11 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
77 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); 77 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
78 78
79 // Misc tab
79 tab_3 = new QWidget( TabWidget3, "tab_3" ); 80 tab_3 = new QWidget( TabWidget3, "tab_3" );
80 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); 81 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
81 tab3Layout->setMargin( 20 ); 82
82 QHBox *hbox_auto = new QHBox( tab_3 ); 83 m_guiMisc = new TodayConfigMiscBase( tab_3 );
83 TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); 84
84 TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); 85 tab3Layout->addWidget( m_guiMisc );
85 QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
86 CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
87 QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
88
89 QHBox *hbox_hide = new QHBox( tab_3 );
90 TextLabel4 = new QLabel( hbox_hide, "HideBanner" );
91 TextLabel4->setText( tr( "Tiny Banner" ) );
92 //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
93 CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" );
94 // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
95
96 QHBox *hbox_inactive = new QHBox( tab_3 );
97 TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
98 TimeLabel->setText( tr( "minutes inactive" ) );
99 QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
100 SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
101 SpinBoxTime->setMaxValue ( 1440 );
102 QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
103 QHBox *hbox_iconSize = new QHBox( tab_3 );
104 QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
105 iconSizeLabel->setText( tr( "Icon size" ) );
106 QWhatsThis::add( iconSizeLabel, tr( "Set the icon size in pixel" ) );
107 SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" );
108 SpinBoxIconSize->setMaxValue( 32 );
109 QWhatsThis::add( SpinBoxIconSize, tr( "Set the icon size in pixel" ) );
110
111 QHBox *hbox_refresh = new QHBox( tab_3 );
112 QLabel *refreshLabel = new QLabel( hbox_refresh );
113 refreshLabel->setText( tr( "Refresh" ) );
114 QWhatsThis::add( refreshLabel, tr( "How often should Today refresh itself" ) );
115 SpinRefresh = new QSpinBox( hbox_refresh );
116 SpinRefresh->setMinValue( 0 );
117 SpinRefresh->setSuffix( tr( " sec" ) );
118 SpinRefresh->setMaxValue ( 7200 );
119 SpinRefresh->setSpecialValueText ( tr("never") );
120 QWhatsThis::add( SpinRefresh, tr( "How often should Today refresh itself" ) );
121
122 tab3Layout->addWidget( hbox_auto );
123 tab3Layout->addWidget( hbox_hide );
124 tab3Layout->addWidget( hbox_inactive );
125 tab3Layout->addWidget( hbox_iconSize );
126 tab3Layout->addWidget( hbox_refresh );
127 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); 86 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
128 87
@@ -162,13 +121,13 @@ void TodayConfig::readConfig() {
162 cfg.setGroup( "Autostart" ); 121 cfg.setGroup( "Autostart" );
163 m_autoStart = cfg.readNumEntry( "autostart", 1 ); 122 m_autoStart = cfg.readNumEntry( "autostart", 1 );
164 CheckBoxAuto->setChecked( m_autoStart ); 123 m_guiMisc->CheckBoxAuto->setChecked( m_autoStart );
165 m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); 124 m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 );
166 SpinBoxTime->setValue( m_autoStartTimer ); 125 m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer );
167 126
168 cfg.setGroup( "General" ); 127 cfg.setGroup( "General" );
169 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 128 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
170 SpinBoxIconSize->setValue( m_iconSize ); 129 m_guiMisc->SpinBoxIconSize->setValue( m_iconSize );
171 SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); 130 m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
172 CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); 131 m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
173 132
174 133
@@ -210,14 +169,14 @@ void TodayConfig::writeConfig() {
210 169
211 cfg.setGroup( "Autostart" ); 170 cfg.setGroup( "Autostart" );
212 m_autoStart = CheckBoxAuto->isChecked(); 171 m_autoStart = m_guiMisc->CheckBoxAuto->isChecked();
213 cfg.writeEntry( "autostart", m_autoStart ); 172 cfg.writeEntry( "autostart", m_autoStart );
214 m_autoStartTimer = SpinBoxTime->value(); 173 m_autoStartTimer = m_guiMisc->SpinBoxTime->value();
215 cfg.writeEntry( "autostartdelay", m_autoStartTimer ); 174 cfg.writeEntry( "autostartdelay", m_autoStartTimer );
216 m_iconSize = SpinBoxIconSize->value(); 175 m_iconSize = m_guiMisc->SpinBoxIconSize->value();
217 176
218 cfg.setGroup( "General" ); 177 cfg.setGroup( "General" );
219 cfg.writeEntry( "IconSize", m_iconSize ); 178 cfg.writeEntry( "IconSize", m_iconSize );
220 cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() ); 179 cfg.writeEntry( "HideBanner", m_guiMisc->CheckBoxHide->isChecked() );
221 cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); 180 cfg.writeEntry( "checkinterval", m_guiMisc->SpinRefresh->value()*1000 );
222 181
223 // set autostart settings 182 // 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 @@
2 * todayconfig.h 2 * todayconfig.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002,2003 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
@@ -23,4 +23,7 @@
23#include <opie/otabwidget.h> 23#include <opie/otabwidget.h>
24 24
25
26#include "todayconfigmiscbase.h"
27
25class QCheckBox; 28class QCheckBox;
26class QLabel; 29class QLabel;
@@ -60,14 +63,10 @@ private:
60 bool m_applets_changed; 63 bool m_applets_changed;
61 64
62 QLabel* TextLabel2;
63 QCheckBox* CheckBoxAuto, *CheckBoxHide;
64 QWidget* tab_2; 65 QWidget* tab_2;
65 QWidget* tab_3; 66 QWidget* tab_3;
66 QLabel* TextLabel1, *TextLabel4; 67 QLabel* TextLabel1, *TextLabel4;
67 QSpinBox* SpinBox7; 68 QSpinBox* SpinBox7;
68 QLabel* TimeLabel; 69
69 QSpinBox* SpinBoxTime; 70 TodayConfigMiscBase *m_guiMisc;
70 QSpinBox* SpinRefresh;
71 QSpinBox* SpinBoxIconSize;
72}; 71};
73 72