summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/Settings_IP.java
diff options
context:
space:
mode:
authorschwabe <none@none>2012-04-29 15:22:01 +0200
committerschwabe <none@none>2012-04-29 15:22:01 +0200
commit9a6b3b13a6ea67543173bacbc8e01ade44a1382f (patch)
treea40f9151d8bd58ec0c39835168f268101d5a4104 /src/de/blinkt/openvpn/Settings_IP.java
parent6dbfffefaf70609ac5bb7b3ebd71a0258427360a (diff)
Version 0.4
fixes iusse #1 fixes iusse #2 fixes iusse #3
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_IP.java')
-rw-r--r--src/de/blinkt/openvpn/Settings_IP.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/Settings_IP.java b/src/de/blinkt/openvpn/Settings_IP.java
index c2b1ed71..de625d22 100644
--- a/src/de/blinkt/openvpn/Settings_IP.java
+++ b/src/de/blinkt/openvpn/Settings_IP.java
@@ -19,6 +19,7 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
private EditTextPreference mCustomRoutes;
private CheckBoxPreference mUseDefaultRoute;
private VpnProfile mProfile;
+ private CheckBoxPreference mRouteNoPull;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -45,6 +46,7 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
mDNS2 = (EditTextPreference) findPreference("dns2");
mCustomRoutes = (EditTextPreference) findPreference("customRoutes");
mUseDefaultRoute = (CheckBoxPreference) findPreference("useDefaultRoute");
+ mRouteNoPull = (CheckBoxPreference) findPreference("routenopull");
mIPv4.setOnPreferenceChangeListener(this);
mIPv6.setOnPreferenceChangeListener(this);
@@ -72,6 +74,7 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
mSearchdomain.setText(mProfile.mSearchDomain);
mUseDefaultRoute.setChecked(mProfile.mUseDefaultRoute);
mCustomRoutes.setText(mProfile.mCustomRoutes);
+ mRouteNoPull.setChecked(mProfile.mRoutenopull);
// Sets Summary
onPreferenceChange(mIPv4, mIPv4.getText());
@@ -105,7 +108,7 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
mProfile.mSearchDomain = mSearchdomain.getText();
mProfile.mUseDefaultRoute = mUseDefaultRoute.isChecked();
mProfile.mCustomRoutes = mCustomRoutes.getText();
-
+ mProfile.mRoutenopull = mRouteNoPull.isChecked();
}
@@ -120,10 +123,10 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
preference.setSummary((String)newValue);
if(preference== mUsePull || preference == mOverrideDNS)
- if(preference==mOverrideDNS)
+ if(preference==mOverrideDNS) {
// Set so the function gets the right value
mOverrideDNS.setChecked((Boolean) newValue);
-
+ }
setDNSState();
saveSettings();
@@ -133,6 +136,7 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
private void setDNSState() {
boolean enabled;
mOverrideDNS.setEnabled(mUsePull.isChecked());
+ mRouteNoPull.setEnabled(mUsePull.isChecked());
if(!mUsePull.isChecked())
enabled =true;
else if (mOverrideDNS.isChecked())
@@ -143,6 +147,7 @@ public class Settings_IP extends PreferenceFragment implements OnPreferenceChang
mDNS1.setEnabled(enabled);
mDNS2.setEnabled(enabled);
mSearchdomain.setEnabled(enabled);
+
}