From fed956e2b055d0942329f308f0289fc50898b051 Mon Sep 17 00:00:00 2001 From: Kevin Ruland Date: Mon, 2 Jul 2012 21:40:14 +0000 Subject: [PATCH] Implement autosave rockets. Controlled by preference. When preference is set, the rocket is automatically saved when simulation changed events are fired. This is really too often since addSimulation should not cause rocket to be saved. --- android/res/values/pref_strings.xml | 1 + android/res/values/strings.xml | 6 +++ android/res/xml/preferences.xml | 8 ++- .../rocket/OpenRocketSaverFragment.java | 39 +++++++++++---- .../android/rocket/OpenRocketViewer.java | 49 ++++++++++++++++--- 5 files changed, 85 insertions(+), 18 deletions(-) diff --git a/android/res/values/pref_strings.xml b/android/res/values/pref_strings.xml index f9da2e828..5f3284ac4 100644 --- a/android/res/values/pref_strings.xml +++ b/android/res/values/pref_strings.xml @@ -6,6 +6,7 @@ PreferenceUseInternalFileBrowserOpion PreferenceFileBrowserBaseDirectory PreferenceShowOnlyOrkFiles + PreferenceAutoSaveOption 0 diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index 074c7a886..81c048b66 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -19,6 +19,7 @@ Would you like to save the changes to the current model? No Yes + Automatically saving rocket Case @@ -32,7 +33,12 @@ Series 1 Series 2 + Autosave Rocket + Automatically save the rocket document after simulations + Motor Browser Grouping + Set the grouping in Motor Browser + Motor Browser Use Internal File Browser diff --git a/android/res/xml/preferences.xml b/android/res/xml/preferences.xml index 7e27894f3..ff39a61f3 100644 --- a/android/res/xml/preferences.xml +++ b/android/res/xml/preferences.xml @@ -8,9 +8,15 @@ android:entries="@array/PreferenceMotorBrowserGroupingEntries" android:entryValues="@array/PreferenceMotorBrowserGroupingValues" android:key="@string/PreferenceMotorBrowserGroupingOption" - android:summary="Set the grouping in Motor Browser" + android:summary="@string/motorbrowsergroupsummary" android:title="@string/motorbrowsergrouptitle" /> + +