author | zautrix <zautrix> | 2005-06-03 13:37:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-03 13:37:47 (UTC) |
commit | 7aa43257ffb63e772342f24c1f7945e285171ee6 (patch) (unidiff) | |
tree | 7d68896cbbd5ae699bce7905e17824939022a488 | |
parent | f0554322b2f27e1fa60dc79a5d76ef0741bf3423 (diff) | |
download | kdepimpi-7aa43257ffb63e772342f24c1f7945e285171ee6.zip kdepimpi-7aa43257ffb63e772342f24c1f7945e285171ee6.tar.gz kdepimpi-7aa43257ffb63e772342f24c1f7945e285171ee6.tar.bz2 |
export kapi fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | kabc/addresseeview.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/xxportselectdialog.cpp | 12 |
3 files changed, 18 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 3532084..93edc59 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,33 +1,37 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.5 ************ | 3 | ********** VERSION 2.1.5 ************ |
4 | 4 | ||
5 | This is the new stable version. | 5 | This is the new stable version. |
6 | Bugfix: | 6 | Bugfix: |
7 | Fixed a problem with agenda popup on the desktop in KO/Pi. | 7 | Fixed a problem with agenda popup on the desktop in KO/Pi. |
8 | Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. | 8 | Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. |
9 | Added config option to not display completed todos in agenda view. | 9 | Added config option to not display completed todos in agenda view. |
10 | Addressee view is now using the formatted name, if defined. | ||
11 | That makes it possible to display "lastname, firstname" in that view now. | ||
12 | To set the formatted name for all contacts, please use menu: | ||
13 | Edit->Change->Set formatted name. | ||
10 | 14 | ||
11 | ********** VERSION 2.1.4 ************ | 15 | ********** VERSION 2.1.4 ************ |
12 | 16 | ||
13 | Fixed two more bugs in the KA/Pi CSV import dialog: | 17 | Fixed two more bugs in the KA/Pi CSV import dialog: |
14 | Made it possible to read multi-line fields and import it to the "Note" field. | 18 | Made it possible to read multi-line fields and import it to the "Note" field. |
15 | Fixed a problem in mapping custom fields, whatever a custem field is... | 19 | Fixed a problem in mapping custom fields, whatever a custem field is... |
16 | 20 | ||
17 | ********** VERSION 2.1.3 ************ | 21 | ********** VERSION 2.1.3 ************ |
18 | 22 | ||
19 | Changed the menu structure of the alarm applet: | 23 | Changed the menu structure of the alarm applet: |
20 | Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". | 24 | Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". |
21 | 25 | ||
22 | Fixed several problems in the KA/Pi CSV import dialog: | 26 | Fixed several problems in the KA/Pi CSV import dialog: |
23 | Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. | 27 | Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. |
24 | 28 | ||
25 | 29 | ||
26 | ********** VERSION 2.1.2 ************ | 30 | ********** VERSION 2.1.2 ************ |
27 | 31 | ||
28 | Fixed a problem closing the alarm dialog on Zaurus with "OK" button. | 32 | Fixed a problem closing the alarm dialog on Zaurus with "OK" button. |
29 | 33 | ||
30 | Fixed a problem when importing data from Outlook with mutiple categories set. | 34 | Fixed a problem when importing data from Outlook with mutiple categories set. |
31 | 35 | ||
32 | Changed display of days in datenavigator: | 36 | Changed display of days in datenavigator: |
33 | Birthdays are now blue, not dark green. | 37 | Birthdays are now blue, not dark green. |
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 9118c3d..667a5e2 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -22,75 +22,77 @@ | |||
22 | #include <kabc/address.h> | 22 | #include <kabc/address.h> |
23 | #include <kabc/addressee.h> | 23 | #include <kabc/addressee.h> |
24 | #include <kabc/phonenumber.h> | 24 | #include <kabc/phonenumber.h> |
25 | #include <kglobal.h> | 25 | #include <kglobal.h> |
26 | //US#include <kglobalsettings.h> | 26 | //US#include <kglobalsettings.h> |
27 | #include <kiconloader.h> | 27 | #include <kiconloader.h> |
28 | #include <klocale.h> | 28 | #include <klocale.h> |
29 | //US #include <kstringhandler.h> | 29 | //US #include <kstringhandler.h> |
30 | #include <qscrollview.h> | 30 | #include <qscrollview.h> |
31 | #include <qregexp.h> | 31 | #include <qregexp.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qvbox.h> | 33 | #include <qvbox.h> |
34 | #include <qlabel.h> | 34 | #include <qlabel.h> |
35 | #include <qwidget.h> | 35 | #include <qwidget.h> |
36 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qapplication.h> | 37 | #include <qapplication.h> |
38 | #include <qpushbutton.h> | 38 | #include <qpushbutton.h> |
39 | #ifdef DESKTOP_VERSION | 39 | #ifdef DESKTOP_VERSION |
40 | #include <qpaintdevicemetrics.h> | 40 | #include <qpaintdevicemetrics.h> |
41 | #include <qprinter.h> | 41 | #include <qprinter.h> |
42 | #include <qpainter.h> | 42 | #include <qpainter.h> |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | 45 | ||
46 | #include <qstylesheet.h> | ||
46 | #include "externalapphandler.h" | 47 | #include "externalapphandler.h" |
47 | #include <kabc/addresseeview.h> | 48 | #include <kabc/addresseeview.h> |
48 | 49 | ||
49 | 50 | ||
50 | //US #ifndef DESKTOP_VERSION | 51 | //US #ifndef DESKTOP_VERSION |
51 | //US #include <qtopia/qcopenvelope_qws.h> | 52 | //US #include <qtopia/qcopenvelope_qws.h> |
52 | //US #include <qpe/qpeapplication.h> | 53 | //US #include <qpe/qpeapplication.h> |
53 | //US #endif | 54 | //US #endif |
54 | 55 | ||
55 | //US static int kphoneInstalled = 0; | 56 | //US static int kphoneInstalled = 0; |
56 | 57 | ||
57 | using namespace KABC; | 58 | using namespace KABC; |
58 | 59 | ||
59 | AddresseeView::AddresseeView( QWidget *parent, const char *name ) | 60 | AddresseeView::AddresseeView( QWidget *parent, const char *name ) |
60 | : QTextBrowser( parent, name ) | 61 | : QTextBrowser( parent, name ) |
61 | 62 | ||
62 | 63 | ||
63 | { | 64 | { |
64 | //US setWrapPolicy( QTextEdit::AtWordBoundary ); | 65 | //US setWrapPolicy( QTextEdit::AtWordBoundary ); |
65 | setLinkUnderline( false ); | 66 | setLinkUnderline( false ); |
66 | // setVScrollBarMode( QScrollView::AlwaysOff ); | 67 | // setVScrollBarMode( QScrollView::AlwaysOff ); |
67 | //setHScrollBarMode( QScrollView::AlwaysOff ); | 68 | //setHScrollBarMode( QScrollView::AlwaysOff ); |
68 | 69 | ||
69 | //US QStyleSheet *sheet = styleSheet(); | 70 | //US QStyleSheet *sheet = styleSheet(); |
70 | //US QStyleSheetItem *link = sheet->item( "a" ); | 71 | //US QStyleSheetItem *link = sheet->item( "a" ); |
71 | //US link->setColor( KGlobalSettings::linkColor() ); | 72 | //US link->setColor( KGlobalSettings::linkColor() ); |
72 | 73 | ||
74 | |||
73 | } | 75 | } |
74 | void AddresseeView::printMe() | 76 | void AddresseeView::printMe() |
75 | { | 77 | { |
76 | #ifdef DESKTOP_VERSION | 78 | #ifdef DESKTOP_VERSION |
77 | QPrinter printer; | 79 | QPrinter printer; |
78 | if (!printer.setup() ) | 80 | if (!printer.setup() ) |
79 | return; | 81 | return; |
80 | QPainter p; | 82 | QPainter p; |
81 | p.begin ( &printer ); | 83 | p.begin ( &printer ); |
82 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 84 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); |
83 | float dx, dy; | 85 | float dx, dy; |
84 | int wid = (m.width() * 9)/10; | 86 | int wid = (m.width() * 9)/10; |
85 | dx = (float) wid/(float)contentsWidth (); | 87 | dx = (float) wid/(float)contentsWidth (); |
86 | dy = (float)(m.height()) / (float)contentsHeight (); | 88 | dy = (float)(m.height()) / (float)contentsHeight (); |
87 | float scale; | 89 | float scale; |
88 | // scale to fit the width or height of the paper | 90 | // scale to fit the width or height of the paper |
89 | if ( dx < dy ) | 91 | if ( dx < dy ) |
90 | scale = dx; | 92 | scale = dx; |
91 | else | 93 | else |
92 | scale = dy; | 94 | scale = dy; |
93 | p.translate( m.width()/10,0 ); | 95 | p.translate( m.width()/10,0 ); |
94 | p.scale( scale, scale ); | 96 | p.scale( scale, scale ); |
95 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); | 97 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); |
96 | p.end(); | 98 | p.end(); |
@@ -104,50 +106,54 @@ void AddresseeView::setSource(const QString& n) | |||
104 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); | 106 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); |
105 | else if ( n.left( 7 ) == "phoneto" ) | 107 | else if ( n.left( 7 ) == "phoneto" ) |
106 | ExternalAppHandler::instance()->callByPhone( n.mid(8) ); | 108 | ExternalAppHandler::instance()->callByPhone( n.mid(8) ); |
107 | else if ( n.left( 5 ) == "faxto" ) | 109 | else if ( n.left( 5 ) == "faxto" ) |
108 | ExternalAppHandler::instance()->callByFax( n.mid(6) ); | 110 | ExternalAppHandler::instance()->callByFax( n.mid(6) ); |
109 | else if ( n.left( 5 ) == "smsto" ) | 111 | else if ( n.left( 5 ) == "smsto" ) |
110 | ExternalAppHandler::instance()->callBySMS( n.mid(6) ); | 112 | ExternalAppHandler::instance()->callBySMS( n.mid(6) ); |
111 | else if ( n.left( 7 ) == "pagerto" ) | 113 | else if ( n.left( 7 ) == "pagerto" ) |
112 | ExternalAppHandler::instance()->callByPager( n.mid(8) ); | 114 | ExternalAppHandler::instance()->callByPager( n.mid(8) ); |
113 | else if ( n.left( 5 ) == "sipto" ) | 115 | else if ( n.left( 5 ) == "sipto" ) |
114 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); | 116 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); |
115 | 117 | ||
116 | } | 118 | } |
117 | void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) | 119 | void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) |
118 | { | 120 | { |
119 | bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable(); | 121 | bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable(); |
120 | // mAddressee = addr; | 122 | // mAddressee = addr; |
121 | // clear view | 123 | // clear view |
122 | //setText( QString::null ); | 124 | //setText( QString::null ); |
123 | 125 | ||
124 | if ( mAddressee.isEmpty() ) { | 126 | if ( mAddressee.isEmpty() ) { |
125 | setText( QString::null); | 127 | setText( QString::null); |
126 | return; | 128 | return; |
127 | } | 129 | } |
130 | #if 0 | ||
128 | QString name = ( mAddressee.assembledName().isEmpty() ? | 131 | QString name = ( mAddressee.assembledName().isEmpty() ? |
129 | mAddressee.formattedName() : mAddressee.assembledName() ); | 132 | mAddressee.formattedName() : mAddressee.assembledName() ); |
133 | #endif | ||
134 | |||
135 | QString name = mAddressee.realName(); | ||
130 | 136 | ||
131 | QString dynamicPart; | 137 | QString dynamicPart; |
132 | 138 | ||
133 | dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true ); | 139 | dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true ); |
134 | QStringList emails = mAddressee.emails(); | 140 | QStringList emails = mAddressee.emails(); |
135 | QStringList::ConstIterator emailIt; | 141 | QStringList::ConstIterator emailIt; |
136 | QString type = i18n( "Email" ); | 142 | QString type = i18n( "Email" ); |
137 | emailIt = emails.begin(); | 143 | emailIt = emails.begin(); |
138 | if ( emailIt != emails.end() ) { | 144 | if ( emailIt != emails.end() ) { |
139 | if ( kemailAvail ) { | 145 | if ( kemailAvail ) { |
140 | dynamicPart += QString( | 146 | dynamicPart += QString( |
141 | "<tr><td align=\"right\"><b>%1</b></td>" | 147 | "<tr><td align=\"right\"><b>%1</b></td>" |
142 | "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) | 148 | "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) |
143 | .arg( type ) | 149 | .arg( type ) |
144 | .arg( name ) | 150 | .arg( name ) |
145 | .arg( *emailIt ) | 151 | .arg( *emailIt ) |
146 | .arg( *emailIt ); | 152 | .arg( *emailIt ); |
147 | ++emailIt; | 153 | ++emailIt; |
148 | } else { | 154 | } else { |
149 | dynamicPart += QString( | 155 | dynamicPart += QString( |
150 | "<tr><td align=\"right\"><b>%1</b></td>" | 156 | "<tr><td align=\"right\"><b>%1</b></td>" |
151 | "<td align=\"left\">%2</td></tr>" ) | 157 | "<td align=\"left\">%2</td></tr>" ) |
152 | .arg( type ) | 158 | .arg( type ) |
153 | .arg( *emailIt ); | 159 | .arg( *emailIt ); |
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index e134f97..278cab0 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp | |||
@@ -138,79 +138,83 @@ void XXPortSelectDialog::tagSelected() | |||
138 | QStringList::Iterator tmpIt; | 138 | QStringList::Iterator tmpIt; |
139 | for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) | 139 | for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) |
140 | if ( categorieList.contains( *tmpIt ) ) { | 140 | if ( categorieList.contains( *tmpIt ) ) { |
141 | (*it).setTagged( true ); | 141 | (*it).setTagged( true ); |
142 | break; | 142 | break; |
143 | } | 143 | } |
144 | } | 144 | } |
145 | } else { | 145 | } else { |
146 | // create a string list of all entries: | 146 | // create a string list of all entries: |
147 | KABC::AddressBook::Iterator it; | 147 | KABC::AddressBook::Iterator it; |
148 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) | 148 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) |
149 | (*it).setTagged( true ); | 149 | (*it).setTagged( true ); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | KABC::AddresseeList XXPortSelectDialog::contacts() | 152 | KABC::AddresseeList XXPortSelectDialog::contacts() |
153 | { | 153 | { |
154 | 154 | ||
155 | KABC::AddresseeList list; | 155 | KABC::AddresseeList list; |
156 | if ( mUseSelection->isChecked() ) { | 156 | if ( mUseSelection->isChecked() ) { |
157 | QStringList::Iterator it; | 157 | QStringList::Iterator it; |
158 | QStringList selection = mCore->selectedUIDs(); | 158 | QStringList selection = mCore->selectedUIDs(); |
159 | for ( it = selection.begin(); it != selection.end(); ++it ) { | 159 | for ( it = selection.begin(); it != selection.end(); ++it ) { |
160 | KABC::Addressee addr = mCore->addressBook()->findByUid( *it ); | 160 | KABC::Addressee addr = mCore->addressBook()->findByUid( *it ); |
161 | if ( !addr.isEmpty() ) | 161 | if ( !addr.isEmpty() ) |
162 | list.append( addr ); | 162 | if ( addr.uid().left( 19 ) != QString("last-syncAddressee-") ) |
163 | list.append( addr ); | ||
163 | } | 164 | } |
164 | } else if ( mUseFilters->isChecked() ) { | 165 | } else if ( mUseFilters->isChecked() ) { |
165 | // find contacts that can pass selected filter | 166 | // find contacts that can pass selected filter |
166 | Filter::List::Iterator filterIt; | 167 | Filter::List::Iterator filterIt; |
167 | for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt ) | 168 | for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt ) |
168 | if ( (*filterIt).name() == mFiltersCombo->currentText() ) | 169 | if ( (*filterIt).name() == mFiltersCombo->currentText() ) |
169 | break; | 170 | break; |
170 | 171 | ||
171 | KABC::AddressBook::Iterator it; | 172 | KABC::AddressBook::Iterator it; |
172 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) { | 173 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) { |
173 | if ( (*filterIt).filterAddressee( *it ) ) | 174 | if ( (*filterIt).filterAddressee( *it ) ) |
174 | list.append( *it ); | 175 | if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") ) |
176 | list.append( *it ); | ||
175 | } | 177 | } |
176 | } else if ( mUseCategories->isChecked() ) { | 178 | } else if ( mUseCategories->isChecked() ) { |
177 | QStringList categorieList = categories(); | 179 | QStringList categorieList = categories(); |
178 | KABC::AddressBook::Iterator it; | 180 | KABC::AddressBook::Iterator it; |
179 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) { | 181 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) { |
180 | QStringList tmp( (*it).categories() ); | 182 | QStringList tmp( (*it).categories() ); |
181 | QStringList::Iterator tmpIt; | 183 | QStringList::Iterator tmpIt; |
182 | for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) | 184 | for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) |
183 | if ( categorieList.contains( *tmpIt ) ) { | 185 | if ( categorieList.contains( *tmpIt ) ) { |
184 | list.append( *it ); | 186 | if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") ) |
187 | list.append( *it ); | ||
185 | break; | 188 | break; |
186 | } | 189 | } |
187 | } | 190 | } |
188 | } else { | 191 | } else { |
189 | // create a string list of all entries: | 192 | // create a string list of all entries: |
190 | KABC::AddressBook::Iterator it; | 193 | KABC::AddressBook::Iterator it; |
191 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) | 194 | for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) |
192 | list.append( *it ); | 195 | if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") ) |
196 | list.append( *it ); | ||
193 | } | 197 | } |
194 | 198 | ||
195 | if ( mUseSorting ) { | 199 | if ( mUseSorting ) { |
196 | list.setReverseSorting( mSortTypeCombo->currentItem() == 1 ); | 200 | list.setReverseSorting( mSortTypeCombo->currentItem() == 1 ); |
197 | uint pos = mFieldCombo->currentItem(); | 201 | uint pos = mFieldCombo->currentItem(); |
198 | if ( pos < mFields.count() ) | 202 | if ( pos < mFields.count() ) |
199 | list.sortByField( mFields[ pos ] ); | 203 | list.sortByField( mFields[ pos ] ); |
200 | } | 204 | } |
201 | 205 | ||
202 | return list; | 206 | return list; |
203 | } | 207 | } |
204 | 208 | ||
205 | QStringList XXPortSelectDialog::categories() const | 209 | QStringList XXPortSelectDialog::categories() const |
206 | { | 210 | { |
207 | QStringList list; | 211 | QStringList list; |
208 | 212 | ||
209 | QListViewItemIterator it( mCategoriesView ); | 213 | QListViewItemIterator it( mCategoriesView ); |
210 | for ( ; it.current(); ++it ) { | 214 | for ( ; it.current(); ++it ) { |
211 | QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current()); | 215 | QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current()); |
212 | if ( qcli->isOn() ) | 216 | if ( qcli->isOn() ) |
213 | list.append( it.current()->text( 0 ) ); | 217 | list.append( it.current()->text( 0 ) ); |
214 | } | 218 | } |
215 | 219 | ||
216 | return list; | 220 | return list; |