#5 Addressbook: configurable search result format

closed-out-of-date
nobody
Plugins (9)
5
2012-10-01
2007-09-11
No

Attached you will find a proposed patch to current svn trunk (r478).

This patch allows a user to choose how the search results in the address book plugin are displayed. There are 4 formats possible:
- "givenName sn", for example "Jack Daniels"
- "sn givenName", for example "Daniels Jack"
- "sn, givenName", for example "Daniels, Jack"
- "Directory default", this is the original behaviour, which means use "cn" as found in LDAP, or try to assemble "sn givenName".

In all cases, if givenName or sn doesn't exist, only the other part is displayed.

I created this patch because I find it easier to organize the search results with surname first. The choice between with our without comma is cosmetic (I noticed both Evolution and KAddressbook provide this choice, so I added it as well.

Note that the changes are only in the GUI. The way things are stored in LDAP or retrieved from LDAP hasn't changed.

Technical details:
* a combobox has been added to the Addressbook Settings plugin. The user can use this combobox to choose the prefered search result display format.
* the chosen setting is stored to and retrieved from the plugins config file as well just like the filter settings.
* the LumaEntryBrowser now checks for a configuration option "format", and uses this to decide how the search results should be displayed.
* the LumaEntryBrowser is also used by the UserManagement plugin. I checked to see if my changes had any impact there. It appears not.

The patch is an svn diff of these files:
- AddressbookSettingsDesign.ui
- AddressbookSettingsDesign.py
- AddressbookSettings.py
- LumaEntryBrowser.py

Regards,

Geert

Discussion

  • phobie

    phobie - 2012-10-01
    • status: open --> closed-out-of-date
     

Log in to post a comment.