Revision 94abc2c7 src/com/rackspace/cloud/android/ListAccountsActivity.java
b/src/com/rackspace/cloud/android/ListAccountsActivity.java | ||
---|---|---|
10 | 10 |
import java.util.ArrayList; |
11 | 11 |
import java.util.TreeMap; |
12 | 12 |
|
13 |
import android.app.AlertDialog; |
|
13 | 14 |
import android.app.ProgressDialog; |
14 | 15 |
import android.content.Context; |
15 | 16 |
import android.content.DialogInterface; |
... | ... | |
233 | 234 |
startActivityForResult(intent, 78); // arbitrary number; never used again |
234 | 235 |
return true; |
235 | 236 |
case R.id.login_pithos: |
237 |
|
|
238 |
final CharSequence[] items = {"Pithos+ Dev", "Pithos +"}; |
|
239 |
|
|
240 |
AlertDialog.Builder builder = new AlertDialog.Builder(this); |
|
241 |
builder.setTitle("User Or Group"); |
|
242 |
builder.setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() { |
|
243 |
public void onClick(DialogInterface dialog, int item) { |
|
244 |
String login; |
|
245 |
String auth; |
|
246 |
Log.d(getClass().getName(),"Item is :"+item); |
|
247 |
if(item ==0){ |
|
248 |
login="https://pithos.dev.grnet.gr/im/local?next=https://pithos.dev.grnet.gr/ui"; |
|
249 |
auth= Preferences.PITHOS_DEV_SERVER; |
|
250 |
} |
|
251 |
else{ |
|
252 |
login="https://plus.pithos.grnet.gr/im/local"; |
|
253 |
auth= Preferences.PITHOS_SERVER; |
|
254 |
} |
|
255 |
Intent intent2 = new Intent(ListAccountsActivity.this, PithosLoginActivity.class); |
|
256 |
//intent2.putExtra("login", "https://pithos.dev.grnet.gr/im/login"); |
|
257 |
//intent2.putExtra("auth", Preferences.PITHOS_DEV_SERVER); |
|
258 |
intent2.putExtra("login", login); |
|
259 |
intent2.putExtra("auth", auth); |
|
260 |
dialog.dismiss(); |
|
261 |
startActivityForResult(intent2, 78); |
|
262 |
} |
|
263 |
}); |
|
264 |
AlertDialog alert2 = builder.create(); |
|
265 |
alert2.show(); |
|
266 |
|
|
267 |
/* |
|
236 | 268 |
Intent intent2 = new Intent(this, PithosLoginActivity.class); |
237 | 269 |
//intent2.putExtra("login", "https://pithos.dev.grnet.gr/im/login"); |
238 | 270 |
//intent2.putExtra("auth", Preferences.PITHOS_DEV_SERVER); |
239 | 271 |
intent2.putExtra("login", "https://plus.pithos.grnet.gr/im/login"); |
240 | 272 |
intent2.putExtra("auth", Preferences.PITHOS_SERVER); |
241 | 273 |
startActivityForResult(intent2, 78); // arbitrary number; never used again |
274 |
*/ |
|
242 | 275 |
return true; |
243 | 276 |
|
244 | 277 |
case R.id.contact_rackspace: |
Also available in: Unified diff