diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6264bf8..c74a7cf 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="11" + android:versionName="0.9.10" > diff --git a/src/org/poirsouille/tinc_gui/TincActivity.java b/src/org/poirsouille/tinc_gui/TincActivity.java index 7465818..c8dd341 100644 --- a/src/org/poirsouille/tinc_gui/TincActivity.java +++ b/src/org/poirsouille/tinc_gui/TincActivity.java @@ -33,6 +33,7 @@ import android.os.Build; import android.os.Bundle; import android.os.IBinder; +import android.preference.PreferenceManager; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -263,7 +264,7 @@ private void updateStatus() private void updateLog(String iData) { - _logTextView.setTextSize(_service.getLogFontSize()); + _logTextView.setTextSize(getLogFontSize()); if (_service != null) { @@ -345,5 +346,19 @@ public void run() } }); } + + /** + * Get font size for log window + * clamp it to a suitable range (8 -100) + * @return + */ + public Integer getLogFontSize() + { + int aLogFontSize = Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(this).getString("pref_key_font_size_log", "" + 8)); + + return Math.max(8, Math.min(100, aLogFontSize)); + } + + } diff --git a/src/org/poirsouille/tinc_gui/TincdService.java b/src/org/poirsouille/tinc_gui/TincdService.java index 58a8eca..857cd6d 100644 --- a/src/org/poirsouille/tinc_gui/TincdService.java +++ b/src/org/poirsouille/tinc_gui/TincdService.java @@ -48,7 +48,6 @@ import android.os.Binder; import android.os.IBinder; import android.preference.PreferenceManager; -import android.sax.StartElementListener; import android.util.Log; public class TincdService extends Service implements ICallback @@ -66,7 +65,6 @@ public class TincdService extends Service implements ICallback private List _tempOutput = Collections.synchronizedList(new LinkedList()); SharedPreferences _sharedPref; public int _maxLogSize = 1000; - public int _fontsizelog = 8; private OnSharedPreferenceChangeListener _prefChangeListener; private final ConnectivityroadcastReceiver _broadcastReceiver = new ConnectivityroadcastReceiver(); private boolean _reconnectOnNetChange = false; @@ -419,7 +417,6 @@ private void refreshPrefs(String iKey) Log.d(Tools.TAG, "Refreshing preferences for key " + iKey); _configPath = _sharedPref.getString("pref_key_config_path", _configPath); _maxLogSize = Integer.parseInt(_sharedPref.getString("pref_key_max_log_size", "" + _maxLogSize)); - _fontsizelog = Integer.parseInt(_sharedPref.getString("pref_key_font_size_log", "" + _fontsizelog)); _debugLvl = Integer.parseInt(_sharedPref.getString("pref_key_debug_level", "" + _debugLvl)); _useSU = _sharedPref.getBoolean("pref_key_super_user", _useSU); _reconnectOnNetChange = _sharedPref.getBoolean("pref_key_force_reconnect", _reconnectOnNetChange); @@ -522,25 +519,6 @@ public String getStatus() return aStatus; } - /** - * Get font size for log window - * clamp it to a suitable range (8 -100) - * @return - */ - public Integer getLogFontSize() - { - if(_fontsizelog <= 8) - { - _fontsizelog = 8; - } - if(_fontsizelog >= 100) - { - _fontsizelog = 100; - } - - return _fontsizelog; - } - /** * Check if there's anything left in context or tincd is running. * Otherwise stop the service.