diff options
author | Parménides GV <parmegv@sdf.org> | 2013-10-14 13:08:22 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-11-19 17:52:47 +0100 |
commit | aa2b794baeffe7afc8c3c5bbac8b76e8829af84f (patch) | |
tree | 88d552ee86869c4fe91763680e884937df2b344f /src/se/leap/bitmaskclient/ConfigurationWizard.java | |
parent | 5ad4fada2452645fcd60f2ff1b8dac7fddeaadc9 (diff) |
Successfully rebased onto progress-bars.
Diffstat (limited to 'src/se/leap/bitmaskclient/ConfigurationWizard.java')
-rw-r--r-- | src/se/leap/bitmaskclient/ConfigurationWizard.java | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/se/leap/bitmaskclient/ConfigurationWizard.java b/src/se/leap/bitmaskclient/ConfigurationWizard.java index cb1d01db..faff4455 100644 --- a/src/se/leap/bitmaskclient/ConfigurationWizard.java +++ b/src/se/leap/bitmaskclient/ConfigurationWizard.java @@ -148,16 +148,14 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn if(resultData.containsKey(Provider.NAME)) {
String provider_id = resultData.getString(Provider.NAME);
mSelectedProvider = getProvider(provider_id);
- provider_list_fragment.addItem(mSelectedProvider);
- ProviderListContent.removeItem(mSelectedProvider);
+ //provider_list_fragment.addItem(mSelectedProvider);
+ //ProviderListContent.removeItem(mSelectedProvider);
- if(mSelectedProvider.custom)
- refreshProviderList(0);
+ //refreshProviderList(0);
if(!mProgressBar.isShown()) {
int provider_index = getProviderIndex(provider_id);
startProgressBar(provider_index);
- provider_list_fragment = (ProviderListFragment) getFragmentManager().findFragmentByTag(ProviderListFragment.TAG);
provider_list_fragment.hide(provider_index-2);
//setProviderList(provider_list_fragment);
}
@@ -170,7 +168,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn e.printStackTrace();
mProgressBar.setVisibility(ProgressBar.GONE);
progressbar_description.setVisibility(TextView.GONE);
- refreshProviderList(0);
+ //refreshProviderList(0);
//Toast.makeText(this, getResources().getString(R.string.config_error_parsing), Toast.LENGTH_LONG);
setResult(RESULT_CANCELED, mConfigState);
}
@@ -193,7 +191,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn mProgressBar.incrementProgressBy(1);
mProgressBar.setVisibility(ProgressBar.GONE);
progressbar_description.setVisibility(TextView.GONE);
- refreshProviderList(0);
+ //refreshProviderList(0);
//Toast.makeText(getApplicationContext(), R.string.success, Toast.LENGTH_LONG).show();
setResult(RESULT_OK);
showProviderDetails(getCurrentFocus());
@@ -286,7 +284,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn while(providers_iterator.hasNext()) {
ProviderItem provider = providers_iterator.next();
index++;
- if(provider.id.equalsIgnoreCase(id)) {
+ if(provider.name().equalsIgnoreCase(id)) {
break;
}
}
@@ -445,18 +443,22 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn private void showProvider(final String provider_main_url, final boolean danger_on) {
String provider_name = provider_main_url.replaceFirst("http[s]?://", "").replaceFirst("\\/", "_");
- boolean custom = true;
- final ProviderItem added_provider = new ProviderItem(provider_name, provider_main_url, custom, danger_on);
+ final ProviderItem added_provider = new ProviderItem(provider_name, provider_main_url, danger_on);
+
+ //ProviderListContent.addItem(added_provider);
+ provider_list_fragment.addItem(added_provider);
+ /*ProviderListFragment provider_list_fragment = (ProviderListFragment) getFragmentManager().findFragmentByTag(ProviderListFragment.TAG);
+ //provider_list_fragment.notifyAdapter();
+ provider_list_fragment.addItem(added_provider);
+ refreshProviderList(0);
+
runOnUiThread(new Runnable() {
@Override
public void run() {
- // TODO Auto-generated method stub
- ProviderListContent.addItem(added_provider);
- ProviderListFragment provider_list_fragment = (ProviderListFragment) getFragmentManager().findFragmentByTag("providerlist");
- provider_list_fragment.notifyAdapter();
+ provider_list_fragment.addItem(added_provider);
}
- });
+ });*/
}
/**
|