summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/Settings_Routing.java
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-01-22 22:26:08 -0700
committerSean Leonard <meanderingcode@aetherislands.net>2013-01-22 22:26:08 -0700
commit2bb6e8c9a956c56658807c7f2d25ab850243bbe6 (patch)
tree9e3a2e318d0503b33d94514836b8a9bc2db8aaa6 /src/de/blinkt/openvpn/Settings_Routing.java
parent613543d9c00e607f25e7f745a60fb4e3ec3b5148 (diff)
Start rebranding: a whole lotta string replacement, moving src/ file tree
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Routing.java')
-rw-r--r--src/de/blinkt/openvpn/Settings_Routing.java72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/de/blinkt/openvpn/Settings_Routing.java b/src/de/blinkt/openvpn/Settings_Routing.java
deleted file mode 100644
index 202c45c1..00000000
--- a/src/de/blinkt/openvpn/Settings_Routing.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package de.blinkt.openvpn;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.EditTextPreference;
-import android.preference.Preference;
-import android.preference.Preference.OnPreferenceChangeListener;
-
-
-public class Settings_Routing extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener {
- private EditTextPreference mCustomRoutes;
- private CheckBoxPreference mUseDefaultRoute;
- private EditTextPreference mCustomRoutesv6;
- private CheckBoxPreference mUseDefaultRoutev6;
- private CheckBoxPreference mRouteNoPull;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Load the preferences from an XML resource
- addPreferencesFromResource(R.xml.vpn_routing);
- mCustomRoutes = (EditTextPreference) findPreference("customRoutes");
- mUseDefaultRoute = (CheckBoxPreference) findPreference("useDefaultRoute");
- mCustomRoutesv6 = (EditTextPreference) findPreference("customRoutesv6");
- mUseDefaultRoutev6 = (CheckBoxPreference) findPreference("useDefaultRoutev6");
- mRouteNoPull = (CheckBoxPreference) findPreference("routenopull");
-
- mCustomRoutes.setOnPreferenceChangeListener(this);
- mCustomRoutesv6.setOnPreferenceChangeListener(this);
-
- loadSettings();
- }
-
- @Override
- protected void loadSettings() {
-
- mUseDefaultRoute.setChecked(mProfile.mUseDefaultRoute);
- mUseDefaultRoutev6.setChecked(mProfile.mUseDefaultRoutev6);
-
- mCustomRoutes.setText(mProfile.mCustomRoutes);
- mCustomRoutesv6.setText(mProfile.mCustomRoutesv6);
-
- mRouteNoPull.setChecked(mProfile.mRoutenopull);
-
- // Sets Summary
- onPreferenceChange(mCustomRoutes, mCustomRoutes.getText());
- onPreferenceChange(mCustomRoutesv6, mCustomRoutesv6.getText());
- mRouteNoPull.setEnabled(mProfile.mUsePull);
- }
-
-
- @Override
- protected void saveSettings() {
- mProfile.mUseDefaultRoute = mUseDefaultRoute.isChecked();
- mProfile.mUseDefaultRoutev6 = mUseDefaultRoutev6.isChecked();
- mProfile.mCustomRoutes = mCustomRoutes.getText();
- mProfile.mCustomRoutesv6 = mCustomRoutesv6.getText();
- mProfile.mRoutenopull = mRouteNoPull.isChecked();
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference,
- Object newValue) {
- if( preference == mCustomRoutes || preference == mCustomRoutesv6 )
- preference.setSummary((String)newValue);
-
- saveSettings();
- return true;
- }
-
-
-} \ No newline at end of file