From 91cc629273873373e73bf4a0b19a3bef3f507a81 Mon Sep 17 00:00:00 2001 From: Tim Su Date: Sat, 24 Jan 2009 05:34:41 +0000 Subject: [PATCH] Added some padding to the edit pages, added the suppress dialog sync option, changed a label. --- AndroidManifest.xml | 8 +++++--- res/layout/task_edit.xml | 3 +++ res/values/strings.xml | 5 ++++- res/xml/sync_preferences.xml | 5 +++++ src/com/timsu/astrid/sync/SynchronizationService.java | 4 ++++ src/com/timsu/astrid/utilities/Preferences.java | 7 +++++++ 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 9dde7b463..51d7506d1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="69" + android:versionName="2.1.1"> @@ -22,7 +22,9 @@ - + + android:theme="@android:style/Theme.Dialog" + @@ -142,6 +143,7 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> @@ -287,6 +289,7 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> diff --git a/res/values/strings.xml b/res/values/strings.xml index 38754145e..f9d4c862f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -226,6 +226,9 @@ If you don\'t want to see the new task right after you complete the old one, you sync_button Main Menu Shortcut Show \"Synchronize\" in Astrid\'s menu + sync_dialogs + Hide Dialogs + Hide the Sync Results dialogs sync_background In Background Synchronize without bothering you @@ -335,7 +338,7 @@ Wish me luck!\n true importanceVisible Importance - Task importance bubble + Task importance indicator true tagsVisible Tags diff --git a/res/xml/sync_preferences.xml b/res/xml/sync_preferences.xml index afe4dac08..deb15db82 100644 --- a/res/xml/sync_preferences.xml +++ b/res/xml/sync_preferences.xml @@ -24,6 +24,11 @@ android:key="@string/p_sync_button" android:title="@string/sync_button_title" android:summary="@string/sync_button_desc" /> + + diff --git a/src/com/timsu/astrid/sync/SynchronizationService.java b/src/com/timsu/astrid/sync/SynchronizationService.java index c924edf8a..574da0eb5 100644 --- a/src/com/timsu/astrid/sync/SynchronizationService.java +++ b/src/com/timsu/astrid/sync/SynchronizationService.java @@ -449,6 +449,10 @@ public abstract class SynchronizationService { /** Display a dialog with statistics */ public void showDialog(final Activity activity, String log) { progressDialog.hide(); + + if(Preferences.shouldSuppressSyncDialogs(activity)) + return; + Dialog.OnClickListener finishListener = new Dialog.OnClickListener() { @Override public void onClick(DialogInterface dialog, diff --git a/src/com/timsu/astrid/utilities/Preferences.java b/src/com/timsu/astrid/utilities/Preferences.java index a3b45ae3c..41982e14b 100644 --- a/src/com/timsu/astrid/utilities/Preferences.java +++ b/src/com/timsu/astrid/utilities/Preferences.java @@ -223,6 +223,13 @@ public class Preferences { R.string.p_sync_button), false); } + /** Should hide sync dialog boxes? */ + public static boolean shouldSuppressSyncDialogs(Context context) { + Resources r = context.getResources(); + return getPrefs(context).getBoolean(r.getString( + R.string.p_sync_quiet), false); + } + /** returns the font size user wants on the front page */ public static Integer autoSyncFrequency(Context context) { return getIntegerValue(context, R.string.p_sync_every);