# HG changeset patch # User Vincent Veronis # Date 1254478006 -7200 # Node ID 45667283cbebc0e1c5f98066f4e133852497e299 # Parent 6cf10e4b3714afa2998b2aab9c0d004bb011bde4 Ajout qqls dialog dans la userinfo. Menage. diff -r 6cf10e4b3714 -r 45667283cbeb res/values-en/strings.xml --- a/res/values-en/strings.xml Thu Oct 01 18:32:03 2009 +0200 +++ b/res/values-en/strings.xml Fri Oct 02 12:06:46 2009 +0200 @@ -36,16 +36,7 @@ Chat Call - Alias - Resend suscription Manage User - Block user - Delete user - Are you sure you want to delete this contact? - - Yes - No - Beem - Add contact @@ -229,20 +220,24 @@ - Add a contact - Settings - All contacts - No group + --> + Add a contact + Settings + All contacts + No group - - Alias - Manage groups - Resend suscription - Block - Delete - Suscription resend + --> + Alias + Manage groups + Resend invit + Block + Delete + Suscription resend + Are you sure you want to delete this contact? + Yes + No + Are you sure you want to resend invit? diff -r 6cf10e4b3714 -r 45667283cbeb res/values-fr/strings.xml --- a/res/values-fr/strings.xml Thu Oct 01 18:32:03 2009 +0200 +++ b/res/values-fr/strings.xml Fri Oct 02 12:06:46 2009 +0200 @@ -20,7 +20,8 @@ status status_text - preference_is_configured + preference_is_configured + Connexion au serveur @@ -36,9 +37,6 @@ Chat Appeller Gestion utilisateur - Êtes-vous sûr de vouloir supprimer ce contact ? - Oui - Non Beem - Ajouter un contact @@ -228,11 +226,15 @@ - Alias - Modifier groupe - Renvoyer souscription - Bloquer - Supprimer - Souscription réenvoyée + --> + Alias + Modifier groupe + Renvoyer l'invitation + Bloquer + Supprimer + Souscription réenvoyée + Etes vous sur de vouloir supprimer ce contact? + Oui + Non + Etes vous sur de vouloir renvoyer l'invitation? diff -r 6cf10e4b3714 -r 45667283cbeb src/com/beem/project/beem/ui/UserInfo.java --- a/src/com/beem/project/beem/ui/UserInfo.java Thu Oct 01 18:32:03 2009 +0200 +++ b/src/com/beem/project/beem/ui/UserInfo.java Fri Oct 02 12:06:46 2009 +0200 @@ -118,7 +118,7 @@ } } - + /** * Event simple click on layout group. */ @@ -260,14 +260,28 @@ @Override public void onClick(View v) { - Presence presencePacket = new Presence(Presence.Type.subscribe); - presencePacket.setTo(mContact.getJID()); - try { - mXmppFacade.sendPresencePacket(new PresenceAdapter(presencePacket)); - } catch (RemoteException e) { - e.printStackTrace(); - } - Toast.makeText(UserInfo.this, getString(R.string.userinfo_resend), Toast.LENGTH_LONG).show(); + + AlertDialog.Builder builder = new AlertDialog.Builder(UserInfo.this); + builder.setMessage(UserInfo.this.getString(R.string.userinfo_sureresend)).setCancelable(false).setPositiveButton( + UserInfo.this.getString(R.string.userinfo_yes), new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + Presence presencePacket = new Presence(Presence.Type.subscribe); + presencePacket.setTo(mContact.getJID()); + try { + mXmppFacade.sendPresencePacket(new PresenceAdapter(presencePacket)); + } catch (RemoteException e) { + e.printStackTrace(); + } + Toast.makeText(UserInfo.this, getString(R.string.userinfo_resend), Toast.LENGTH_SHORT).show(); + } + }).setNegativeButton(UserInfo.this.getString(R.string.userinfo_no), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }); + AlertDialog alert = builder.create(); + alert.show(); } } @@ -286,8 +300,8 @@ @Override public void onClick(View v) { AlertDialog.Builder builder = new AlertDialog.Builder(UserInfo.this); - builder.setMessage(UserInfo.this.getString(R.string.CDSure2Delete)).setCancelable(false).setPositiveButton( - UserInfo.this.getString(R.string.CDSure2DeleteYes), new DialogInterface.OnClickListener() { + builder.setMessage(UserInfo.this.getString(R.string.userinfo_sure2delete)).setCancelable(false).setPositiveButton( + UserInfo.this.getString(R.string.userinfo_yes), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { try { mXmppFacade.getRoster().deleteContact(mContact); @@ -295,7 +309,7 @@ e.printStackTrace(); } } - }).setNegativeButton(UserInfo.this.getString(R.string.CDSure2DeleteNo), + }).setNegativeButton(UserInfo.this.getString(R.string.userinfo_no), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); @@ -326,7 +340,7 @@ try { IRoster r = mXmppFacade.getRoster(); if (r != null) { - + setTitle(mJID); mContact = r.getContact(mJID); mTextAlias.setText(mContact.getName());