Summary: | Always using at least one of the addresses from kaddressbook | ||
---|---|---|---|
Product: | [Unmaintained] kpilot | Reporter: | Eric Seynaeve <eric> |
Component: | Contacts Conduit | Assignee: | Reinhold Kainhofer <reinhold> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Eric Seynaeve
2003-07-02 23:11:10 UTC
Subject: Re: Always using at least one of the addresses from kaddressbook Unfortunately, it is not that simple. Image you have a record with only a home address, and kpilot is configured to use the business address. You do a sync, and with your suggestion, that address will be synced to the handheld. Now you add a business address in kaddressbook, and edit the address on the handheld. When you do a sync, kpilot sees that the adress on the handheld was changed, and it sees that there is a business address, which is supposed to be synced. How is kpilot supposed to merge these two into one address? Clearly, you don't want to loose your changes to the address on the handheld, but you also don't want to loose the business address. There is a similar problem with phone numbers and emails: On the handheld there are only 5 fields for email and phones, while kaddressbook can have an arbitrary number of those. That's really giving me a headache. Reinhold -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/A9hvTqjEwhXvPN0RAuZVAJ4uud69uqw4sg2TcO9EdM9CMMUTeQCguq91 fOxWrjGt/Rqy+QetNvMtOlI= =0opC -----END PGP SIGNATURE----- Subject: kdepim/kpilot/conduits/abbrowserconduit CVS commit by kainhofe: The conduit now uses a different algorithm to find the type of address on the PC to sync with. First, if there is a preferred address (no matter if home, work or whatever), this one is synced to the handheld. If no preferred address exists, either home or work (depending on the setting in the conduit config dialog) is used for the sync. If that doesn't exist, either, the other one (work/home) is tried. If that also doesn't exist, and the address is copied to the PC, its type is set to preferred+the setting from the config dialog. This fixes both bugs #50560 (conduit should sync with preferred address) as well as bug #60659 (conduit should use the existing address from the PC, even if the type is not the one chosen in the config dialog). CCMAIL: 50560-done@bugs.kde.org, 60659-done@bugs.kde.org M +14 -2 abbrowser-conduit.cc 1.80 M +2 -2 kaddressbookConduit.ui 1.18 --- kdepim/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc #1.79:1.80 @@ -547,7 +547,19 @@ void AbbrowserConduit::setFax(Addressee +/** First search for a preferred address. If we don't have one, search + * for home or work as specified in the config dialog. If we don't have + * such one, either, search for the other type. If we still have no luck, + * return an address with preferred + home/work flag (from config dlg). */ KABC::Address AbbrowserConduit::getAddress(const Addressee & abEntry) { - return abEntry.address((fPilotStreetHome) ?(KABC::Address::Home) :(KABC::Address::Work)); + int type=(fPilotStreetHome)?(KABC::Address::Home):(KABC::Address::Work); + KABC::Address ad(abEntry.address(KABC::Address::Pref)); + if (!ad.isEmpty()) return ad; + ad=abEntry.address(type); + if (!ad.isEmpty()) return ad; + ad=abEntry.address((fPilotStreetHome) ?(KABC::Address::Work):(KABC::Address::Home)); + if (!ad.isEmpty()) return ad; + + return abEntry.address(type | KABC::Address::Pref); } --- kdepim/kpilot/conduits/abbrowserconduit/kaddressbookConduit.ui #1.17:1.18 @@ -343,10 +343,10 @@ <item> <property name="text"> - <string>Home Address</string> + <string>Preferred, then Home Address</string> </property> </item> <item> <property name="text"> - <string>Business Address</string> + <string>Preferred, then Business Address</string> </property> </item> |