]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Preferences changes to open context menu, tried to fix focus, more
authorThad Hughes <thad.hughes@gmail.com>
Fri, 23 Dec 2011 02:57:23 +0000 (18:57 -0800)
committerThad Hughes <thad.hughes@gmail.com>
Fri, 23 Dec 2011 02:57:23 +0000 (18:57 -0800)
entry types.

res/values/strings.xml
res/xml/preferences.xml [changed mode: 0755->0644]
src/com/hughes/android/dictionary/DictionaryActivity.java
src/com/hughes/android/dictionary/DictionaryEditActivity.java
src/com/hughes/android/dictionary/DictionaryListActivity.java
src/com/hughes/android/dictionary/DownloadActivity.java
src/com/hughes/android/dictionary/engine/EntryTypeName.java
src/com/hughes/android/dictionary/engine/Language.java

index faae24dec36fd6cae977b115533c4e89c80c97c6..4509546c261ec361107f8fcd3e492942b4464c62 100644 (file)
        <!-- About. -->
        <string name="titleWithVersion">QuickDic 3.0</string>
        <string name="thadHughes">Thad Hughes</string>
-       <string name="contactMe">If you\'re using QuickDic, I\'d love to hear from you.  Unfortunately, I cannot take responsibility for dictionary content, as it is generated from other sources. Please send comments, suggestions, bug reports, or just a quick hello to:</string>
+       <string name="contactMe">If you\'re using QuickDic, I\'d love to hear from you.  Unfortunately, I cannot take responsibility for dictionary content (other than formatting), as it is generated from other sources. Please send comments, suggestions, bug reports, or just a quick hello to:</string>
        <string name="myEmail" formatted="false">thad.hughes@gmail.com</string>
   <string name="webPage">For more information, see:</string>
-  <string name="webPageUrl">http://sites.google.com/site/quickdic/home</string>
+  <string name="webPageUrl">http://code.google.com/p/quickdic-dictionary/</string>
   
   <string name="license">QuickDic contains code copyrighted by Google and released under the Apache 2.0 license.</string>
   <string name="licenseUrl">http://www.apache.org/licenses/LICENSE-2.0</string>
   <string name="saveOnlyFirstSubentryTitle">Save only first sub-entry</string>
   <string name="saveOnlyFirstSubentrySummary">For entries with multiple sub-entries, only write the first to the word list.</string>
 
+  <string name="clickOpensContextMenuKey">clickOpensContextMenu</string>
+  <string name="clickOpensContextMenuTitle">Click opens context menu</string>
+  <string name="clickOpensContextMenuSummary">Open context menu for clicks on entries (long-click will always open-context menu).</string>
+
   <string name="showClearSearchTextButtonKey">showClearSearchTextButton</string>
   <string name="showClearSearchTextButtonTitle">Show \'clear search text\' button</string>
   <string name="showClearSearchTextButtonSummary">Show the button to clear the search text. You can also just move focus away from search text and start typing.</string>
old mode 100755 (executable)
new mode 100644 (file)
index 52cea01..af00c84
     android:persistent="true"\r
   />\r
 \r
+  <CheckBoxPreference \r
+    android:key="@string/clickOpensContextMenuKey"\r
+    android:title="@string/clickOpensContextMenuTitle"\r
+    android:summary="@string/clickOpensContextMenuSummary"\r
+    android:defaultValue="false"\r
+    android:persistent="true"\r
+  />\r
+\r
   <CheckBoxPreference \r
     android:key="@string/showClearSearchTextButtonKey"\r
     android:title="@string/showClearSearchTextButtonTitle"\r
index e6eb3d1297054fa7b1f0945e4b66d71b4e46ebb4..966425eb34da6d6fcc1eebfde90b40110a1a7fae 100644 (file)
@@ -99,6 +99,7 @@ public class DictionaryActivity extends ListActivity {
   // Never null.\r
   private File wordList = null;\r
   private boolean saveOnlyFirstSubentry = false;\r
+  private boolean clickOpensContextMenu = false;\r
 \r
   // Visible for testing.\r
   ListAdapter indexAdapter = null;\r
@@ -275,6 +276,7 @@ public class DictionaryActivity extends ListActivity {
     wordList = new File(prefs.getString(getString(R.string.wordListFileKey),\r
         getString(R.string.wordListFileDefault)));\r
     saveOnlyFirstSubentry = prefs.getBoolean(getString(R.string.saveOnlyFirstSubentryKey), false);\r
+    clickOpensContextMenu = prefs.getBoolean(getString(R.string.clickOpensContextMenuKey), false);\r
     //if (prefs.getBoolean(getString(R.string.vibrateOnFailedSearchKey), true)) {\r
       // vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\r
     //}\r
@@ -466,7 +468,9 @@ public class DictionaryActivity extends ListActivity {
   \r
   @Override\r
   protected void onListItemClick(ListView l, View v, int row, long id) {\r
-    openContextMenu(v);\r
+    if (clickOpensContextMenu) {\r
+      openContextMenu(v);\r
+    }\r
   }\r
   \r
   void onAppendToWordList(final RowBase row) {\r
index f1f206719c0c182f33637ab42d6ef85fcb86d1dd..12d3ae2e8ab44ad3b17302d16ea323fe41bd038d 100644 (file)
@@ -132,8 +132,12 @@ public class DictionaryEditActivity extends Activity {
   
   protected void onResume() {
     super.onResume();
-    
+
     updateDictInfo();
+
+    // Focus the download button so the keyboard doesn't pop up.
+    final Button downloadButton = (Button) findViewById(R.id.downloadButton);
+    downloadButton.requestFocus();
   }
 
   @Override
index c10fc62e159ba407bc0eb895e4b1385b2bd5beba..6dad97e5fcd3789925d2eedd2ebe1cf73c8ea1a2 100644 (file)
@@ -248,7 +248,7 @@ public class DictionaryListActivity extends ListActivity {
       }
 
       view.setText(name);
-      view.setTextSize(20);
+      view.setTextSize(22);
       tableLayout.addView(view);
 
       return tableLayout;
index 9c00eb3c02c4be2c3a9351a776442cba79cea40f..7c81e454333f302b6bbea1243a729352586cba3a 100644 (file)
@@ -122,6 +122,15 @@ public class DownloadActivity extends Activity {
           \r
           setDownloadStatus(String.format(getString(R.string.downloadFinished),\r
               bytesProcessed));\r
+          \r
+          // If all went well, we can exit this activity.\r
+          uiHandler.post(new Runnable() {\r
+            @Override\r
+            public void run() {\r
+              finish();\r
+            }\r
+          });\r
+          \r
         } catch (IOException e) {\r
           Log.e("THAD", "Error downloading file", e);\r
           setDownloadStatus(String.format(getString(R.string.errorDownloadingFile), e.getLocalizedMessage()));\r
index 7ea167ec5465b7b6233626cfabf638dc0367febd..27868d6c3d83055081236b01709e6d373c782c2d 100644 (file)
@@ -22,7 +22,7 @@ public enum EntryTypeName {
 //  WIKTIONARY_TRANSLATION_ONE_WORD(0),
 
   WIKTIONARY_TITLE_SINGLE(0, true),
-  WIKTIONARY_FORM_SINGLE(0, true),
+  WIKTIONARY_INFLECTD_FORM_SINGLE(0, true),
 
   NOUN(0),
   VERB(0),
@@ -33,7 +33,7 @@ public enum EntryTypeName {
   MULTIROW_TAIL_ONE_WORD(0, true),
 
   WIKTIONARY_TITLE_MULTI(0, true),
-  WIKTIONARY_FORM_MULTI(0, true),
+  WIKTIONARY_INFLECTED_FORM_MULTI(0, true),
   WIKTIONARY_TRANSLATION_SENSE(0),
   WIKTIONARY_ENGLISH_DEF_WIKI_LINK(0),
   WIKTIONARY_ENGLISH_DEF_OTHER_LANG(0),
@@ -50,6 +50,8 @@ public enum EntryTypeName {
   MULTIROW_HEAD_MANY_WORDS(0),
   MULTIROW_TAIL_MANY_WORDS(0),
   WIKTIONARY_EXAMPLE(0),
+  WIKTIONARY_BASE_FORM_SINGLE(0),  // These two should be eligible for removal....
+  WIKTIONARY_BASE_FORM_MULTI(0),
   PART_OF_HYPHENATED(0),
   BRACKETED(0),
   PARENTHESIZED(0),
index 43811764eab86a7a90407fa2eec2e47a8dc9ebbd..0e216cc9d2442399731eba5fe915428c71501b96 100644 (file)
@@ -71,6 +71,7 @@ public class Language {
     isoCodeToWikiName.put("MN", "Mongolian");\r
     isoCodeToWikiName.put("NO", "Norwegian");\r
     isoCodeToWikiName.put("FA", "Persian");\r
+    isoCodeToWikiName.put("PL", "Polish");\r
     isoCodeToWikiName.put("PT", "Portuguese");\r
     isoCodeToWikiName.put("RO", "Romanian");\r
     isoCodeToWikiName.put("RU", "Russian");\r