summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-03 13:37:47 (UTC)
committer zautrix <zautrix>2005-06-03 13:37:47 (UTC)
commit7aa43257ffb63e772342f24c1f7945e285171ee6 (patch) (side-by-side diff)
tree7d68896cbbd5ae699bce7905e17824939022a488
parentf0554322b2f27e1fa60dc79a5d76ef0741bf3423 (diff)
downloadkdepimpi-7aa43257ffb63e772342f24c1f7945e285171ee6.zip
kdepimpi-7aa43257ffb63e772342f24c1f7945e285171ee6.tar.gz
kdepimpi-7aa43257ffb63e772342f24c1f7945e285171ee6.tar.bz2
export kapi fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kabc/addresseeview.cpp6
-rw-r--r--kaddressbook/xxportselectdialog.cpp12
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,57 +1,61 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.1.5 ************
This is the new stable version.
Bugfix:
Fixed a problem with agenda popup on the desktop in KO/Pi.
Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
Added config option to not display completed todos in agenda view.
+Addressee view is now using the formatted name, if defined.
+That makes it possible to display "lastname, firstname" in that view now.
+To set the formatted name for all contacts, please use menu:
+Edit->Change->Set formatted name.
********** VERSION 2.1.4 ************
Fixed two more bugs in the KA/Pi CSV import dialog:
Made it possible to read multi-line fields and import it to the "Note" field.
Fixed a problem in mapping custom fields, whatever a custem field is...
********** VERSION 2.1.3 ************
Changed the menu structure of the alarm applet:
Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
Fixed several problems in the KA/Pi CSV import dialog:
Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
********** VERSION 2.1.2 ************
Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
Fixed a problem when importing data from Outlook with mutiple categories set.
Changed display of days in datenavigator:
Birthdays are now blue, not dark green.
When todo view is shown, no birtdays are shown and days with due todos are shown blue.
When journal view is shown, only holidays are shown and days with journals are blue.
Added Backup options to global config:
You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
********** VERSION 2.1.1 ************
Stable release 2.1.1!
KO/Pi:
Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
********** VERSION 2.1.0 ************
Stable release 2.1.0!
Summary of changes/fixes compared to version 2.0.6:
Many bugs of version 2.0.6 fixed.
Most of them were small bugs, but some of them were important.
It is recommended to use version 2.1.0 and not version 2.0.6.
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index 9118c3d..667a5e2 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -1,177 +1,183 @@
/*
This file is part of libkdepim.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <kabc/address.h>
#include <kabc/addressee.h>
#include <kabc/phonenumber.h>
#include <kglobal.h>
//US#include <kglobalsettings.h>
#include <kiconloader.h>
#include <klocale.h>
//US #include <kstringhandler.h>
#include <qscrollview.h>
#include <qregexp.h>
#include <qfile.h>
#include <qvbox.h>
#include <qlabel.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qapplication.h>
#include <qpushbutton.h>
#ifdef DESKTOP_VERSION
#include <qpaintdevicemetrics.h>
#include <qprinter.h>
#include <qpainter.h>
#endif
+#include <qstylesheet.h>
#include "externalapphandler.h"
#include <kabc/addresseeview.h>
//US #ifndef DESKTOP_VERSION
//US #include <qtopia/qcopenvelope_qws.h>
//US #include <qpe/qpeapplication.h>
//US #endif
//US static int kphoneInstalled = 0;
using namespace KABC;
AddresseeView::AddresseeView( QWidget *parent, const char *name )
: QTextBrowser( parent, name )
{
//US setWrapPolicy( QTextEdit::AtWordBoundary );
setLinkUnderline( false );
// setVScrollBarMode( QScrollView::AlwaysOff );
//setHScrollBarMode( QScrollView::AlwaysOff );
//US QStyleSheet *sheet = styleSheet();
//US QStyleSheetItem *link = sheet->item( "a" );
//US link->setColor( KGlobalSettings::linkColor() );
+
}
void AddresseeView::printMe()
{
#ifdef DESKTOP_VERSION
QPrinter printer;
if (!printer.setup() )
return;
QPainter p;
p.begin ( &printer );
QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
if ( dx < dy )
scale = dx;
else
scale = dy;
p.translate( m.width()/10,0 );
p.scale( scale, scale );
drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
p.end();
#endif
}
void AddresseeView::setSource(const QString& n)
{
//qDebug("********AddresseeView::setSource %s", n.latin1());
if ( n.left( 6 ) == "mailto" )
ExternalAppHandler::instance()->mailToOneContact( n.mid(7) );
else if ( n.left( 7 ) == "phoneto" )
ExternalAppHandler::instance()->callByPhone( n.mid(8) );
else if ( n.left( 5 ) == "faxto" )
ExternalAppHandler::instance()->callByFax( n.mid(6) );
else if ( n.left( 5 ) == "smsto" )
ExternalAppHandler::instance()->callBySMS( n.mid(6) );
else if ( n.left( 7 ) == "pagerto" )
ExternalAppHandler::instance()->callByPager( n.mid(8) );
else if ( n.left( 5 ) == "sipto" )
ExternalAppHandler::instance()->callBySIP( n.mid(6) );
}
void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
{
bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable();
// mAddressee = addr;
// clear view
//setText( QString::null );
if ( mAddressee.isEmpty() ) {
setText( QString::null);
return;
}
+#if 0
QString name = ( mAddressee.assembledName().isEmpty() ?
mAddressee.formattedName() : mAddressee.assembledName() );
+#endif
+
+ QString name = mAddressee.realName();
QString dynamicPart;
dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true );
QStringList emails = mAddressee.emails();
QStringList::ConstIterator emailIt;
QString type = i18n( "Email" );
emailIt = emails.begin();
if ( emailIt != emails.end() ) {
if ( kemailAvail ) {
dynamicPart += QString(
"<tr><td align=\"right\"><b>%1</b></td>"
"<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" )
.arg( type )
.arg( name )
.arg( *emailIt )
.arg( *emailIt );
++emailIt;
} else {
dynamicPart += QString(
"<tr><td align=\"right\"><b>%1</b></td>"
"<td align=\"left\">%2</td></tr>" )
.arg( type )
.arg( *emailIt );
++emailIt;
}
}
if ( mAddressee.birthday().date().isValid() ) {
dynamicPart += QString(
"<tr><td align=\"right\"><b>%1</b></td>"
"<td align=\"left\">%2</td></tr>" )
.arg( i18n ("Birthday") )
.arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) );
}
dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(), false );
for ( ; emailIt != emails.end(); ++emailIt ) {
if ( kemailAvail ) {
dynamicPart += QString(
"<tr><td align=\"right\"><b>%1</b></td>"
"<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" )
.arg( type )
.arg( name )
.arg( *emailIt )
.arg( *emailIt );
} else {
dynamicPart += QString(
"<tr><td align=\"right\"><b>%1</b></td>"
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index e134f97..278cab0 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -114,127 +114,131 @@ void XXPortSelectDialog::tagSelected()
if ( mUseSelection->isChecked() ) {
QStringList selection = mCore->selectedUIDs();
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) {
if ( selection.findIndex((*it).uid()) >= 0 )
(*it).setTagged( true );
}
} else if ( mUseFilters->isChecked() ) {
// find contacts that can pass selected filter
Filter::List::Iterator filterIt;
for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt )
if ( (*filterIt).name() == mFiltersCombo->currentText() )
break;
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) {
if ( (*filterIt).filterAddressee( *it ) )
(*it).setTagged( true );
}
} else if ( mUseCategories->isChecked() ) {
QStringList categorieList = categories();
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) {
QStringList tmp( (*it).categories() );
QStringList::Iterator tmpIt;
for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt )
if ( categorieList.contains( *tmpIt ) ) {
(*it).setTagged( true );
break;
}
}
} else {
// create a string list of all entries:
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it )
(*it).setTagged( true );
}
}
KABC::AddresseeList XXPortSelectDialog::contacts()
{
KABC::AddresseeList list;
if ( mUseSelection->isChecked() ) {
QStringList::Iterator it;
QStringList selection = mCore->selectedUIDs();
for ( it = selection.begin(); it != selection.end(); ++it ) {
KABC::Addressee addr = mCore->addressBook()->findByUid( *it );
if ( !addr.isEmpty() )
- list.append( addr );
+ if ( addr.uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( addr );
}
} else if ( mUseFilters->isChecked() ) {
// find contacts that can pass selected filter
Filter::List::Iterator filterIt;
for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt )
if ( (*filterIt).name() == mFiltersCombo->currentText() )
break;
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) {
if ( (*filterIt).filterAddressee( *it ) )
- list.append( *it );
+ if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( *it );
}
} else if ( mUseCategories->isChecked() ) {
QStringList categorieList = categories();
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) {
QStringList tmp( (*it).categories() );
QStringList::Iterator tmpIt;
for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt )
if ( categorieList.contains( *tmpIt ) ) {
- list.append( *it );
+ if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( *it );
break;
}
}
} else {
// create a string list of all entries:
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it )
- list.append( *it );
+ if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( *it );
}
if ( mUseSorting ) {
list.setReverseSorting( mSortTypeCombo->currentItem() == 1 );
uint pos = mFieldCombo->currentItem();
if ( pos < mFields.count() )
list.sortByField( mFields[ pos ] );
}
return list;
}
QStringList XXPortSelectDialog::categories() const
{
QStringList list;
QListViewItemIterator it( mCategoriesView );
for ( ; it.current(); ++it ) {
QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current());
if ( qcli->isOn() )
list.append( it.current()->text( 0 ) );
}
return list;
}
void XXPortSelectDialog::filterChanged( int )
{
mUseFilters->setChecked( true );
}
void XXPortSelectDialog::categoryClicked( QListViewItem *i )
{
QCheckListItem *qcli = static_cast<QCheckListItem*>( i );
if ( qcli->isOn() )
mUseCategories->setChecked( true );
}
void XXPortSelectDialog::slotHelp()
{
#ifndef KAB_EMBEDDED
kapp->invokeHelp( "import-and-export" );
#else //KAB_EMBEDDED
qDebug("XXPortSelectDialog::slotHelp is not implemented yet");
#endif //KAB_EMBEDDED
}