# HG changeset patch # User marseille # Date 1240531168 -7200 # Node ID d076437706a4d125789102194ac1bccd564e7bc8 # Parent 6e008c3695ffe4737ec1eedee60cb1132191dd5d La connection a talk.google.com is OK ! Horizontal and vertical view are acceptable . Upgrade the Send IM view with log in file. diff -r 6e008c3695ff -r d076437706a4 AndroidManifest.xml --- a/AndroidManifest.xml Fri Apr 24 00:55:18 2009 +0200 +++ b/AndroidManifest.xml Fri Apr 24 01:59:28 2009 +0200 @@ -2,7 +2,8 @@ - + @@ -30,5 +31,5 @@ - + diff -r 6e008c3695ff -r d076437706a4 res/layout/contactlistsettings.xml --- a/res/layout/contactlistsettings.xml Fri Apr 24 00:55:18 2009 +0200 +++ b/res/layout/contactlistsettings.xml Fri Apr 24 01:59:28 2009 +0200 @@ -2,90 +2,22 @@ - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + - - + + + + + - + + + + + + + + + + + + \ No newline at end of file diff -r 6e008c3695ff -r d076437706a4 res/values/strings.xml --- a/res/values/strings.xml Fri Apr 24 00:55:18 2009 +0200 +++ b/res/values/strings.xml Fri Apr 24 01:59:28 2009 +0200 @@ -27,6 +27,7 @@ Jabber ID login password + service port proxy_host proxy_port diff -r 6e008c3695ff -r d076437706a4 src/com/beem/project/beem/BeemApplication.java --- a/src/com/beem/project/beem/BeemApplication.java Fri Apr 24 00:55:18 2009 +0200 +++ b/src/com/beem/project/beem/BeemApplication.java Fri Apr 24 01:59:28 2009 +0200 @@ -69,6 +69,7 @@ mConnection.addConnectionListener(mConnectionListener); mApplicationContext.startService(BeemApplication.SERVICE_INTENT); }else { + mProgressDialog.dismiss(); synchronized (mQueue) { for (Message msg : mQueue) { msg.sendToTarget(); diff -r 6e008c3695ff -r d076437706a4 src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Fri Apr 24 00:55:18 2009 +0200 +++ b/src/com/beem/project/beem/BeemService.java Fri Apr 24 01:59:28 2009 +0200 @@ -49,6 +49,7 @@ private String mLogin; private String mPassword; private String mHost; + private String mService; private int mPort; private ConnectionConfiguration mConnectionConfiguration; private ProxyInfo mProxyInfo; @@ -83,6 +84,7 @@ mPassword = mSettings.getString(getString(R.string.PreferencePasswordKey), ""); mHost = mSettings.getString(getString(R.string.PreferenceHostKey), ""); mPort = mSettings.getInt(getString(R.string.PreferencePortKey), 5222); + mService = mSettings.getString(getString(R.string.PreferenceService), ""); // TODO penser a commenter // mHost = "10.0.2.2"; @@ -139,7 +141,7 @@ int pport = mSettings.getInt(getString(R.string.PreferenceProxyPort), 1080); ProxyInfo.ProxyType type = ProxyType.valueOf(stype); mProxyInfo = new ProxyInfo(type, phost, pport, puser, ppass); - mConnectionConfiguration = new ConnectionConfiguration(mHost, mPort, mProxyInfo); + mConnectionConfiguration = new ConnectionConfiguration(mHost, mPort, mService, mProxyInfo); } else { mConnectionConfiguration = new ConnectionConfiguration(mHost, mPort); } diff -r 6e008c3695ff -r d076437706a4 src/com/beem/project/beem/ui/ContactList.java --- a/src/com/beem/project/beem/ui/ContactList.java Fri Apr 24 00:55:18 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactList.java Fri Apr 24 01:59:28 2009 +0200 @@ -64,8 +64,6 @@ mBeemApplication = BeemApplication.getApplication(this); mRosterListener = new BeemRosterListener(); mSettings = getSharedPreferences(getString(R.string.PreferenceFileName), MODE_PRIVATE); - mBeemApplication.startBeemService(); - // bug fixe temporaire des betises de marseille /* * SharedPreferences mSettings = getSharedPreferences(getString(R.string.PreferenceFileName), MODE_PRIVATE); @@ -77,6 +75,8 @@ @Override protected void onResume() { super.onResume(); + if (!mBeemApplication.isConnected()) + mBeemApplication.startBeemService(); mBeemApplication.callWhenConnectedToServer(new Handler(), new Runnable() { @Override public void run() { diff -r 6e008c3695ff -r d076437706a4 src/com/beem/project/beem/ui/ContactListSettings.java --- a/src/com/beem/project/beem/ui/ContactListSettings.java Fri Apr 24 00:55:18 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactListSettings.java Fri Apr 24 01:59:28 2009 +0200 @@ -5,6 +5,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; +import android.text.Layout; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; @@ -16,6 +17,7 @@ import android.widget.Spinner; import android.widget.TextView; import android.widget.AdapterView.OnItemSelectedListener; +import android.widget.LinearLayout.LayoutParams; import com.beem.project.beem.R; @@ -52,19 +54,6 @@ showSettings(); Button ok = (Button) findViewById(R.id.ok); ok.setOnClickListener(mOkListener); - - Button reco = (Button) findViewById(R.id.reconnect); - reco.setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View v) { - if (mSettings.getString(getString(R.string.PreferenceHostKey), "") != "") { - setResult(RESULT_OK); - finish(); - } - } - - }); } private OnItemSelectedListener mProxyType = new OnItemSelectedListener() { @@ -74,12 +63,16 @@ String value = parent.getSelectedItem().toString(); LinearLayout ll = (LinearLayout) findViewById(R.id.proxy_layout); SharedPreferences.Editor editor = mSettings.edit(); - + LayoutParams lp = (LayoutParams) ll.getLayoutParams(); if (value.equals(getString(R.string.PreferenceProxyTypeNone))) { - ll.setVisibility(LinearLayout.INVISIBLE); + ll.setVisibility(LinearLayout.INVISIBLE); + lp.height = 0; + ll.setLayoutParams(lp); editor.putBoolean(getString(R.string.PreferenceUseProxy), false); } else { ll.setVisibility(LinearLayout.VISIBLE); + lp.height = LayoutParams.WRAP_CONTENT; + ll.setLayoutParams(lp); editor.putBoolean(getString(R.string.PreferenceUseProxy), true); } if (!value.equals(getPreferenceString(R.string.PreferenceProxyType))) { @@ -115,6 +108,10 @@ editor.putString(getString(R.string.PreferencePasswordKey), getWidgetText(R.id.password)); mIsChanged = true; } + if (isChanged(R.id.host, R.string.PreferenceService)) { + editor.putString(getString(R.string.PreferenceService), getWidgetText(R.id.service)); + mIsChanged = true; + } if (isChanged(R.id.proxy_host, R.string.PreferenceProxyHost)) { editor.putString(getString(R.string.PreferenceProxyHost), getWidgetText(R.id.proxy_host)); @@ -157,6 +154,8 @@ e.setText(getPreferenceString(R.string.PreferenceLoginKey)); e = (EditText) findViewById(R.id.password); e.setText(getPreferenceString(R.string.PreferencePasswordKey)); + e = (EditText) findViewById(R.id.service); + e.setText(getPreferenceString(R.string.PreferenceService)); e = (EditText) findViewById(R.id.proxy_host); e.setText(getPreferenceString(R.string.PreferenceProxyHost)); diff -r 6e008c3695ff -r d076437706a4 src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Fri Apr 24 00:55:18 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Fri Apr 24 01:59:28 2009 +0200 @@ -109,7 +109,8 @@ @Override protected void onResume() { super.onResume(); - mBeemApplication.startBeemService(); + if (!mBeemApplication.isConnected()) + mBeemApplication.startBeemService(); mBeemApplication.callWhenConnectedToServer(mHandler, new Runnable() { @Override