7 files changed, 15 insertions, 9 deletions
diff --git a/core/pim/today/plugins/addressbook/addressplugin.cpp b/core/pim/today/plugins/addressbook/addressplugin.cpp index a70f8d8..5d5d34c 100644 --- a/core/pim/today/plugins/addressbook/addressplugin.cpp +++ b/core/pim/today/plugins/addressbook/addressplugin.cpp | |||
@@ -66,4 +66,9 @@ bool AddressBookPlugin::excludeFromRefresh() const { | |||
66 | void AddressBookPlugin::refresh() | 66 | void AddressBookPlugin::refresh() |
67 | { | 67 | { |
68 | m_abWidget->refresh( NULL ); | 68 | m_abWidget->refresh( NULL ); |
69 | } | 69 | } |
70 | |||
71 | void AddressBookPlugin::reinitialize() | ||
72 | { | ||
73 | m_abWidget->reinitialize(); | ||
74 | } | ||
diff --git a/core/pim/today/plugins/addressbook/addressplugin.h b/core/pim/today/plugins/addressbook/addressplugin.h index 04e4faf..0b3b065 100644 --- a/core/pim/today/plugins/addressbook/addressplugin.h +++ b/core/pim/today/plugins/addressbook/addressplugin.h | |||
@@ -41,8 +41,9 @@ public: | |||
41 | TodayConfigWidget* configWidget(QWidget *); | 41 | TodayConfigWidget* configWidget(QWidget *); |
42 | QString appName() const; | 42 | QString appName() const; |
43 | bool excludeFromRefresh() const; | 43 | bool excludeFromRefresh() const; |
44 | void refresh(); | 44 | void refresh(); |
45 | void reinitialize(); | ||
45 | 46 | ||
46 | private: | 47 | private: |
47 | AddressBookPluginWidget* m_abWidget; | 48 | AddressBookPluginWidget* m_abWidget; |
48 | }; | 49 | }; |
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index 9c65e7d..b79c679 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp | |||
@@ -77,9 +77,8 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
77 | SpinDaysClip = new QSpinBox( box3, "SpinDays" ); | 77 | SpinDaysClip = new QSpinBox( box3, "SpinDays" ); |
78 | SpinDaysClip->setMaxValue( 200 ); | 78 | SpinDaysClip->setMaxValue( 200 ); |
79 | QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); | 79 | QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); |
80 | 80 | ||
81 | // Headline color settings | ||
82 | QHBox *box5 = new QHBox( this ); | 81 | QHBox *box5 = new QHBox( this ); |
83 | QLabel* colorLabel2 = new QLabel( box5, "" ); | 82 | QLabel* colorLabel2 = new QLabel( box5, "" ); |
84 | colorLabel2->setText( tr( "Set Headline Color: " ) ); | 83 | colorLabel2->setText( tr( "Set Headline Color: " ) ); |
85 | headlineColor = new OColorButton( box5, black , "headlineColor" ); | 84 | headlineColor = new OColorButton( box5, black , "headlineColor" ); |
@@ -105,9 +104,8 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
105 | QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) ); | 104 | QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) ); |
106 | 105 | ||
107 | 106 | ||
108 | layout->addWidget( b_group ); | 107 | layout->addWidget( b_group ); |
109 | // layout->addWidget( box4 ); | ||
110 | layout->addWidget( box1 ); | 108 | layout->addWidget( box1 ); |
111 | // layout->addWidget( box2 ); | 109 | // layout->addWidget( box2 ); |
112 | layout->addWidget( box3 ); | 110 | layout->addWidget( box3 ); |
113 | layout->addWidget( box5 ); | 111 | layout->addWidget( box5 ); |
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.h b/core/pim/today/plugins/addressbook/addresspluginconfig.h index 5e07aa3..5626e5d 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.h +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.h | |||
@@ -26,9 +26,9 @@ | |||
26 | #include <opie/todayconfigwidget.h> | 26 | #include <opie/todayconfigwidget.h> |
27 | #include <opie/ocolorbutton.h> | 27 | #include <opie/ocolorbutton.h> |
28 | 28 | ||
29 | class AddressBookPluginConfig : public TodayConfigWidget { | 29 | class AddressBookPluginConfig : public TodayConfigWidget { |
30 | 30 | Q_OBJECT | |
31 | 31 | ||
32 | public: | 32 | public: |
33 | 33 | ||
34 | AddressBookPluginConfig( QWidget *parent, const char *name ); | 34 | AddressBookPluginConfig( QWidget *parent, const char *name ); |
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index 498de28..dad09db 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp | |||
@@ -63,8 +63,12 @@ void AddressBookPluginWidget::refresh( const OContactAccess* ) | |||
63 | m_contactdb->reload(); | 63 | m_contactdb->reload(); |
64 | getAddress(); | 64 | getAddress(); |
65 | } | 65 | } |
66 | 66 | ||
67 | void AddressBookPluginWidget::reinitialize() { | ||
68 | readConfig(); | ||
69 | getAddress(); | ||
70 | } | ||
67 | 71 | ||
68 | void AddressBookPluginWidget::readConfig() { | 72 | void AddressBookPluginWidget::readConfig() { |
69 | Config cfg( "todayaddressplugin" ); | 73 | Config cfg( "todayaddressplugin" ); |
70 | cfg.setGroup( "config" ); | 74 | cfg.setGroup( "config" ); |
@@ -97,12 +101,9 @@ void AddressBookPluginWidget::getAddress() { | |||
97 | 101 | ||
98 | QString output; | 102 | QString output; |
99 | 103 | ||
100 | // Check whether the database provide the search option.. | 104 | // Check whether the database provide the search option.. |
101 | // The following if-statement was replaced due to a bug in some | 105 | if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ |
102 | // implementations of libopie. The replacement should work everywhere..(eilers) | ||
103 | // if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ | ||
104 | if ( !( m_contactdb->querySettings() & OContactAccess::DateDiff ) ){ | ||
105 | // Libopie seems to be old.. | 106 | // Libopie seems to be old.. |
106 | output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" ); | 107 | output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" ); |
107 | addressLabel->setText( output ); | 108 | addressLabel->setText( output ); |
108 | return; | 109 | return; |
@@ -114,12 +115,12 @@ void AddressBookPluginWidget::getAddress() { | |||
114 | if ( m_showBirthdays ){ | 115 | if ( m_showBirthdays ){ |
115 | qWarning("Searching from now (%s) until %s ! ", | 116 | qWarning("Searching from now (%s) until %s ! ", |
116 | QDate::currentDate().toString().latin1(), | 117 | QDate::currentDate().toString().latin1(), |
117 | lookAheadDate.toString().latin1() ); | 118 | lookAheadDate.toString().latin1() ); |
119 | |||
118 | OContact querybirthdays; | 120 | OContact querybirthdays; |
119 | querybirthdays.setBirthday( lookAheadDate ); | 121 | querybirthdays.setBirthday( lookAheadDate ); |
120 | 122 | ||
121 | |||
122 | m_list = m_contactdb->queryByExample( querybirthdays, | 123 | m_list = m_contactdb->queryByExample( querybirthdays, |
123 | OContactAccess::DateDiff ); | 124 | OContactAccess::DateDiff ); |
124 | if ( m_list.count() > 0 ){ | 125 | if ( m_list.count() > 0 ){ |
125 | output = "<font color=" + m_headlineColor + ">" | 126 | output = "<font color=" + m_headlineColor + ">" |
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.h b/core/pim/today/plugins/addressbook/addresspluginwidget.h index cf2ecce..b0e3811 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.h +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.h | |||
@@ -34,8 +34,9 @@ class AddressBookPluginWidget : public QWidget { | |||
34 | public: | 34 | public: |
35 | AddressBookPluginWidget( QWidget *parent, const char *name ); | 35 | AddressBookPluginWidget( QWidget *parent, const char *name ); |
36 | ~AddressBookPluginWidget(); | 36 | ~AddressBookPluginWidget(); |
37 | 37 | ||
38 | void reinitialize(); | ||
38 | public slots: | 39 | public slots: |
39 | void refresh( const OContactAccess* db ); | 40 | void refresh( const OContactAccess* db ); |
40 | 41 | ||
41 | protected slots: | 42 | protected slots: |
diff --git a/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control b/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control index 9fe23b6..1876eb8 100644 --- a/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control +++ b/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control | |||
@@ -3,7 +3,7 @@ Files: plugins/today/libtodayaddressbookplugin.so* | |||
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: Stefan Eilers <eilers.stefan@epost.de> | 5 | Maintainer: Stefan Eilers <eilers.stefan@epost.de> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: $QPE_VERSION-$SUB_VERSION | ||
8 | Depends: libqte2, opie-today | 7 | Depends: libqte2, opie-today |
9 | Description: Addressbook plugin for today shows Birthdays and Anniversaries | 8 | Description: Addressbook plugin for today shows Birthdays and Anniversaries |
9 | Version: $QPE_VERSION$EXTRAVERSION | ||