]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Font size, rename dictionaries.
authorThad Hughes <thad.hughes@gmail.com>
Sun, 25 Dec 2011 23:57:32 +0000 (15:57 -0800)
committerThad Hughes <thad.hughes@gmail.com>
Sun, 25 Dec 2011 23:57:32 +0000 (15:57 -0800)
default.properties [changed from file to symlink]
res/values/strings.xml
res/xml/preferences.xml
src/com/hughes/android/dictionary/DictionaryActivity.java
src/com/hughes/android/dictionary/DictionaryListActivity.java
src/com/hughes/android/dictionary/QuickDicConfig.java

deleted file mode 100644 (file)
index c1fd41ab161dea222fff980fb16659b6b2f7902a..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-
-# Indicates whether an apk should be generated for each density.
-split.density=false
-# Project target.
-target=android-8
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..82d8917be216021e727a80d7886e2dbb6b7fb8ed
--- /dev/null
@@ -0,0 +1 @@
+project.properties
\ No newline at end of file
index 9aed937f08c6bfffb7262c92139ed4b3ed48d64b..7fd11390f1be11e256b1a4c81a12d7f69bed51eb 100644 (file)
@@ -88,7 +88,7 @@
 
   <string name="fontSizeKey">fontSize</string>
   <string name="fontSizeTitle">Font size</string>
-  <string name="fontSizeSummary">The size of the font for dictionary rows.</string>
+  <string name="fontSizeSummary">The size of the font for dictionary rows (restart required).</string>
 
   <string name="saveOnlyFirstSubentryKey">saveOnlyFirstSubentry</string>
   <string name="saveOnlyFirstSubentryTitle">Save only first sub-entry</string>
index d52c300eadbc41ffffec9a540d576d52d014bac8..ecd445e83613df50218834b5768046e9d060618d 100644 (file)
@@ -45,7 +45,7 @@
     android:title="@string/themeTitle"\r
     android:summary="@string/themeSummary"\r
     android:persistent="true"\r
-    android:defaultValue=""\r
+    android:defaultValue="themeLight"\r
     android:entries="@array/themes"\r
     android:entryValues="@array/themeKeys"\r
   />\r
index 00d4576012d7b5356bae9aec3ddcacf15335eee8..4c56e48c5592353e4630a2fd6c5dfbd452fadf9e 100644 (file)
@@ -221,7 +221,6 @@ public class DictionaryActivity extends ListActivity {
     searchText.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSizeSp);\r
     \r
     langButton = (Button) findViewById(R.id.LangButton);\r
-    langButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSizeSp);\r
     \r
     searchText.requestFocus();\r
     searchText.addTextChangedListener(searchTextWatcher);\r
@@ -734,7 +733,7 @@ public class DictionaryActivity extends ListActivity {
     private View getView(TokenRow row, ViewGroup parent) {\r
       final TextView textView = new TextView(parent.getContext());\r
       textView.setText(row.getToken());\r
-      textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 6 * fontSizeSp / 5);\r
+      textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 5 * fontSizeSp / 4);\r
       return textView;\r
     }\r
     \r
index 004ce2be4edcb459d0faac295d1d187a14c15858..923a9181aa5d730775dea1df9f35962b90aa4af7 100644 (file)
@@ -113,6 +113,13 @@ public class DictionaryListActivity extends ListActivity {
     }
     if (quickDicConfig.currentVersion < QuickDicConfig.LATEST_VERSION) {
       Log.d(LOG, "Dictionary list is old, updating it.");
+      
+      // Replace <-> with -
+      if (quickDicConfig.currentVersion == 3) {
+        for (final DictionaryConfig config : quickDicConfig.dictionaryConfigs) {
+          config.name = config.name.replace("<->", "-");
+        }
+      }
       quickDicConfig.addDefaultDictionaries();
       quickDicConfig.currentVersion = QuickDicConfig.LATEST_VERSION;
     }
index b042d401f6d4174ad13810395bf8af917d6f8458..c465c79257b48261b23ce06488f21f60e7e6424a 100644 (file)
@@ -25,7 +25,7 @@ public final class QuickDicConfig implements Serializable {
   private static final long serialVersionUID = 6711617368780900979L;
   
   // Just increment this to have them all update...
-  static final int LATEST_VERSION = 3;
+  static final int LATEST_VERSION = 4;
   
   final List<DictionaryConfig> dictionaryConfigs = new ArrayList<DictionaryConfig>();
   int currentVersion = LATEST_VERSION;
@@ -39,7 +39,7 @@ public final class QuickDicConfig implements Serializable {
   public void addDefaultDictionaries() {
     {
       final DictionaryConfig config = new DictionaryConfig();
-      config.name = "German<->English";
+      config.name = "German-English";
       config.downloadUrl = BASE_URL + "DE-EN_chemnitz_enwiktionary.quickdic.zip";
       config.localFile = "/sdcard/quickDic/DE-EN_chemnitz_enwiktionary.quickdic";
       addOrReplace(config);
@@ -50,7 +50,7 @@ public final class QuickDicConfig implements Serializable {
         continue;
       }
       final DictionaryConfig config = new DictionaryConfig();
-      config.name = String.format("English<->%s", Language.isoCodeToWikiName.get(iso));
+      config.name = String.format("English-%s", Language.isoCodeToWikiName.get(iso));
       config.downloadUrl = String.format("%sEN-%s_enwiktionary.quickdic.zip", BASE_URL, iso);
       config.localFile = String.format("/sdcard/quickDic/EN-%s_enwiktionary.quickdic", iso);
       addOrReplace(config);