# HG changeset patch
# User nikita@nikita-rack
# Date 1242595993 -7200
# Node ID 079488da1bfc275a2d783284def1ade577d0f2c1
# Parent dae38cc05ddfecd16360eb0a67dac70128503e61
Issue #103 #101
Quelques trads et j'ai mit la bonne valeur pour le port jabber par
defaut dans les settings.
diff -r dae38cc05ddf -r 079488da1bfc res/layout/accountcreation.xml
--- a/res/layout/accountcreation.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/accountcreation.xml Sun May 17 23:33:13 2009 +0200
@@ -1,103 +1,55 @@
-
-
-
-
-
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff -r dae38cc05ddf -r 079488da1bfc res/layout/addcontact.xml
--- a/res/layout/addcontact.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/addcontact.xml Sun May 17 23:33:13 2009 +0200
@@ -1,79 +1,45 @@
-
-
-
-
-
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r dae38cc05ddf -r 079488da1bfc res/layout/changestatus.xml
--- a/res/layout/changestatus.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/changestatus.xml Sun May 17 23:33:13 2009 +0200
@@ -1,40 +1,30 @@
-
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
-
-
-
-
-
-
-
-
-
+ android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true" />
+
+
+
+
+
+
+
+
+
-
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_weight="1" android:text="@string/ClearButton" />
+
\ No newline at end of file
diff -r dae38cc05ddf -r 079488da1bfc res/layout/contactlist.xml
--- a/res/layout/contactlist.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/contactlist.xml Sun May 17 23:33:13 2009 +0200
@@ -11,6 +11,6 @@
+ android:layout_height="fill_parent" android:text="@string/ConListNotConnected" />
diff -r dae38cc05ddf -r 079488da1bfc res/layout/contactlistcontact.xml
--- a/res/layout/contactlistcontact.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/contactlistcontact.xml Sun May 17 23:33:13 2009 +0200
@@ -1,42 +1,28 @@
+ android:orientation="horizontal" android:layout_width="fill_parent"
+ android:layout_height="wrap_content" android:paddingLeft="10px"
+ android:paddingRight="10px" android:gravity="center_vertical">
-
+
-
-
-
-
+
+
+
+
-
-
+
+
\ No newline at end of file
diff -r dae38cc05ddf -r 079488da1bfc res/layout/contactlistsettings.xml
--- a/res/layout/contactlistsettings.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/contactlistsettings.xml Sun May 17 23:33:13 2009 +0200
@@ -6,13 +6,13 @@
android:layout_width="fill_parent" android:layout_height="fill_parent">
-
-
-
-
-
-
diff -r dae38cc05ddf -r 079488da1bfc res/layout/sendim.xml
--- a/res/layout/sendim.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/sendim.xml Sun May 17 23:33:13 2009 +0200
@@ -1,103 +1,69 @@
-
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+
+
-
-
-
-
+
+
+ android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:lines="1" android:scrollHorizontally="true"
+ android:hint="@string/SendIMNoStatusSet" android:paddingLeft="15sp" />
-
+
-
-
-
+
+ -->
+
+
-
-
-
-
-
-
-
+ android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb"
+ android:scrollbarSize="12dip" android:layout_weight="1">
+
+
+
+
+
+
+
\ No newline at end of file
diff -r dae38cc05ddf -r 079488da1bfc res/layout/subscription.xml
--- a/res/layout/subscription.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/layout/subscription.xml Sun May 17 23:33:13 2009 +0200
@@ -1,24 +1,17 @@
-
-
-
-
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+
+
+
-
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_weight="1" android:text="@string/RefuseButton" />
+
\ No newline at end of file
diff -r dae38cc05ddf -r 079488da1bfc res/values/strings.xml
--- a/res/values/strings.xml Sun May 17 17:31:39 2009 +0200
+++ b/res/values/strings.xml Sun May 17 23:33:13 2009 +0200
@@ -42,6 +42,33 @@
status
status_text
+
+ Server connection
+ Userid:
+ Password:
+ Service:
+ Host/Port:
+ Proxy informations
+ Login:
+ Ok
+
+
+ Login:
+ Email:
+ Password:
+ Repeat:
+ Ok
+ Bad form
+ Account created
+
+
+ Login:
+ Alias:
+ Group:
+ Ok
+ Contact added
+ Bad form
+
says :\n
@@ -64,6 +91,14 @@
Updating status
Nothing to change
+
+
+ Subscription accepted
+ Subscription error
+ Subscription refused
+
+
+ Not connected
You have got a new message
diff -r dae38cc05ddf -r 079488da1bfc src/com/beem/project/beem/BeemApplication.java
--- a/src/com/beem/project/beem/BeemApplication.java Sun May 17 17:31:39 2009 +0200
+++ b/src/com/beem/project/beem/BeemApplication.java Sun May 17 23:33:13 2009 +0200
@@ -73,8 +73,7 @@
}
}
} catch (RemoteException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ Log.e(TAG, "service connection exception", e);
}
}
};
diff -r dae38cc05ddf -r 079488da1bfc src/com/beem/project/beem/BeemService.java
--- a/src/com/beem/project/beem/BeemService.java Sun May 17 17:31:39 2009 +0200
+++ b/src/com/beem/project/beem/BeemService.java Sun May 17 23:33:13 2009 +0200
@@ -192,7 +192,7 @@
@Override
public void onConnect() throws RemoteException {
- // TODO Auto-generated method stub
+
PacketFilter filter = new PacketFilter() {
@Override
diff -r dae38cc05ddf -r 079488da1bfc src/com/beem/project/beem/ui/AccountCreation.java
--- a/src/com/beem/project/beem/ui/AccountCreation.java Sun May 17 17:31:39 2009 +0200
+++ b/src/com/beem/project/beem/ui/AccountCreation.java Sun May 17 23:33:13 2009 +0200
@@ -37,7 +37,7 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.accountcreation);
- Button ok = (Button) findViewById(R.id.ok);
+ Button ok = (Button) findViewById(R.id.ac_ok);
mSettings = getSharedPreferences(
getString(R.string.PreferenceFileName), MODE_PRIVATE);
ok.setOnClickListener(mOkListener);
@@ -48,30 +48,29 @@
@Override
public void onClick(View v) {
boolean valid = true;
- if (getWidgetText(R.id.login).length() == 0) {
- Log.d(TAG, "login pas ok");
+ if (getWidgetText(R.id.ac_login).length() == 0) {
valid = false;
} else {
- mAttributes.put("login", getWidgetText(R.id.login));
- mAttributes.put("name", getWidgetText(R.id.login));
+ mAttributes.put("login", getWidgetText(R.id.ac_login));
+ mAttributes.put("name", getWidgetText(R.id.ac_login));
}
- if (getWidgetText(R.id.password).length() == 0 || !getWidgetText(R.id.password).contains(getWidgetText(R.id.password2))) {
+ if (getWidgetText(R.id.ac_password).length() == 0 || !getWidgetText(R.id.ac_password).contains(getWidgetText(R.id.ac_password2))) {
valid = false;
} else {
mAttributes.put("password", getWidgetText(R.id.password));
}
- if (getWidgetText(R.id.email).length() == 0) {
+ if (getWidgetText(R.id.ac_email).length() == 0) {
valid = false;
} else {
- mAttributes.put("email", getWidgetText(R.id.email));
+ mAttributes.put("email", getWidgetText(R.id.ac_email));
}
if (valid) {
setResult(RESULT_OK);
try {
createAccount();
- Toast.makeText(AccountCreation.this, "Account created",
+ Toast.makeText(AccountCreation.this, getString(R.string.ACCreated),
Toast.LENGTH_SHORT).show();
finish();
} catch (XMPPException e) {
@@ -81,7 +80,7 @@
e.printStackTrace();
}
} else {
- Toast.makeText(AccountCreation.this, "Form error",
+ Toast.makeText(AccountCreation.this, getString(R.string.ACBadForm),
Toast.LENGTH_SHORT).show();
setResult(RESULT_CANCELED);
}
diff -r dae38cc05ddf -r 079488da1bfc src/com/beem/project/beem/ui/AddContact.java
--- a/src/com/beem/project/beem/ui/AddContact.java Sun May 17 17:31:39 2009 +0200
+++ b/src/com/beem/project/beem/ui/AddContact.java Sun May 17 23:33:13 2009 +0200
@@ -13,7 +13,6 @@
import android.app.Activity;
import android.os.Bundle;
import android.os.RemoteException;
-import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
@@ -36,7 +35,7 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addcontact);
- Button ok = (Button) findViewById(R.id.AC_ok);
+ Button ok = (Button) findViewById(R.id.addc_ok);
//mAccountManager = new AccountManager();
ok.setOnClickListener(mOkListener);
mService = BeemApplication.getApplication(this).getXmppFacade();
@@ -47,28 +46,25 @@
@Override
public void onClick(View v) {
boolean valid = true;
- if (getWidgetText(R.id.AC_login).length() == 0) {
- Log.d(TAG, "login pas ok");
+ if (getWidgetText(R.id.addc_login).length() == 0) {
valid = false;
} else {
- mLogin = getWidgetText(R.id.AC_login);
+ mLogin = getWidgetText(R.id.addc_login);
}
- if (getWidgetText(R.id.AC_alias).length() == 0) {
- Log.d(TAG, "alias pas ok");
+ if (getWidgetText(R.id.addc_alias).length() == 0) {
valid = false;
} else {
- mAlias = getWidgetText(R.id.AC_alias);
+ mAlias = getWidgetText(R.id.addc_alias);
}
- if (getWidgetText(R.id.AC_group).length() == 0) {
- Log.d(TAG, "group pas ok");
+ if (getWidgetText(R.id.addc_group).length() == 0) {
valid = false;
} else {
- mGroup.add(getWidgetText(R.id.AC_group));
+ mGroup.add(getWidgetText(R.id.addc_group));
}
if (valid) {
try {
mService.getRoster().addContact(mLogin, mAlias, (String[])mGroup.toArray(new String[mGroup.size()]));
- Toast.makeText(AddContact.this, "Contact added",
+ Toast.makeText(AddContact.this, getString(R.string.AddCContactAdded),
Toast.LENGTH_SHORT).show();
finish();
} catch (RemoteException e) {
@@ -78,7 +74,7 @@
}
setResult(RESULT_OK);
} else {
- Toast.makeText(AddContact.this, "Bad form",
+ Toast.makeText(AddContact.this, getString(R.string.AddCBadForm),
Toast.LENGTH_SHORT).show();
setResult(RESULT_CANCELED);
}
diff -r dae38cc05ddf -r 079488da1bfc src/com/beem/project/beem/ui/ContactListSettings.java
--- a/src/com/beem/project/beem/ui/ContactListSettings.java Sun May 17 17:31:39 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactListSettings.java Sun May 17 23:33:13 2009 +0200
@@ -144,7 +144,7 @@
EditText e = (EditText) findViewById(R.id.host);
e.setText(getPreferenceString(R.string.PreferenceHostKey));
e = (EditText) findViewById(R.id.port);
- e.setText(String.valueOf(mSettings.getInt(getString(R.string.PreferencePortKey), 1080)));
+ e.setText(String.valueOf(mSettings.getInt(getString(R.string.PreferencePortKey), 5222)));
e = (EditText) findViewById(R.id.userid);
e.setText(getPreferenceString(R.string.PreferenceLoginKey));
e = (EditText) findViewById(R.id.password);
diff -r dae38cc05ddf -r 079488da1bfc src/com/beem/project/beem/ui/Subscription.java
--- a/src/com/beem/project/beem/ui/Subscription.java Sun May 17 17:31:39 2009 +0200
+++ b/src/com/beem/project/beem/ui/Subscription.java Sun May 17 23:33:13 2009 +0200
@@ -23,10 +23,10 @@
*
*/
public class Subscription extends Activity {
-
+
private IXmppFacade mService;
private String mContact;
-
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -36,7 +36,7 @@
mContact = getIntent().getStringExtra("from");
mService = BeemApplication.getApplication(this).getXmppFacade();
}
-
+
private OnClickListener mClickListener = new OnClickListener() {
@Override
@@ -48,26 +48,26 @@
PresenceAdapter preAdapt = new PresenceAdapter(presence);
try {
mService.sendPresencePacket(preAdapt);
- Toast.makeText(Subscription.this, "Subscription accept",
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptAccept),
+ Toast.LENGTH_SHORT).show();
finish();
} catch (RemoteException e) {
- Toast.makeText(Subscription.this, "Subscription error",
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptError),
+ Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
break ;
case R.id.SubscriptionRefuse:
- Toast.makeText(Subscription.this, "Subscription refused",
- Toast.LENGTH_SHORT).show();
-
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptRefused),
+ Toast.LENGTH_SHORT).show();
+
break ;
default:
- Toast.makeText(Subscription.this, "Subscription error",
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptError),
+ Toast.LENGTH_SHORT).show();
};
-
+
}
-
+
};
}