src/com/beem/project/beem/ui/ContactListSettings.java
changeset 115 59c052ee1c90
parent 114 a40f65ceeb1a
child 116 dded6cd76f8c
equal deleted inserted replaced
114:a40f65ceeb1a 115:59c052ee1c90
    70 	    }
    70 	    }
    71 	    if (!value.equals(getPreferenceString(R.string.PreferenceProxyType))) {
    71 	    if (!value.equals(getPreferenceString(R.string.PreferenceProxyType))) {
    72 		editor.putString(getString(R.string.PreferenceProxyType), value);
    72 		editor.putString(getString(R.string.PreferenceProxyType), value);
    73 		mIsChanged = true;
    73 		mIsChanged = true;
    74 	    }
    74 	    }
       
    75 	    editor.commit();
    75 	}
    76 	}
    76 
    77 
    77 	@Override
    78 	@Override
    78 	public void onNothingSelected(AdapterView<?> arg0) {
    79 	public void onNothingSelected(AdapterView<?> arg0) {
    79 	}
    80 	}
   103 
   104 
   104 	    if (isChanged(R.id.proxy_host, R.string.PreferenceProxyHost)) {
   105 	    if (isChanged(R.id.proxy_host, R.string.PreferenceProxyHost)) {
   105 		editor.putString(getString(R.string.PreferenceProxyHost), getWidgetText(R.id.proxy_host));
   106 		editor.putString(getString(R.string.PreferenceProxyHost), getWidgetText(R.id.proxy_host));
   106 		mIsChanged = true;
   107 		mIsChanged = true;
   107 	    }
   108 	    }
   108 	    if (isChanged(R.id.proxy_port, R.string.PreferenceProxyPort)) {
   109 	    if (Integer.parseInt(getWidgetText(R.id.proxy_port)) != mSettings.getInt(getString(R.string.PreferenceProxyPort), 1080) ) {
   109 		editor.putString(getString(R.string.PreferenceProxyPort), getWidgetText(R.id.proxy_port));
   110 		editor.putInt(getString(R.string.PreferenceProxyPort), Integer.parseInt(getWidgetText(R.id.proxy_port)));
   110 		mIsChanged = true;
   111 		mIsChanged = true;
   111 	    }
   112 	    }
   112 	    if (isChanged(R.id.proxy_login, R.string.PreferenceProxyUser)) {
   113 	    if (isChanged(R.id.proxy_login, R.string.PreferenceProxyUser)) {
   113 		editor.putString(getString(R.string.PreferenceProxyUser), getWidgetText(R.id.proxy_login));
   114 		editor.putString(getString(R.string.PreferenceProxyUser), getWidgetText(R.id.proxy_login));
   114 		mIsChanged = true;
   115 		mIsChanged = true;
   142 	e.setText(getPreferenceString(R.string.PreferencePasswordKey));
   143 	e.setText(getPreferenceString(R.string.PreferencePasswordKey));
   143 
   144 
   144 	e = (EditText) findViewById(R.id.proxy_host);
   145 	e = (EditText) findViewById(R.id.proxy_host);
   145 	e.setText(getPreferenceString(R.string.PreferenceProxyHost));
   146 	e.setText(getPreferenceString(R.string.PreferenceProxyHost));
   146 	e = (EditText) findViewById(R.id.proxy_port);
   147 	e = (EditText) findViewById(R.id.proxy_port);
   147 	e.setText(getPreferenceString(R.string.PreferenceProxyPort));
   148 	e.setText(String.valueOf(mSettings.getInt(getString(R.string.PreferenceProxyPort), 1080)));
   148 	e = (EditText) findViewById(R.id.proxy_login);
   149 	e = (EditText) findViewById(R.id.proxy_login);
   149 	e.setText(getPreferenceString(R.string.PreferenceProxyUser));
   150 	e.setText(getPreferenceString(R.string.PreferenceProxyUser));
   150 	e = (EditText) findViewById(R.id.proxy_pwd);
   151 	e = (EditText) findViewById(R.id.proxy_pwd);
   151 	e.setText(getPreferenceString(R.string.PreferenceProxyPassword));
   152 	e.setText(getPreferenceString(R.string.PreferenceProxyPassword));
   152     }
   153     }