summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--kabc/addresseedialog.cpp9
2 files changed, 8 insertions, 7 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index e0bd3f3..eaf4b56 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,29 +1,35 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3 3
4********** VERSION 2.1.8 ************ 4********** VERSION 2.1.8 ************
5 5
6KO/Pi:
7Added info about the completion sate of a todo in the ListView/Searchdialog.
8If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
9
10KA/Pi:
11In the addressee selection dialog now the formatted name is shown, if not empty.
6 12
7********** VERSION 2.1.7 ************ 13********** VERSION 2.1.7 ************
8 14
9KO/Pi: 15KO/Pi:
10Fixed several problems in the new Resource handling. 16Fixed several problems in the new Resource handling.
11Added more options to the search dialog. 17Added more options to the search dialog.
12Fixed a problem in the Month view. 18Fixed a problem in the Month view.
13Added more options to the dialog when setting a todo to stopped. 19Added more options to the dialog when setting a todo to stopped.
14 20
15Fixed two small problems in KO/PiAlarm applet. 21Fixed two small problems in KO/PiAlarm applet.
16 22
17********** VERSION 2.1.6 ************ 23********** VERSION 2.1.6 ************
18 24
19This release is for testing only. 25This release is for testing only.
20 26
21KO/Pi: 27KO/Pi:
22Added to the list view (the list view is used in search dialog as well) the possibility to print it. 28Added to the list view (the list view is used in search dialog as well) the possibility to print it.
23Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 29Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
24Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 30Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
25Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 31Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
26Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 32Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
27Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 33Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
28 34
29Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 35Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index 19b52bb..e89584d 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -21,52 +21,49 @@
21#include <qlayout.h> 21#include <qlayout.h>
22#include <qpushbutton.h> 22#include <qpushbutton.h>
23#include <qgroupbox.h> 23#include <qgroupbox.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qregexp.h> 25#include <qregexp.h>
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qlabel.h> 27#include <qlabel.h>
28 28
29#include <klocale.h> 29#include <klocale.h>
30#include <kdebug.h> 30#include <kdebug.h>
31#include <kglobalsettings.h> 31#include <kglobalsettings.h>
32 32
33#include "stdaddressbook.h" 33#include "stdaddressbook.h"
34 34
35#include "addresseedialog.h" 35#include "addresseedialog.h"
36#include "KDGanttMinimizeSplitter.h" 36#include "KDGanttMinimizeSplitter.h"
37//#include "addresseedialog.moc" 37//#include "addresseedialog.moc"
38 38
39using namespace KABC; 39using namespace KABC;
40 40
41AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : 41AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) :
42 QListViewItem( parent ), 42 QListViewItem( parent ),
43 mAddressee( addressee ) 43 mAddressee( addressee )
44{ 44{
45 QString name = addressee.familyName()+", "+ addressee.givenName(); 45 setText( Name,addressee.realName());
46 if ( name.length() == 2 )
47 name = addressee.organization();
48 setText( Name,name);
49 setText( Email, addressee.preferredEmail() ); 46 setText( Email, addressee.preferredEmail() );
50} 47}
51 48
52QString AddresseeItem::key( int column, bool ) const 49QString AddresseeItem::key( int column, bool ) const
53{ 50{
54 51
55 if (column == Email) { 52 if (column == Email) {
56 QString value = text(Email); 53 QString value = text(Email);
57 int val = value.findRev("@"); 54 int val = value.findRev("@");
58 return value.mid( val) + value.left( val ); 55 return value.mid( val) + value.left( val );
59 } 56 }
60 return text(column).lower(); 57 return text(column).lower();
61} 58}
62 59
63AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : 60AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
64 KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), 61 KDialogBase( KDialogBase::Plain, i18n("Select Addressee"),
65 Ok|Cancel, No, parent ), mMultiple( multiple ) 62 Ok|Cancel, No, parent ), mMultiple( multiple )
66{ 63{
67 qDebug("NEW AddresseeDialog "); 64 qDebug("NEW AddresseeDialog ");
68 QWidget *topWidget = plainPage(); 65 QWidget *topWidget = plainPage();
69 66
70 QBoxLayout *topLayout = new QHBoxLayout( topWidget ); 67 QBoxLayout *topLayout = new QHBoxLayout( topWidget );
71 68
72 69
@@ -144,51 +141,49 @@ AddresseeDialog::~AddresseeDialog()
144 141
145void AddresseeDialog::loadAddressBook() 142void AddresseeDialog::loadAddressBook()
146{ 143{
147 mAddresseeList->clear(); 144 mAddresseeList->clear();
148 mItemDict.clear(); 145 mItemDict.clear();
149 if ( mAddresseeEdit->text().isEmpty() ) { 146 if ( mAddresseeEdit->text().isEmpty() ) {
150 AddressBook::Iterator it; 147 AddressBook::Iterator it;
151 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 148 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
152 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 149 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
153 continue; 150 continue;
154 new AddresseeItem( mAddresseeList, (*it) ); 151 new AddresseeItem( mAddresseeList, (*it) );
155 } 152 }
156 return; 153 return;
157 } 154 }
158 //mAddresseeEdit->completionObject()->clear(); 155 //mAddresseeEdit->completionObject()->clear();
159 QRegExp re; 156 QRegExp re;
160 re.setWildcard(true); // most people understand these better. 157 re.setWildcard(true); // most people understand these better.
161 re.setCaseSensitive(false); 158 re.setCaseSensitive(false);
162 re.setPattern( "*"+ mAddresseeEdit->text() + "*"); 159 re.setPattern( "*"+ mAddresseeEdit->text() + "*");
163 160
164 AddressBook::Iterator it; 161 AddressBook::Iterator it;
165 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 162 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
166 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) 163 if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
167 continue; 164 continue;
168 QString name = (*it).familyName()+", "+ (*it).givenName(); 165 QString name = (*it).realName();
169 if ( name.length() == 2 )
170 name = (*it).realName();
171 name += (*it).preferredEmail(); 166 name += (*it).preferredEmail();
172#if QT_VERSION >= 0x030000 167#if QT_VERSION >= 0x030000
173 if (re.search(name) != -1) 168 if (re.search(name) != -1)
174#else 169#else
175 if (re.match(name) != -1) 170 if (re.match(name) != -1)
176#endif 171#endif
177 AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); 172 AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) );
178 } 173 }
179} 174}
180 175
181void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) 176void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item )
182{ 177{
183 if ( str.isEmpty() ) return; 178 if ( str.isEmpty() ) return;
184 179
185 mItemDict.insert( str, item ); 180 mItemDict.insert( str, item );
186 //mAddresseeEdit->completionObject()->addItem( str ); 181 //mAddresseeEdit->completionObject()->addItem( str );
187} 182}
188 183
189void AddresseeDialog::selectItem( const QString &str ) 184void AddresseeDialog::selectItem( const QString &str )
190{ 185{
191 if ( str.isEmpty() ) return; 186 if ( str.isEmpty() ) return;
192 187
193 QListViewItem *item = mItemDict.find( str ); 188 QListViewItem *item = mItemDict.find( str );
194 if ( item ) { 189 if ( item ) {