GNOME Bugzilla – Bug 351953
Multiple phone numbers in LDAP address book
Last modified: 2008-10-11 05:30:13 UTC
Right now, if I specify "mobile" in the LDAP properties window for search attribute, the VOIP url is created when the users are listed - so I can click on the number and it is automatically dialed. This is great. It would be even better if I could specify mobile, telephoneNumber, and homePhone, etc. and have all three show up as a clickable VOIP URL.
Created attachment 120001 [details] [review] Rough patch The attached patch retrieves multiple attributes from the LDAP server. Currently the set of attributes it returns is hard-coded, but when we come up with a reasonable UI for configuring things, it should be straightforward to clean this up. I copied the menu presentation from evolution-contact.cpp. I think it's rather ugly, but don't know the code base well enough to suggest anything else at the moment.
Uh... std::string* looks awful : what about a std::set<std::string> ?!
(In reply to comment #2) > Uh... std::string* looks awful : what about a std::set<std::string> ?! > Sure. This was a really shoddy first attempt just to make sure I understood how the code was put together. The hardcoded attribute names are unnecessary too; I was following the ATTR_FOO..ATTR_NUMBER approach of the evolution-contact code but we can just parse the call_attribute parameter instead.
We have a way to store a list of strings with forms ; you can for example have a look at lib/engine/presence/local-roster/local-presentity.cpp, where it's used to edit the groups a presentity belongs to.
Created attachment 120115 [details] [review] Better patch This patch overlaps some of the same areas that my patch for Bug#543106 changed, so you need to apply that patch first. I've added a config node for the attribute to use for the contact name, but there's no UI to set it yet, so it will always default to "cn". You can of course use gconf-editor or something to override it.
Created attachment 120118 [details] [review] Minor tweak Had some leftover cruft from the previous attempt that wasn't needed any more. By the way, should probably mark this bug as dependent on #543106 now; I don't have permission to do that myself.
(By the way, in case it wasn't clear, this version now treats the call_attribute config item as a comma-separated list of attribute names. So you can retrieve whatever phone number attributes you're interested in...)
Ok, let's dig bug #543106 first.
Cool, you can mark this bug Fixed now too.
Ok, thanks.