[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] [Patch] ContactEntry to Addressee
From:       Mike Pilone <mpilone () slac ! com>
Date:       2002-04-25 16:28:52
[Download RAW message or body]

On Thursday 25 April 2002 09:03 am, Cornelius Schumacher wrote:
> See my comments below. The only objection against committing I have is
> that it breaks the "Add to Addressbook" function of KMail by disabling
> the addEmail DCOP call. It would be better, if you can fix that before
> committing. All other problems we can fix later.

I will fix this before the commit.

> Yes, vCard probably is the best format. It would also be nice, if a vCard
> attachement from KMail could be directly moved to KAddressBook per
> Drag&Drop.

That would definately be great.

> > +   static QString addresseeToClipBoard(KABC::Addressee &)
> > +    { return QString(); }
> > +
> > +   /** Convert a string from the clipboard into an addressee object.
> > +   */
> > +   static KABC::Addressee::List clipBoardToAddressee(const QString
>
> These functions should perhaps be part of libkabc (This would mean that
> there is no need for the AddresseeUtil class).

Ok, where should they go in libkabc? I would suggest as static methods of 
Addressee, since that is where a Address::List is declaired. Do you want me 
to add them before I commit so I can remove the addresseeutil class?

> This should better be something like 'i18n("label: value","%1:
> %2").arg(a.formattedNameLabel).arg(a.formattedName))' or at least
> 'i18n("Name: %1").arg(a.formattedName())', otherwise there will be
> problems with translations to languages which doesn't use the same scheme
> for colons as we are used to.

I will fix this before I commit.

> > -ContactListViewItem::ContactListViewItem(const QString &entryKey,
> > +ContactListViewItem::ContactListViewItem(const QString &uid,
> >                                          ContactListView *parent,
> > -                                         ContactEntryList *doc,
> > +                                         KABC::AddressBook *doc,
> >                                           const KABC::Field::List
> > &fields )
>
> Wouldn't it be better to pass an Addressee object instead of the uid?
> Then it might even not be necessary to also pass an addressbook object.

I am a little confused here. If we pass an Addressee object, won't it detach 
if it is edited elsewhere? Wouldn't this cause the ListItem to become out 
of sync, since it is refreshing off of the detached Addressee object? I 
guess the problem is that I do not fully understand the shared data of an 
addressee object. Could you explain?

> >  // What is this code supposed to do?
> > +//
> > +// I don't know, it is a left over from Don -mpilone
> >  #if 0
> >      if (mInternalAttributes[i] == "X-FileAs")
> >      {
> > @@ -243,14 +234,16 @@
> >        }
> >      }
> >  #endif
>
> Perhaps we can just remove the code.

Sounds good to me. I will do it before I commit.

> >  void KAddressBook::addEmail( QString aStr )
> This function is used by KMail when adding an address to the address
> book. We shouldn't break it.

I will fix it. I think is used updateContact, which depended on 
ContactEntry. Shouldn't be a problem.

> >  QString KAddressBook::getNameByPhone( QString phone )
> > -{
> > +{/* OLD DCOP METHOD  -- should be removed
>
> This method is useful and not related to ContactEntry. I think we should
> keep it.

Ok, but I figured this was easy enough to do through libkabc, so we didn't 
need a dcop call to do it.

I am hoping I will have time to make the above changes and commit this 
evening (EST).

-mike

-- 
Mike Pilone <mpilone@slac.com>        http://www.slac.com/mpilone/personal/
GPG Fingerprint = 856C 8B36 ECF7 9156 4611  7C6B C265 05C4 162F C3B5

See http://www.slac.com/mpilone/personal/mpilone_pub_key.gpg for full key.
See http://www.gnupg.org for GPG information.
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic