From 57ac5a39bf012f7bd3cbcbbe24be808cb1925e68 Mon Sep 17 00:00:00 2001 From: kruland2607 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. git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@856 180e2498-e6e9-4542-8430-84ac67f01cd8 --- 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 f9da2e82..5f3284ac 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 074c7a88..81c048b6 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 7e27894f..ff39a61f 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" /> + +