From 0e1f0b4a8f34f998fb6dd329ee902e6e1afd7b1b Mon Sep 17 00:00:00 2001 From: Tim Su Date: Mon, 10 May 2010 21:01:39 -0700 Subject: [PATCH] Deleted .svn files, renamed some stuff, worked on data layer until it was good. --- external-src/com/.svn/all-wcprops | 5 - external-src/com/.svn/entries | 31 - .../com/thoughtworks/.svn/all-wcprops | 5 - external-src/com/thoughtworks/.svn/entries | 31 - .../com/thoughtworks/sql/.svn/all-wcprops | 89 -- .../com/thoughtworks/sql/.svn/entries | 504 ----------- .../.svn/text-base/Constants.java.svn-base | 22 - .../.svn/text-base/Criterion.java.svn-base | 69 -- .../sql/.svn/text-base/DBObject.java.svn-base | 51 -- .../.svn/text-base/EqCriterion.java.svn-base | 10 - .../sql/.svn/text-base/Field.java.svn-base | 83 -- .../sql/.svn/text-base/GroupBy.java.svn-base | 14 - .../sql/.svn/text-base/Join.java.svn-base | 43 - .../sql/.svn/text-base/JoinType.java.svn-base | 5 - .../sql/.svn/text-base/Operator.java.svn-base | 57 -- .../sql/.svn/text-base/Order.java.svn-base | 30 - .../.svn/text-base/OrderType.java.svn-base | 5 - .../sql/.svn/text-base/Query.java.svn-base | 153 ---- .../sql/.svn/text-base/Table.java.svn-base | 19 - .../text-base/UnaryCriterion.java.svn-base | 75 -- res/values/{arrays.xml => arrays-legacy.xml} | 0 res/values/{colors.xml => colors-legacy.xml} | 0 res/values/strings-legacy.xml | 514 +++++++++++ res/values/strings.xml | 824 +++++++----------- res/values/{styles.xml => styles-legacy.xml} | 0 src/com/todoroo/astrid/dao/Database.java | 2 +- src/com/todoroo/astrid/dao/MetadataDao.java | 11 +- src/com/todoroo/astrid/dao/TaskDao.java | 6 + src/com/todoroo/astrid/model/Metadata.java | 2 +- .../astrid/service/FlurryReporter.java | 48 + .../astrid/service/MetadataService.java | 30 +- .../todoroo/astrid/service/TaskService.java | 17 +- 32 files changed, 913 insertions(+), 1842 deletions(-) delete mode 100644 external-src/com/.svn/all-wcprops delete mode 100644 external-src/com/.svn/entries delete mode 100644 external-src/com/thoughtworks/.svn/all-wcprops delete mode 100644 external-src/com/thoughtworks/.svn/entries delete mode 100644 external-src/com/thoughtworks/sql/.svn/all-wcprops delete mode 100644 external-src/com/thoughtworks/sql/.svn/entries delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Constants.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Criterion.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/DBObject.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/EqCriterion.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Field.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/GroupBy.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Join.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/JoinType.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Operator.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Order.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/OrderType.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Query.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/Table.java.svn-base delete mode 100644 external-src/com/thoughtworks/sql/.svn/text-base/UnaryCriterion.java.svn-base rename res/values/{arrays.xml => arrays-legacy.xml} (100%) rename res/values/{colors.xml => colors-legacy.xml} (100%) create mode 100644 res/values/strings-legacy.xml rename res/values/{styles.xml => styles-legacy.xml} (100%) create mode 100644 src/com/todoroo/astrid/service/FlurryReporter.java diff --git a/external-src/com/.svn/all-wcprops b/external-src/com/.svn/all-wcprops deleted file mode 100644 index 3674a4311..000000000 --- a/external-src/com/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 29 -/svn/!svn/ver/9/trunk/src/com -END diff --git a/external-src/com/.svn/entries b/external-src/com/.svn/entries deleted file mode 100644 index 39403209e..000000000 --- a/external-src/com/.svn/entries +++ /dev/null @@ -1,31 +0,0 @@ -10 - -dir -9 -http://sql-dsl.googlecode.com/svn/trunk/src/com -http://sql-dsl.googlecode.com/svn - - - -2009-09-14T16:21:07.644789Z -9 -skyairmj - - - - - - - - - - - - - - -425b5e3a-bc29-11dd-9cb5-179210ed59e1 - -thoughtworks -dir - diff --git a/external-src/com/thoughtworks/.svn/all-wcprops b/external-src/com/thoughtworks/.svn/all-wcprops deleted file mode 100644 index 734e95172..000000000 --- a/external-src/com/thoughtworks/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 42 -/svn/!svn/ver/9/trunk/src/com/thoughtworks -END diff --git a/external-src/com/thoughtworks/.svn/entries b/external-src/com/thoughtworks/.svn/entries deleted file mode 100644 index 125c67e1f..000000000 --- a/external-src/com/thoughtworks/.svn/entries +++ /dev/null @@ -1,31 +0,0 @@ -10 - -dir -9 -http://sql-dsl.googlecode.com/svn/trunk/src/com/thoughtworks -http://sql-dsl.googlecode.com/svn - - - -2009-09-14T16:21:07.644789Z -9 -skyairmj - - - - - - - - - - - - - - -425b5e3a-bc29-11dd-9cb5-179210ed59e1 - -sql -dir - diff --git a/external-src/com/thoughtworks/sql/.svn/all-wcprops b/external-src/com/thoughtworks/sql/.svn/all-wcprops deleted file mode 100644 index 9532b2b6f..000000000 --- a/external-src/com/thoughtworks/sql/.svn/all-wcprops +++ /dev/null @@ -1,89 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 46 -/svn/!svn/ver/9/trunk/src/com/thoughtworks/sql -END -Join.java -K 25 -svn:wc:ra_dav:version-url -V 56 -/svn/!svn/ver/2/trunk/src/com/thoughtworks/sql/Join.java -END -JoinType.java -K 25 -svn:wc:ra_dav:version-url -V 60 -/svn/!svn/ver/2/trunk/src/com/thoughtworks/sql/JoinType.java -END -Field.java -K 25 -svn:wc:ra_dav:version-url -V 57 -/svn/!svn/ver/9/trunk/src/com/thoughtworks/sql/Field.java -END -EqCriterion.java -K 25 -svn:wc:ra_dav:version-url -V 63 -/svn/!svn/ver/6/trunk/src/com/thoughtworks/sql/EqCriterion.java -END -Query.java -K 25 -svn:wc:ra_dav:version-url -V 57 -/svn/!svn/ver/9/trunk/src/com/thoughtworks/sql/Query.java -END -GroupBy.java -K 25 -svn:wc:ra_dav:version-url -V 59 -/svn/!svn/ver/8/trunk/src/com/thoughtworks/sql/GroupBy.java -END -Table.java -K 25 -svn:wc:ra_dav:version-url -V 57 -/svn/!svn/ver/2/trunk/src/com/thoughtworks/sql/Table.java -END -Operator.java -K 25 -svn:wc:ra_dav:version-url -V 60 -/svn/!svn/ver/6/trunk/src/com/thoughtworks/sql/Operator.java -END -Order.java -K 25 -svn:wc:ra_dav:version-url -V 57 -/svn/!svn/ver/2/trunk/src/com/thoughtworks/sql/Order.java -END -DBObject.java -K 25 -svn:wc:ra_dav:version-url -V 60 -/svn/!svn/ver/2/trunk/src/com/thoughtworks/sql/DBObject.java -END -Constants.java -K 25 -svn:wc:ra_dav:version-url -V 61 -/svn/!svn/ver/6/trunk/src/com/thoughtworks/sql/Constants.java -END -UnaryCriterion.java -K 25 -svn:wc:ra_dav:version-url -V 66 -/svn/!svn/ver/6/trunk/src/com/thoughtworks/sql/UnaryCriterion.java -END -OrderType.java -K 25 -svn:wc:ra_dav:version-url -V 61 -/svn/!svn/ver/2/trunk/src/com/thoughtworks/sql/OrderType.java -END -Criterion.java -K 25 -svn:wc:ra_dav:version-url -V 61 -/svn/!svn/ver/9/trunk/src/com/thoughtworks/sql/Criterion.java -END diff --git a/external-src/com/thoughtworks/sql/.svn/entries b/external-src/com/thoughtworks/sql/.svn/entries deleted file mode 100644 index 6edabf455..000000000 --- a/external-src/com/thoughtworks/sql/.svn/entries +++ /dev/null @@ -1,504 +0,0 @@ -10 - -dir -9 -http://sql-dsl.googlecode.com/svn/trunk/src/com/thoughtworks/sql -http://sql-dsl.googlecode.com/svn - - - -2009-09-14T16:21:07.644789Z -9 -skyairmj - - - - - - - - - - - - - - -425b5e3a-bc29-11dd-9cb5-179210ed59e1 - -Join.java -file - - - - -2010-05-06T06:36:13.019258Z -c1e5f7f7d7d81ad72b1f07ab99820ab5 -2008-11-27T02:38:24.003892Z -2 -skyairmj - - - - - - - - - - - - - - - - - - - - - -1443 - -JoinType.java -file - - - - -2010-05-06T06:36:13.019258Z -df10b08c524945571f70238293721b11 -2008-11-27T02:38:24.003892Z -2 -skyairmj - - - - - - - - - - - - - - - - - - - - - -89 - -Field.java -file - - - - -2010-05-06T06:36:13.019258Z -4d4527967174e402c342b88b220dcb42 -2009-09-14T16:21:07.644789Z -9 -skyairmj - - - - - - - - - - - - - - - - - - - - - -2649 - -EqCriterion.java -file - - - - -2010-05-06T06:36:13.019258Z -f5df9e0718577c4fff1f1e6c1d3aed5b -2008-11-28T15:27:46.936810Z -6 -skyairmj - - - - - - - - - - - - - - - - - - - - - -247 - -Query.java -file - - - - -2010-05-06T06:36:13.019258Z -645cd8c0ce2c6a4c718b8aae93c33c09 -2009-09-14T16:21:07.644789Z -9 -skyairmj - - - - - - - - - - - - - - - - - - - - - -4347 - -GroupBy.java -file - - - - -2010-05-06T06:36:13.019258Z -207373b4f7bb84163e84a848ffe64f1c -2008-12-04T13:44:00.210147Z -8 -skyairmj - - - - - - - - - - - - - - - - - - - - - -335 - -Table.java -file - - - - -2010-05-06T06:36:13.019258Z -459da435c7835c3324e249cd05c96013 -2008-11-27T02:38:24.003892Z -2 -skyairmj - - - - - - - - - - - - - - - - - - - - - -455 - -Operator.java -file - - - - -2010-05-06T06:36:13.029258Z -c7825d746fdfaf34522c6c4883de0cca -2008-11-28T15:27:46.936810Z -6 -skyairmj - - - - - - - - - - - - - - - - - - - - - -2137 - -Order.java -file - - - - -2010-05-06T06:36:13.029258Z -15d650e70ceca0ebf670feff4b7c65fb -2008-11-27T02:38:24.003892Z -2 -skyairmj - - - - - - - - - - - - - - - - - - - - - -740 - -DBObject.java -file - - - - -2010-05-06T06:36:13.029258Z -0911aae9fbf364ab5ac3286f2edcab7c -2008-11-27T02:38:24.003892Z -2 -skyairmj - - - - - - - - - - - - - - - - - - - - - -1456 - -Constants.java -file - - - - -2010-05-06T06:36:13.029258Z -1e42cd9e9b62c0ef16b66de997b7d53b -2008-11-28T15:27:46.936810Z -6 -skyairmj - - - - - - - - - - - - - - - - - - - - - -818 - -UnaryCriterion.java -file - - - - -2010-05-06T06:36:13.029258Z -2047998a7b77e8ca3b4c4bb4049025cd -2008-11-28T15:27:46.936810Z -6 -skyairmj - - - - - - - - - - - - - - - - - - - - - -2328 - -OrderType.java -file - - - - -2010-05-06T06:36:13.029258Z -07e3e9d757d9b3dfb87cfa71e2d9daac -2008-11-27T02:38:24.003892Z -2 -skyairmj - - - - - - - - - - - - - - - - - - - - - -76 - -Criterion.java -file - - - - -2010-05-06T06:36:13.029258Z -39757450b5a87a9501ab77fe3c5f9f16 -2009-09-14T16:21:07.644789Z -9 -skyairmj - - - - - - - - - - - - - - - - - - - - - -2222 - diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Constants.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Constants.java.svn-base deleted file mode 100644 index 89f8cb778..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Constants.java.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -package com.thoughtworks.sql; - -public class Constants { - static final String SELECT = "SELECT"; - static final String SPACE = " "; - static final String AS = "AS"; - static final String COMMA = ","; - static final String FROM = "FROM"; - static final String ON = "ON"; - static final String JOIN = "JOIN"; - static final String ALL = "*"; - static final String LEFT_PARENTHESIS = "("; - static final String RIGHT_PARENTHESIS = ")"; - static final String AND = "AND"; - static final String BETWEEN = "BETWEEN"; - static final String LIKE = "LIKE"; - static final String OR = "OR"; - static final String ORDER_BY = "ORDER BY"; - static final String GROUP_BY = "GROUP BY"; - static final String WHERE = "WHERE"; - public static final String EXISTS = "EXISTS"; -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Criterion.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Criterion.java.svn-base deleted file mode 100644 index 5ad83057e..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Criterion.java.svn-base +++ /dev/null @@ -1,69 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.AND; -import static com.thoughtworks.sql.Constants.EXISTS; -import static com.thoughtworks.sql.Constants.LEFT_PARENTHESIS; -import static com.thoughtworks.sql.Constants.OR; -import static com.thoughtworks.sql.Constants.RIGHT_PARENTHESIS; -import static com.thoughtworks.sql.Constants.SPACE; - -public abstract class Criterion { - protected final Operator operator; - - Criterion(Operator operator) { - this.operator = operator; - } - - public static Criterion and(final Criterion criterion, final Criterion... criterions) { - return new Criterion(Operator.and) { - - protected void populate(StringBuilder sb) { - sb.append(criterion); - for (Criterion criterion : criterions) { - sb.append(SPACE).append(AND).append(SPACE).append(criterion); - } - } - }; - } - - public static Criterion or(final Criterion criterion, final Criterion... criterions) { - return new Criterion(Operator.or) { - - protected void populate(StringBuilder sb) { - sb.append(criterion); - for (Criterion criterion : criterions) { - sb.append(SPACE).append(OR).append(SPACE).append(criterion.toString()); - } - } - }; - } - - public static Criterion exists(final Query query) { - return new Criterion(Operator.exists) { - - protected void populate(StringBuilder sb) { - sb.append(EXISTS).append(SPACE).append(LEFT_PARENTHESIS).append(query).append(RIGHT_PARENTHESIS); - } - }; - } - - public static Criterion not(Criterion criterion) { - return new Criterion(null) { - - protected void populate(StringBuilder sb) { - - } - }; - } - - protected abstract void populate(StringBuilder sb); - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(LEFT_PARENTHESIS); - populate(builder); - builder.append(RIGHT_PARENTHESIS); - return builder.toString(); - } - -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/DBObject.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/DBObject.java.svn-base deleted file mode 100644 index 675706cc2..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/DBObject.java.svn-base +++ /dev/null @@ -1,51 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.SPACE; -import static com.thoughtworks.sql.Constants.AS; - -public abstract class DBObject { - protected String alias; - protected final String expression; - - protected DBObject(String expression){ - this.expression = expression; - } - - public T as(String alias) { - this.alias = alias; - return (T) this; - } - - public boolean hasAlias() { - return alias != null; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - DBObject dbObject = (DBObject) o; - - if (alias != null ? !alias.equals(dbObject.alias) : dbObject.alias != null) return false; - if (expression != null ? !expression.equals(dbObject.expression) : dbObject.expression != null) return false; - - return true; - } - - @Override - public int hashCode() { - int result = alias != null ? alias.hashCode() : 0; - result = 31 * result + (expression != null ? expression.hashCode() : 0); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(expression); - if (hasAlias()) { - sb.append(SPACE).append(AS).append(SPACE).append(alias); - } - return sb.toString(); - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/EqCriterion.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/EqCriterion.java.svn-base deleted file mode 100644 index 529bcc4a5..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/EqCriterion.java.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -package com.thoughtworks.sql; - -public class EqCriterion extends UnaryCriterion { - private final Object value; - - EqCriterion(Field field, Object value) { - super(field, Operator.eq, value); - this.value = value; - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Field.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Field.java.svn-base deleted file mode 100644 index 8c66000dd..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Field.java.svn-base +++ /dev/null @@ -1,83 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.AND; -import static com.thoughtworks.sql.Constants.BETWEEN; -import static com.thoughtworks.sql.Constants.COMMA; -import static com.thoughtworks.sql.Constants.LEFT_PARENTHESIS; -import static com.thoughtworks.sql.Constants.RIGHT_PARENTHESIS; -import static com.thoughtworks.sql.Constants.SPACE; - -public class Field extends DBObject { - - protected Field(String expression) { - super(expression); - } - - public static Field field(String expression) { - return new Field(expression); - } - - public Criterion eq(Object value) { - return UnaryCriterion.eq(this, value); - } - - public Criterion neq(Object value) { - return UnaryCriterion.neq(this, value); - } - - public Criterion gt(Object value) { - return UnaryCriterion.gt(this, value); - } - - public Criterion lt(final Object value) { - return UnaryCriterion.lt(this, value); - } - - public Criterion isNull() { - return UnaryCriterion.isNull(this); - } - - public Criterion isNotNull() { - return UnaryCriterion.isNotNull(this); - } - - public Criterion between(final Object lower, final Object upper) { - final Field field = this; - return new Criterion(null) { - - protected void populate(StringBuilder sb) { - sb.append(field).append(SPACE).append(BETWEEN).append(SPACE).append(lower).append(SPACE).append(AND) - .append(SPACE).append(upper); - } - }; - } - - public Criterion like(final String value) { - return UnaryCriterion.like(this, value); - } - - public Criterion in(final T... value) { - final Field field = this; - return new Criterion(Operator.in) { - - protected void populate(StringBuilder sb) { - sb.append(field).append(SPACE).append(Operator.in).append(SPACE).append(LEFT_PARENTHESIS); - for (T t : value) { - sb.append(t.toString()).append(COMMA); - } - sb.deleteCharAt(sb.length() - 1).append(RIGHT_PARENTHESIS); - } - }; - } - - public Criterion in(final Field expression, final Query query) { - final Field field = this; - return new Criterion(Operator.in) { - - protected void populate(StringBuilder sb) { - sb.append(field).append(SPACE).append(Operator.in).append(SPACE).append(LEFT_PARENTHESIS).append(query) - .append(RIGHT_PARENTHESIS); - } - }; - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/GroupBy.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/GroupBy.java.svn-base deleted file mode 100644 index 620262f83..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/GroupBy.java.svn-base +++ /dev/null @@ -1,14 +0,0 @@ -package com.thoughtworks.sql; - -import java.util.List; -import java.util.ArrayList; - -public class GroupBy { - private List fields = new ArrayList(); - - public static GroupBy groupBy(Field field) { - GroupBy groupBy = new GroupBy(); - groupBy.fields.add(field); - return groupBy; - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Join.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Join.java.svn-base deleted file mode 100644 index 975236776..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Join.java.svn-base +++ /dev/null @@ -1,43 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.SPACE; -import static com.thoughtworks.sql.Constants.JOIN; -import static com.thoughtworks.sql.Constants.ON; - -public class Join { - private final Table joinTable; - private final JoinType joinType; - private final Criterion[] criterions; - - private Join(Table table, JoinType joinType, Criterion... criterions) { - joinTable = table; - this.joinType = joinType; - this.criterions = criterions; - } - - public static Join inner(Table expression, Criterion... criterions) { - return new Join(expression, JoinType.INNER, criterions); - } - - public static Join left(Table table, Criterion... criterions) { - return new Join(table, JoinType.LEFT, criterions); - } - - public static Join right(Table table, Criterion... criterions) { - return new Join(table, JoinType.RIGHT, criterions); - } - - public static Join out(Table table, Criterion... criterions) { - return new Join(table, JoinType.OUT, criterions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(joinType).append(SPACE).append(JOIN).append(SPACE).append(joinTable).append(SPACE).append(ON); - for (Criterion criterion : criterions) { - sb.append(SPACE).append(criterion); - } - return sb.toString(); - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/JoinType.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/JoinType.java.svn-base deleted file mode 100644 index 77b094306..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/JoinType.java.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -package com.thoughtworks.sql; - -public enum JoinType { - INNER, LEFT, RIGHT, OUT -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Operator.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Operator.java.svn-base deleted file mode 100644 index 548ff8e2a..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Operator.java.svn-base +++ /dev/null @@ -1,57 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.SPACE; - -import java.util.HashMap; -import java.util.Map; - -public final class Operator { - - private final String operator; - private static final Operator ZERO = new Operator(""); - public static final Operator eq = new Operator("="); - public static final Operator neq = new Operator("<>"); - public static final Operator isNull = new Operator("IS NULL"); - public static final Operator isNotNull = new Operator("IS NOT NULL"); - public static final Operator gt = new Operator(">"); - public static final Operator lt = new Operator("<"); - public static final Operator gte = new Operator(">="); - public static final Operator lte = new Operator("<="); - public static final Operator and = new Operator("AND"); - public static final Operator or = new Operator("OR"); - public static final Operator not = new Operator("NOT"); - public static final Operator exists = new Operator("EXISTS"); - public static final Operator like = new Operator("LIKE"); - public static final Operator in = new Operator("IN"); - - private static final Map contraryRegistry = new HashMap(); - - static { - contraryRegistry.put(eq, neq); - contraryRegistry.put(neq, eq); - contraryRegistry.put(isNull, isNotNull); - contraryRegistry.put(isNotNull, isNull); - contraryRegistry.put(gt, lte); - contraryRegistry.put(lte, gt); - contraryRegistry.put(lt, gte); - contraryRegistry.put(gte, lt); - } - - private Operator(String operator) { - this.operator = operator; - } - - public Operator getContrary() { - if(!contraryRegistry.containsKey(this)){ - Operator opposite = new Operator(not.toString() + SPACE + this.toString()); - contraryRegistry.put(this, opposite); - contraryRegistry.put(opposite, this); - } - return contraryRegistry.get(this); - } - - @Override - public String toString() { - return this.operator.toString(); - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Order.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Order.java.svn-base deleted file mode 100644 index 67e1aa0ab..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Order.java.svn-base +++ /dev/null @@ -1,30 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.SPACE; - -public class Order { - private final Field expression; - private final OrderType orderType; - - private Order(Field expression) { - this(expression, OrderType.ASC); - } - - private Order(Field expression, OrderType orderType) { - this.expression = expression; - this.orderType = orderType; - } - - public static Order asc(Field expression) { - return new Order(expression); - } - - public static Order desc(Field expression) { - return new Order(expression, OrderType.DESC); - } - - @Override - public String toString() { - return expression + SPACE + orderType; - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/OrderType.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/OrderType.java.svn-base deleted file mode 100644 index d907270c9..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/OrderType.java.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -package com.thoughtworks.sql; - -public enum OrderType { - DESC, ASC -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Query.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Query.java.svn-base deleted file mode 100644 index 12f863f57..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Query.java.svn-base +++ /dev/null @@ -1,153 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.*; -import static com.thoughtworks.sql.Table.table; - -import java.util.ArrayList; -import static java.util.Arrays.asList; -import java.util.List; - -public class Query { - - private Table table; - private List criterions = new ArrayList(); - private List fields = new ArrayList(); - private List joins = new ArrayList(); - private List groupBies = new ArrayList(); - private List orders = new ArrayList(); - private List havings = new ArrayList(); - - private Query(Field... fields) { - this.fields.addAll(asList(fields)); - } - - public static Query select(Field... fields) { - return new Query(fields); - } - - public Query from(Table table) { - this.table = table; - return this; - } - - public Query join(Join... join) { - joins.addAll(asList(join)); - return this; - } - - public Query where(Criterion criterion) { - criterions.add(criterion); - return this; - } - - public Query groupBy(Field... groupBy) { - groupBies.addAll(asList(groupBy)); - return this; - } - - public Query orderBy(Order... order) { - orders.addAll(asList(order)); - return this; - } - - public Query appendSelectFields(Field... fields) { - this.fields.addAll(asList(fields)); - return this; - } - - @Override - public boolean equals(Object o) { - return this == o || !(o == null || getClass() != o.getClass()) && this.toString().equals(o.toString()); - } - - @Override - public int hashCode() { - return toString().hashCode(); - } - - @Override - public String toString() { - StringBuilder sql = new StringBuilder(); - visitSelectClause(sql); - visitFromClause(sql); - visitJoinClause(sql); - visitWhereClause(sql); - visitGroupByClause(sql); - visitOrderByClause(sql); - return sql.toString(); - } - - private void visitOrderByClause(StringBuilder sql) { - if (orders.isEmpty()) { - return; - } - sql.append(ORDER_BY); - for (Order order : orders) { - sql.append(SPACE).append(order).append(COMMA); - } - sql.deleteCharAt(sql.length() - 1).append(SPACE); - } - - private void visitGroupByClause(StringBuilder sql) { - if (groupBies.isEmpty()) { - return; - } - sql.append(GROUP_BY); - for (Field groupBy : groupBies) { - sql.append(SPACE).append(groupBy).append(COMMA); - } - sql.deleteCharAt(sql.length() - 1).append(SPACE); - if (havings.isEmpty()) { - return; - } - sql.append("HAVING"); - for (Criterion havingCriterion : havings) { - sql.append(SPACE).append(havingCriterion).append(COMMA); - } - sql.deleteCharAt(sql.length() - 1).append(SPACE); - } - - private void visitWhereClause(StringBuilder sql) { - if (criterions.isEmpty()) { - return; - } - sql.append(WHERE); - for (Criterion criterion : criterions) { - sql.append(SPACE).append(criterion).append(SPACE); - } - } - - private void visitJoinClause(StringBuilder sql) { - for (Join join : joins) { - sql.append(join).append(SPACE); - } - } - - private void visitFromClause(StringBuilder sql) { - if (table == null) { - return; - } - sql.append(FROM).append(SPACE).append(table).append(SPACE); - } - - private void visitSelectClause(StringBuilder sql) { - sql.append(SELECT).append(SPACE); - if (fields.isEmpty()) { - sql.append(ALL).append(SPACE); - return; - } - for (Field field : fields) { - sql.append(field).append(COMMA); - } - sql.deleteCharAt(sql.length() - 1).append(SPACE); - } - - public Table as(String alias) { - return table(LEFT_PARENTHESIS + this.toString() + RIGHT_PARENTHESIS).as(alias); - } - - public Query having(Criterion criterion) { - this.havings.add(criterion); - return this; - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/Table.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/Table.java.svn-base deleted file mode 100644 index 2aeb9cf7e..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/Table.java.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -package com.thoughtworks.sql; - -public class Table extends DBObject { - - protected Table(String expression) { - super(expression); - } - - public static Table table(String table) { - return new Table(table); - } - - public Field field(String fieldName) { - if (hasAlias()) { - return Field.field(alias + "." + fieldName); - } - return Field.field(expression+"."+fieldName); - } -} diff --git a/external-src/com/thoughtworks/sql/.svn/text-base/UnaryCriterion.java.svn-base b/external-src/com/thoughtworks/sql/.svn/text-base/UnaryCriterion.java.svn-base deleted file mode 100644 index 9d83c5542..000000000 --- a/external-src/com/thoughtworks/sql/.svn/text-base/UnaryCriterion.java.svn-base +++ /dev/null @@ -1,75 +0,0 @@ -package com.thoughtworks.sql; - -import static com.thoughtworks.sql.Constants.SPACE; - -public class UnaryCriterion extends Criterion { - protected final Field expression; - protected final Object value; - - UnaryCriterion(Field expression, Operator operator, Object value) { - super(operator); - this.expression = expression; - this.value = value; - } - - protected void populate(StringBuilder sb) { - beforePopulateOperator(sb); - populateOperator(sb); - afterPopulateOperator(sb); - } - - public static Criterion eq(Field expression, Object value) { - return new UnaryCriterion(expression, Operator.eq, value); - } - - protected void beforePopulateOperator(StringBuilder sb) { - sb.append(expression); - } - - protected void populateOperator(StringBuilder sb) { - sb.append(operator); - } - - protected void afterPopulateOperator(StringBuilder sb) { - sb.append(value == null ? "" : value); - } - - public static Criterion neq(Field field, Object value) { - return new UnaryCriterion(field, Operator.neq, value); - } - - public static Criterion gt(Field field, Object value) { - return new UnaryCriterion(field, Operator.gt, value); - } - - public static Criterion lt(Field field, Object value) { - return new UnaryCriterion(field, Operator.lt, value); - } - - public static Criterion isNull(Field field) { - return new UnaryCriterion(field, Operator.isNull, null) { - @Override - protected void populateOperator(StringBuilder sb) { - sb.append(SPACE).append(operator); - } - }; - } - - public static Criterion isNotNull(Field field) { - return new UnaryCriterion(field, Operator.isNotNull, null) { - @Override - protected void populateOperator(StringBuilder sb) { - sb.append(SPACE).append(operator); - } - }; - } - - public static Criterion like(Field field, String value) { - return new UnaryCriterion(field, Operator.like, value) { - @Override - protected void populateOperator(StringBuilder sb) { - sb.append(SPACE).append(operator).append(SPACE); - } - }; - } -} diff --git a/res/values/arrays.xml b/res/values/arrays-legacy.xml similarity index 100% rename from res/values/arrays.xml rename to res/values/arrays-legacy.xml diff --git a/res/values/colors.xml b/res/values/colors-legacy.xml similarity index 100% rename from res/values/colors.xml rename to res/values/colors-legacy.xml diff --git a/res/values/strings-legacy.xml b/res/values/strings-legacy.xml new file mode 100644 index 000000000..777eab53c --- /dev/null +++ b/res/values/strings-legacy.xml @@ -0,0 +1,514 @@ + + + + + + + + + !!!! + !!! + !! + ! + + + Day(s) + Week(s) + Month(s) + Hour(s) + + + + + + 1 Task + %d Tasks + + + + %d / %d Active + %d / %d Active + + + + One Alarm + Two Alarms + %d Alarms + + + + 1 Tag + %d Tags + + + + + + MMM d + + M/dd HH:mm + + D\na\ny\ns + H\no\nu\nr\ns + + + + 1 Day + %d Days + + + + 1 Day + %d Days + + + + 1 Hour + %d Hours + + + + 1 Minute + %d Minutes + + + + 1 Second + %d Seconds + + + + 1 Hr + %d Hrs + + + + 1 Min + %d Min + + + + 1 Sec + %d Sec + + + + %s Ago + + + + + Astrid: + Tagged \"%s\": + Untagged Tasks: + hidden + New Task + Could Not Find Requested Tag! + + + + + H + + Due in + + Due on + + Goal + Overdue by + + Finished %s + + Estimated: + + Spent: + + Poke Every + + + Repeats Every + + Repeats On Remote Server + Next Alarm: + Tags: + Notes: + + + Created: + + + Deleted + + Add New Task + + + New Task + Tags + Sort/Filters + Sync + More + Synchronization + Settings + Help (opens in Browser) + Take Astrid\'s Survey! + Quick Tips + Clean Up Old Tasks + Backup Tasks + Restore Tasks + + Edit Task + Delete Task + Start Timer + Stop Timer + Postpone + + + Sort/Filters + Hidden/Blocked Tasks + Completed Tasks + Tagged \'%s\' + Auto Sort + Sort By Name + Sort By Due Date + Sort Reverse + + Select an Action: + Times You\'ve Postponed: %d + Postpone for how long? + "Delete completed tasks older than # days:" + + + + + Astrid: Editing Task + Astrid: Editing + Astrid: New Task + + + Basic + Dates + Alerts + + + Summary + Task Name + How Important is it? + Tags: + Tag Name + + How Long Will it Take? + Time Already Spent on Task + Absolute Deadline + Goal Deadline + Add Task To Calendar + Open Calendar Event + Hide Until This Date + Repeat Every + No Repeat Set + Hide Until This Task is Done + Notes + Enter Task Notes + + Periodic Reminders + Every + Notify me... + As Deadlines Approach + At Deadlines + After Absolute Deadline Passes + Alarm Clock Mode + Fixed Reminders + Add New Reminder + + + Time (hours : minutes) + Remind Me Every + Repeat Every (0 to disable) + Help: Astrid Repeats + +To use repeats, set at least one of the deadlines above. When you complete this task, the deadline will be automatically advanced. +\n\n +If you don\'t want to see the new task right after you complete the old one, you should use the "Hide Until" field, which will also be advanced automatically. +\n + + Don't Show Help Anymore + + + Save + Discard + Edit + Delete + Click to Set + Start Timer + Stop Timer + + Save + Task Saved: due in %s + Task Saved: due %s ago + Task Saved + + + + + Astrid says... + + + + Astrid: Tag View: + Create Task With Tag + Edit Tag + Delete Tag + Show on Home Page + Hide on Home Page + Create Shortcut + Shortcut created on your home screen! + Tag: + [untagged] + + Sort A-Z + Sort by Size + + + + + Synchronization Services + Actions + Options + + Remember The Milk + http://www.rememberthemilk.com + Auto-Synchronize + If set, synchronization occurs automatically given interval + Main Menu Shortcut + Show \"Synchronize\" in Astrid\'s menu + Hide Dialogs + Hide the Sync Results dialogs + Auto-Sync Wifi Only + If set, auto-sync only happens when Wifi is active + Sync Error! Sorry for the inconvenience! Error: + +Astrid 2.7 now performs synchronization with RTM in the background. You will +be directed to the preferences page to configure how often you want this to +occur (it is a minor drain on battery). + + Synchronize Now! + Clear Personal Data + Sync: Up to date! + Clear data for selected services? + No Synchronizers Enabled! + Last Sync Date: %s + Last AutoSync Attempt: %s + never + %s Results + Summary - Astrid Tasks: + Summary - Remote Server: + Created: %d + Updated: %d + Deleted: %d + Merged: %d + + Reading Remote Data + Reading List: %s + Synchronizing Repeating Task + Transmitting: %s + Locally Deleted Tasks + Receiving: %s + + Please Log In to RTM... + +Sorry, there was an error verifying your login. Please try again. +\n\n +Error Message: + + + + + + Loading... + Updating List... + Information + Question + Done + View This Task + Already Done! + Snooze... + Go Away! + Hours/minutes to snooze? + + Delete + Delete this task? + Remove this tag from all tasks? + + Stop the timer? + + +Some things you may not know about Astrid:\n +\n +- To create a task, just start typing!\n +- While editing a task, hit \'back\' to save it\n +- Select a task & press 1-4 to quickly change it\'s priority\n +- If a task has a deadline, long-press to postpone it\n +\n +Thanks for using Astrid!\n + + + + +It looks like you are using an app that can kill processes (%s)! If you can, +add Astrid to the exclusion list so it doesn\'t get killed. Otherwise, +Astrid might not let you know when your tasks are due.\n + + I Won\'t Kill Astrid! + + + + + Backed Up %s to %s. + Restore Summary + +File %s contained %d tasks.\n +Restored %d tasks.\n +Skipped %d tasks.\n + + Restore + Opening file... + File opened... + Reading task %d... + Skipped task %d... + Restored task %d... + Select a File to Restore + + + + Astrid Tag Alert + Astrid will send you a reminder + when you have uncompleted tasks with the following criteria: + Tagged with: + + + + + Absolute Deadline! + Goal Deadline! + Working on: + + You have $NUM tagged $TAG! + + + + + Could not find this item: + Could not save:s + Cannot access folder: %s + Cannot access your SD card! + + + + Notifications + + Quiet Hours Start + Start time to silence notifications for periodic reminders + + Quiet Hours End + End time to silence notifications + + Default Reminders + For new tasks, default reminder in days (i.e. 7). Blank to disable + + Persistent Mode + If checked, LED and notifications must be cleared one at a time + + Notification Ringtone + Choose a ringtone for Astrid\'s alerts + + Notification Icons + Choose Astrid\'s notification bar icon + + Vibrate on Alert + If checked, Astrid will vibrate when sounding an alarm + + Appearance + + Colorize Task List + Different colors for different priorities + + Task List Size + Font size on the main listing page + + Other + + Nag Messages + Show Astrid\'s comments when viewing reminders and postponing tasks? + + Default Deadlines + # of days from now to set new deadlines + + Automatic Backups + + + Perform daily backups to sdcard. + + + Last backup failed: %s + + + Last backup failed, could not read SD card + + + Latest backup was on %s + + Displayed Fields + Select the fields to show in task list + + Task Title + Task description + Dates + Upcoming deadlines / completed date + Times + Estimated & Elapsed Times + Importance + Task importance indicator + Tags + Tags associated with this task + Repeats + Task repeat information + Reminders + Displayed if this task has reminders + Notes + Notes associated with this task + + + Astrid Task/Todo List + + +Astrid is the highly-acclaimed open-source task list that is simple enough to not get in your way, powerful enough to help you get stuff done! Tags, reminders, RememberTheMilk sync, Locale plug-in & more! + + + + translator-credits + + + Loading... + + + Read Astrid tasks + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 7bbe5e3d5..4ee307c5a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,517 +1,337 @@ - - + + - - Astrid + + + Astrid Tasks - - + + Astrid Permission - - !!!! - !!! - !! - ! - - - Day(s) - Week(s) - Month(s) - Hour(s) - - - - - - 1 Task - %d Tasks - - - - %d / %d Active - %d / %d Active - - - - One Alarm - Two Alarms - %d Alarms - - - - 1 Tag - %d Tags - - - - - - MMM d - - M/dd HH:mm - - D\na\ny\ns - H\no\nu\nr\ns - - - - 1 Day - %d Days - - - - 1 Day - %d Days - - - - 1 Hour - %d Hours - - - - 1 Minute - %d Minutes - - - - 1 Second - %d Seconds - - - - 1 Hr - %d Hrs - - - - 1 Min - %d Min - - - - 1 Sec - %d Sec - - - - %s Ago - - - - - Astrid: - Tagged \"%s\": - Untagged Tasks: - hidden - New Task - Could Not Find Requested Tag! - - - - - H - - Due in - - Due on - - Goal - Overdue by - - Finished %s - - Estimated: - - Spent: - - Poke Every - - - Repeats Every - - Repeats On Remote Server - Next Alarm: - Tags: - Notes: - - - Created: - - - Deleted - - Add New Task - - - New Task - Tags - Sort/Filters - Sync - More - Synchronization - Settings - Help (opens in Browser) - Take Astrid\'s Survey! - Quick Tips - Clean Up Old Tasks - Backup Tasks - Restore Tasks - - Edit Task - Delete Task - Start Timer - Stop Timer - Postpone - - - Sort/Filters - Hidden/Blocked Tasks - Completed Tasks - Tagged \'%s\' - Auto Sort - Sort By Name - Sort By Due Date - Sort Reverse - - Select an Action: - Times You\'ve Postponed: %d - Postpone for how long? - "Delete completed tasks older than # days:" - - - - - Astrid: Editing Task - Astrid: Editing - Astrid: New Task - - - Basic - Dates - Alerts - - - Summary - Task Name - How Important is it? - Tags: - Tag Name - - How Long Will it Take? - Time Already Spent on Task - Absolute Deadline - Goal Deadline - Add Task To Calendar - Open Calendar Event - Hide Until This Date - Repeat Every - No Repeat Set - Hide Until This Task is Done - Notes - Enter Task Notes - - Periodic Reminders - Every - Notify me... - As Deadlines Approach - At Deadlines - After Absolute Deadline Passes - Alarm Clock Mode - Fixed Reminders - Add New Reminder - - - Time (hours : minutes) - Remind Me Every - Repeat Every (0 to disable) - Help: Astrid Repeats - -To use repeats, set at least one of the deadlines above. When you complete this task, the deadline will be automatically advanced. -\n\n -If you don\'t want to see the new task right after you complete the old one, you should use the "Hide Until" field, which will also be advanced automatically. -\n - - Don't Show Help Anymore - - - Save - Discard - Edit - Delete - Click to Set - Start Timer - Stop Timer - - Save - Task Saved: due in %s - Task Saved: due %s ago - Task Saved - - - - - Astrid says... - - - - Astrid: Tag View: - Create Task With Tag - Edit Tag - Delete Tag - Show on Home Page - Hide on Home Page - Create Shortcut - Shortcut created on your home screen! - Tag: - [untagged] - - Sort A-Z - Sort by Size - - - - - Synchronization Services - Actions - Options - - Remember The Milk - http://www.rememberthemilk.com - Auto-Synchronize - If set, synchronization occurs automatically given interval - Main Menu Shortcut - Show \"Synchronize\" in Astrid\'s menu - Hide Dialogs - Hide the Sync Results dialogs - Auto-Sync Wifi Only - If set, auto-sync only happens when Wifi is active - Sync Error! Sorry for the inconvenience! Error: - -Astrid 2.7 now performs synchronization with RTM in the background. You will -be directed to the preferences page to configure how often you want this to -occur (it is a minor drain on battery). - - Synchronize Now! - Clear Personal Data - Sync: Up to date! - Clear data for selected services? - No Synchronizers Enabled! - Last Sync Date: %s - Last AutoSync Attempt: %s - never - %s Results - Summary - Astrid Tasks: - Summary - Remote Server: - Created: %d - Updated: %d - Deleted: %d - Merged: %d - - Reading Remote Data - Reading List: %s - Synchronizing Repeating Task - Transmitting: %s - Locally Deleted Tasks - Receiving: %s - - Please Log In to RTM... - -Sorry, there was an error verifying your login. Please try again. -\n\n -Error Message: - - - - - - Loading... - Updating List... - Information - Question - Done - View This Task - Already Done! - Snooze... - Go Away! - Hours/minutes to snooze? - - Delete - Delete this task? - Remove this tag from all tasks? - - Stop the timer? - - -Some things you may not know about Astrid:\n -\n -- To create a task, just start typing!\n -- While editing a task, hit \'back\' to save it\n -- Select a task & press 1-4 to quickly change it\'s priority\n -- If a task has a deadline, long-press to postpone it\n -\n -Thanks for using Astrid!\n - - - - -It looks like you are using an app that can kill processes (%s)! If you can, -add Astrid to the exclusion list so it doesn\'t get killed. Otherwise, -Astrid might not let you know when your tasks are due.\n - - I Won\'t Kill Astrid! - - - - - Backed Up %s to %s. - Restore Summary - -File %s contained %d tasks.\n -Restored %d tasks.\n -Skipped %d tasks.\n - - Restore - Opening file... - File opened... - Reading task %d... - Skipped task %d... - Restored task %d... - Select a File to Restore - - - - Astrid Tag Alert - Astrid will send you a reminder - when you have uncompleted tasks with the following criteria: - Tagged with: - - - - - Absolute Deadline! - Goal Deadline! - Working on: - - You have $NUM tagged $TAG! - - - + + read tasks, display task filters - Could not find this item: - Could not save:s - Cannot access folder: %s - Cannot access your SD card! - - + + Astrid Permission + + + create new tasks, edit existing tasks + + + + + + 1 Year + %d Years + + + + 1 Month + %d Months + + + + 1 Day + %d Days + + + + 1 Hour + %d Hours + + + + 1 Minute + %d Minutes + + + + 1 Second + %d Seconds + + + + 1 Hr + %d Hrs + + + + 1 Min + %d Min + + + + 1 Sec + %d Sec + + + + + + Confirm? + + + Question: + + + Information + + + Yes + + + No + + + Close + + + Communicating with Server... + + + Oops, looks like some trouble occurred! Here\'s what happened:\n\n%s + + + Delete this task? + + + Next + + + Previous + + + Done + + + Cancel + + + + + Click To Set + + + $D $T + + + Disable + + + + + Astrid: %s + + + You Have No Tasks! + + + Add Task + + + Plugins + + + Settings + + + Help + + + Search Within This Filter + + + Search Within This Filter + + + Add to this list + + +

Help: Tasks Page

+This page displays all of your tasks belonging to the filter you have chosen. +The back button at the top of the screen lets you pick a different filter +to display. +
+You can use the quick-add widget at the bottom of the screen to add tasks +without going to the edit page. +
+uh... that's it for help for today. + ]]>
+ + + + + %s [hidden] + + + loading + + + $D - Notifications - - Quiet Hours Start - Start time to silence notifications for periodic reminders - - Quiet Hours End - End time to silence notifications - - Default Reminders - For new tasks, default reminder in days (i.e. 7). Blank to disable - - Persistent Mode - If checked, LED and notifications must be cleared one at a time - - Notification Ringtone - Choose a ringtone for Astrid\'s alerts + + $D at $T + + + Finished %s + + + ... loading ... + + + Edit Task - Notification Icons - Choose Astrid\'s notification bar icon - - Vibrate on Alert - If checked, Astrid will vibrate when sounding an alarm - - Appearance - - Colorize Task List - Different colors for different priorities - - Task List Size - Font size on the main listing page + + Delete Task + + - Other - - Nag Messages - Show Astrid\'s comments when viewing reminders and postponing tasks? + + Astrid: Filters + + + Please Wait... + + + Create Shortcut On Desktop + + + Search... + + + Help + + + Create Shortcut: + + + Search For Tasks + + + Search For Tasks + + +

Help: Filters Page

+

On the Filters page you can see all of the filters that you can use to +organize your tasks. Some Astrid Plugins will add new filters to this +list. +

+You can turn any filter into a shortcut on your desktop by long-pressing +to bring up the context menu, then selecting "Create Shortcut". Other options +that are displayed will depend on the particular plugins that you +are using. +

+If you are having trouble with a particular plugin, please report errors +to the plugin creator for fastest service. +

+ ]]>
+ + + Created Shortcut: %s + + + + + Astrid: Editing + + + Astrid: New Task + + + Summary + + + Task Name + + + How important is it? + + + When must you finish it? + + + Hide Until This Date + + + Plugins + + + Save + + + Don\'t Save - Default Deadlines - # of days from now to set new deadlines + + Save Changes + + + Don\'t Save + + + Delete Task + + + Task Saved: due in %s + + + Task Saved: due %s ago + + + Task Saved + + + Task Editing Was Abandoned + + - Automatic Backups - - - Perform daily backups to sdcard. - - - Last backup failed: %s - - - Last backup failed, could not read SD card - - - Latest backup was on %s - - Displayed Fields - Select the fields to show in task list + + Astrid: New Reminder + + + + + Welcome to Astrid! + + + I Agree + + + I Disagree + + + Start Using Todoroo + + + + + E-mail Todoroo + + + Todoroo Help + + - Task Title - Task description - Dates - Upcoming deadlines / completed date - Times - Estimated & Elapsed Times - Importance - Task importance indicator - Tags - Tags associated with this task - Repeats - Task repeat information - Reminders - Displayed if this task has reminders - Notes - Notes associated with this task + + Astrid: Preferences - - Astrid Task/Todo List - - -Astrid is the highly-acclaimed open-source task list that is simple enough to not get in your way, powerful enough to help you get stuff done! Tags, reminders, RememberTheMilk sync, Locale plug-in & more! - - - - translator-credits - - - Loading... + + New Task Defaults - - Read Astrid tasks + + Default Urgency + + Currently Set To: %s + + p_durg + + Default Importance + + Currently Set To: %s + + p_dimp +
diff --git a/res/values/styles.xml b/res/values/styles-legacy.xml similarity index 100% rename from res/values/styles.xml rename to res/values/styles-legacy.xml diff --git a/src/com/todoroo/astrid/dao/Database.java b/src/com/todoroo/astrid/dao/Database.java index 612951786..1f389ec5e 100644 --- a/src/com/todoroo/astrid/dao/Database.java +++ b/src/com/todoroo/astrid/dao/Database.java @@ -93,7 +93,7 @@ public final class Database extends AbstractDatabase { // create tables for(Table table : TABLES) { - sql.append("CREATE TABLE IF NOT EXISTS ").append(table.getName()).append('('). + sql.append("CREATE TABLE IF NOT EXISTS ").append(table.name).append('('). append(AbstractModel.ID_PROPERTY).append(" INTEGER PRIMARY KEY AUTOINCREMENT"); for(Property property : table.getProperties()) { if(AbstractModel.ID_PROPERTY.equals(property.name)) diff --git a/src/com/todoroo/astrid/dao/MetadataDao.java b/src/com/todoroo/astrid/dao/MetadataDao.java index f244176f7..d14d571fe 100644 --- a/src/com/todoroo/astrid/dao/MetadataDao.java +++ b/src/com/todoroo/astrid/dao/MetadataDao.java @@ -48,16 +48,7 @@ public class MetadataDao extends AbstractDao { } - /** - * Delete all matching a clause - * @param database - * @param where - * @return # of deleted items - */ - public int deleteWhere(AbstractDatabase database, Criterion where) { - return database.getDatabase().delete(Metadata.TABLE.getName(), - where.toString(), null); - } + /** * Fetch all metadata that are unattached to the task diff --git a/src/com/todoroo/astrid/dao/TaskDao.java b/src/com/todoroo/astrid/dao/TaskDao.java index a6e719d09..a5291ff00 100644 --- a/src/com/todoroo/astrid/dao/TaskDao.java +++ b/src/com/todoroo/astrid/dao/TaskDao.java @@ -79,6 +79,12 @@ public class TaskDao extends AbstractDao { return Criterion.and(Task.COMPLETION_DATE.gt(0), Task.COMPLETION_DATE.lt(time)); } + /** Returns tasks that have a blank or null title */ + @SuppressWarnings("nls") + public static Criterion hasNoTitle() { + return Criterion.or(Task.TITLE.isNull(), Task.TITLE.eq("")); + } + } // --- custom operations diff --git a/src/com/todoroo/astrid/model/Metadata.java b/src/com/todoroo/astrid/model/Metadata.java index def119b39..b3384aaba 100644 --- a/src/com/todoroo/astrid/model/Metadata.java +++ b/src/com/todoroo/astrid/model/Metadata.java @@ -30,7 +30,7 @@ public class Metadata extends AbstractModel { /** ID */ public static final LongProperty ID = new LongProperty( - TABLE, ID_PROPERTY); + TABLE, ID_PROPERTY_NAME); /** Associated Task */ public static final LongProperty TASK = new LongProperty( diff --git a/src/com/todoroo/astrid/service/FlurryReporter.java b/src/com/todoroo/astrid/service/FlurryReporter.java new file mode 100644 index 000000000..ace1af9e8 --- /dev/null +++ b/src/com/todoroo/astrid/service/FlurryReporter.java @@ -0,0 +1,48 @@ +/** + * See the file "LICENSE" for the full license governing this code. + */ + +package com.todoroo.astrid.service; + +import java.io.PrintWriter; +import java.io.StringWriter; + +import android.database.sqlite.SQLiteException; + +import com.flurry.android.FlurryAgent; +import com.todoroo.andlib.service.ExceptionService.ErrorReporter; + +public class FlurryReporter implements ErrorReporter { + + @SuppressWarnings("nls") + public void handleError(String name, Throwable error) { + String message = error.toString(); + + StringWriter writer = new StringWriter(); + PrintWriter writerPrinter = new PrintWriter(writer); + error.printStackTrace(writerPrinter); + writerPrinter.flush(); + writerPrinter.close(); + + String trace = writer.toString(); + + // shorten the string + trace = trace.substring(message.length()); + trace = trace.replaceAll("com.todoroo.bente", "!ctb"); + trace = trace.replaceAll("com.todoroo.astrid", "!cta"); + trace = trace.replaceAll("com.todoroo.android", "!ctc"); + trace = trace.replaceAll("com.mdt.rtm", "!rtm"); + trace = trace.replaceAll("android.database.sqlite", "!sqlite"); + trace = trace.replaceAll("android", "!A"); + trace = trace.replaceAll("database", "!db"); + trace = trace.replaceAll("org.apache.harmony.xml.parsers", "!xmlp"); + trace = trace.replaceAll(IllegalStateException.class.getName(), "IlStEx"); + trace = trace.replaceAll(ClassCastException.class.getName(), "ClCaEx"); + trace = trace.replaceAll(NullPointerException.class.getName(), "NPEx"); + trace = trace.replaceAll(SQLiteException.class.getName(), "SqLiEx"); + trace = trace.replaceAll(".java:", ":"); + + FlurryAgent.onError(name, message, trace); + } + +} diff --git a/src/com/todoroo/astrid/service/MetadataService.java b/src/com/todoroo/astrid/service/MetadataService.java index 7beee88ec..5baf83df9 100644 --- a/src/com/todoroo/astrid/service/MetadataService.java +++ b/src/com/todoroo/astrid/service/MetadataService.java @@ -1,10 +1,14 @@ package com.todoroo.astrid.service; -import com.todoroo.android.data.Property; -import com.todoroo.android.data.TodorooCursor; -import com.todoroo.android.data.Property.IntegerProperty; -import com.todoroo.android.service.Autowired; -import com.todoroo.android.service.DependencyInjectionService; +import com.thoughtworks.sql.Criterion; +import com.thoughtworks.sql.Order; +import com.thoughtworks.sql.Query; +import com.todoroo.andlib.data.Property; +import com.todoroo.andlib.data.TodorooCursor; +import com.todoroo.andlib.data.Property.CountProperty; +import com.todoroo.andlib.data.Property.IntegerProperty; +import com.todoroo.andlib.service.Autowired; +import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.astrid.dao.Database; import com.todoroo.astrid.dao.MetadataDao; import com.todoroo.astrid.model.Metadata; @@ -68,16 +72,14 @@ public class MetadataService { * @param where SQL where clause * @param onlyCountsGreaterThanZero only include items where count > 0 */ - public TodorooCursor fetchWithCount(String where, String sort, + public TodorooCursor fetchWithCount(Criterion where, Order order, boolean onlyCountsGreaterThanZero) { - IntegerProperty count = Property.countProperty(); - String having = null; + IntegerProperty count = new CountProperty(); + Query query = Query.select(Metadata.VALUE, count). + where(where).orderBy(order); if(onlyCountsGreaterThanZero) - having = count.name + " > 0"; //$NON-NLS-1$ - TodorooCursor cursor = metadataDao.fetch(database, new Property[] { - Metadata.VALUE, count }, - where, - Metadata.VALUE.name, having, sort, null); + query.having(count.gt(0)); + TodorooCursor cursor = metadataDao.query(database, query); return cursor; } @@ -85,7 +87,7 @@ public class MetadataService { * Delete from metadata table where rows match a certain condition * @param where */ - public void deleteWhere(String where) { + public void deleteWhere(Criterion where) { metadataDao.deleteWhere(database, where); } } diff --git a/src/com/todoroo/astrid/service/TaskService.java b/src/com/todoroo/astrid/service/TaskService.java index 694ea5775..9c7e0d0b4 100644 --- a/src/com/todoroo/astrid/service/TaskService.java +++ b/src/com/todoroo/astrid/service/TaskService.java @@ -1,5 +1,6 @@ package com.todoroo.astrid.service; +import com.thoughtworks.sql.Query; import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.service.Autowired; @@ -8,6 +9,7 @@ import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.dao.Database; import com.todoroo.astrid.dao.TaskDao; +import com.todoroo.astrid.dao.TaskDao.TaskCriteria; import com.todoroo.astrid.model.Task; /** @@ -39,18 +41,6 @@ public class TaskService { // --- service layer - /** - * Return cursor to tasks returned by given {@link Filter} - * - * @param properties - * @param filter - * @return - */ - public TodorooCursor fetchFiltered(Property[] properties, - Filter filter) { - return taskDao.fetch(database, properties, filter); - } - /** * * @param properties @@ -101,7 +91,8 @@ public class TaskService { * Clean up tasks. Typically called on startup */ public void cleanup() { - TodorooCursor cursor = taskDao.fetch(database, idProperties(), TaskSql.hasNoName(), null); + TodorooCursor cursor = taskDao.query(database, + Query.select(idProperties()).where(TaskCriteria.hasNoTitle())); try { if(cursor.getCount() == 0) return;