# HG changeset patch # User Vincent V. # Date 1336659078 -7200 # Node ID 1e9c4a0a9acf97fc88d1abd953ac10531412eeb0 # Parent 847e7f7d88c18157b67795e479aa9d12f1404050 Option to list full JID in roster Feature #322 diff -r 847e7f7d88c1 -r 1e9c4a0a9acf res/values-fr/strings.xml --- a/res/values-fr/strings.xml Thu May 10 14:03:11 2012 +0200 +++ b/res/values-fr/strings.xml Thu May 10 16:11:18 2012 +0200 @@ -90,6 +90,8 @@ d\'ami(e)s Cachez les groupes Cochez cette option pour cacher les groupes + Affichez les JID + Cochez cette option pour afficher les JIDs des contacts Cachez les contacts déconnectés Cochez cette option pour cacher les contacts déconnectés Nom d\'utilisateur (JID) diff -r 847e7f7d88c1 -r 1e9c4a0a9acf res/values/strings.xml --- a/res/values/strings.xml Thu May 10 14:03:11 2012 +0200 +++ b/res/values/strings.xml Thu May 10 16:11:18 2012 +0200 @@ -90,6 +90,8 @@ Hide groups Check this option to hide groups + Show JID + Check this option to always show Contact\'s JID Hide buddies Check this option to hide unconnected buddies diff -r 847e7f7d88c1 -r 1e9c4a0a9acf res/xml/preferences.xml --- a/res/xml/preferences.xml Thu May 10 14:03:11 2012 +0200 +++ b/res/xml/preferences.xml Thu May 10 16:11:18 2012 +0200 @@ -42,6 +42,9 @@ + diff -r 847e7f7d88c1 -r 1e9c4a0a9acf src/com/beem/project/beem/BeemApplication.java --- a/src/com/beem/project/beem/BeemApplication.java Thu May 10 14:03:11 2012 +0200 +++ b/src/com/beem/project/beem/BeemApplication.java Thu May 10 16:11:18 2012 +0200 @@ -103,6 +103,8 @@ public static final String USE_COMPACT_CHAT_UI_KEY = "use_compact_chat_ui"; /** Preference key for history path on the SDCard. */ public static final String CHAT_HISTORY_KEY = "settings_chat_history_path"; + /** Preference key to show the jid in the contact list. */ + public static final String SHOW_JID = "show_jid"; //TODO add the other one diff -r 847e7f7d88c1 -r 1e9c4a0a9acf src/com/beem/project/beem/ui/ContactListAdapter.java --- a/src/com/beem/project/beem/ui/ContactListAdapter.java Thu May 10 14:03:11 2012 +0200 +++ b/src/com/beem/project/beem/ui/ContactListAdapter.java Thu May 10 16:11:18 2012 +0200 @@ -33,9 +33,11 @@ import java.util.List; import android.content.Context; +import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.net.Uri; +import android.preference.PreferenceManager; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -46,6 +48,7 @@ import android.widget.ImageView; import android.widget.TextView; +import com.beem.project.beem.BeemApplication; import com.beem.project.beem.R; import com.beem.project.beem.providers.AvatarProvider; import com.beem.project.beem.service.Contact; @@ -150,7 +153,11 @@ private void bindView(View view, Contact curContact) { if (curContact != null) { TextView v = (TextView) view.findViewById(R.id.contactlistpseudo); - v.setText(curContact.getName()); + SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context); + if (settings.getBoolean(BeemApplication.SHOW_JID, false)) + v.setText(curContact.getJID()); + else + v.setText(curContact.getName()); v = (TextView) view.findViewById(R.id.contactlistmsgperso); v.setText(curContact.getMsgState()); ImageView img = (ImageView) view.findViewById(R.id.avatar);