]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Random word, report issue, what's new.
authorThad Hughes <thad.hughes@gmail.com>
Thu, 16 Feb 2012 22:39:33 +0000 (14:39 -0800)
committerThad Hughes <thad.hughes@gmail.com>
Thu, 16 Feb 2012 22:39:33 +0000 (14:39 -0800)
AndroidManifest.xml
res/raw-de/whats_new.html
res/raw/whats_new.html
res/values-de/strings.xml
res/values/strings.xml
src/com/hughes/android/dictionary/DictionaryActivity.java
src/com/hughes/android/dictionary/DictionaryApplication.java

index 8fdac89697e631d810b80a29ec659dabf410b3a8..76e41c49a184352a392c5b42f1d05b28247b7d3f 100644 (file)
@@ -4,8 +4,8 @@
  
  package="com.hughes.android.dictionary"
  
- android:versionCode="16"
- android:versionName="3.1"
+ android:versionCode="17"
+ android:versionName="3.1.1"
  android:installLocation="preferExternal">
 
  <uses-sdk android:minSdkVersion="4" />
index b7f4b2728c2d4d19ad3f2d36f2e9c97286fb6f1f..510bcc067289cb282dd686e4768e42fc854b7dec 100644 (file)
 Vielen Dank f&uuml;r die Aktualisierung auf QuickDic 3.1.
 <p>Neue Funktionen:</p>
 <ul>
-<li>Suche nach mehreren Begriffen gleichzeitig (durch Leerzeichen
-getrennt).</li>
-<li>Alle W&ouml;rter sind Hyperlinks: long-dr&uuml;cken jedes Wort
-in einem W&ouml;rterbuch, um dieses Wort zu suchen.</li>
-<li>W&ouml;rterbuch wechseln ist einfacher: Long-dr&uuml;cken den
-Sprache-Taste.</li>
-<li>New English W&ouml;rterb&uuml;cher: Azeri, Basque, Breton,
-Burmese, Faroese, Galician, Georgian, Haitian Creole,
-Luxembourgish, Macedonian, Tagalog, Urdu. (von enwiktionary.com
-Daten).</li>
-<li>Alle W&ouml;rterb&uuml;cher aktualisiert (vor allem mit einer
-besseren Formatierung), und k&ouml;nnen in Ihrer Freizeit (zuvor
-heruntergeladene W&ouml;rterb&uuml;cher wird immer noch
-funktionieren) erneut heruntergeladen werden.</li>
+<li>Eröffnen zuletzt verwendete Wörterbuch auf Start (Bug-Fix)</li>
+<li>Problem melden Menüeintrag</li>
+<li>Random Wort suchen.</li>
 </ul>
 </body>
 </html>
index 8aff685262a32bec14155d1ab6dce55a0c566518..8684fd9e4807609687b9fa6b6208b5240ceffa5c 100644 (file)
@@ -9,19 +9,12 @@
 </head>
 <body>
 <!-- Don't use links in the text below, it crashes the app. -->
-Thanks for updating to QuickDic 3.2.
+Thanks for updating to QuickDic 3.1.1
 <p>New features:</p>
 <ul>
-<li>Go straight to last-used dictionary on launch.</li>
-
-<li>Easier dictionary switching: long-press the switch-language
-button.</li>
-<li>New English dictionaries: Azeri, Basque, Breton, Burmese,
-Faroese, Galician, Georgian, Haitian Creole, Luxembourgish,
-Macedonian, Tagalog, Urdu. (from enwiktionary.com data).</li>
-<li>All dictionaries updated (mostly with better formatting), and
-can be re-downloaded at your leisure (previously downloaded
-dictionaries will still work).</li>
+<li>Go straight to last-used dictionary on launch (bug-fix).</li>
+<li>Report issue menu item.</li>
+<li>Jump to random word.</li>
 </ul>
 </body>
 </html>
index 730d9969245ff6f2eb59b50d4a7d094a34623261..cea74e42fd3263719fcb6efc1e9617ba0df225bd 100644 (file)
@@ -7,6 +7,7 @@
   <string name="about">Über QuickDic…</string>
   <string name="preferences">Einstellungen…</string>
   <string name="help">Hilfe</string>
+  <string name="reportIssue">Problem melden…</string>
   
   
   <!-- DictionaryManagerActivity -->
@@ -32,6 +33,7 @@
   <string name="invalidDictionary">Invalid dictionary: file=%1$s, error=%2$s</string>
   <string name="noSearchResults">Keine Treffe.</string>
   <string name="aboutDictionary">Über Wörterbuch…</string> 
+  <string name="randomWord">Random Wort</string> 
   
   
   <!-- About dictionary. -->
index 4d48c9d7027281ebf614881d4a7f01d3e002e074..a5a6dd2a68ec36d6080564cc422e560a8c619eb4 100644 (file)
@@ -7,6 +7,7 @@
   <string name="about">About QuickDic…</string> 
   <string name="preferences">Preferences…</string>
   <string name="help">Help</string>
+  <string name="reportIssue">Report issue…</string>
   
   
    <!-- DictionaryManagerActivity -->
@@ -32,7 +33,8 @@
   <string name="invalidDictionary">Invalid dictionary: file=%1$s, error=%2$s</string>
   <string name="noSearchResults">No search results.</string>
   <string name="aboutDictionary">About dictionary…</string> 
-
+  <string name="randomWord">Random word</string> 
+  
 
   <!-- About dictionary. -->
   <string name="dictionaryPath">File: %s</string> 
index 2ecaf3738615785f7f876a837c3e47d92f7d7259..3827259cde49080d91d01dcf5dd5fc2e9315b86e 100644 (file)
@@ -25,6 +25,7 @@ import java.util.Collections;
 import java.util.Date;\r
 import java.util.LinkedHashSet;\r
 import java.util.List;\r
+import java.util.Random;\r
 import java.util.Set;\r
 import java.util.concurrent.Executor;\r
 import java.util.concurrent.Executors;\r
@@ -523,10 +524,23 @@ public class DictionaryActivity extends ListActivity {
   // Options Menu\r
   // --------------------------------------------------------------------------\r
   \r
+  final Random random = new Random();\r
+  \r
   @Override\r
   public boolean onCreateOptionsMenu(final Menu menu) {\r
     application.onCreateGlobalOptionsMenu(this, menu);\r
 \r
+    {\r
+      final MenuItem randomWord = menu.add(getString(R.string.randomWord));\r
+      randomWord.setOnMenuItemClickListener(new OnMenuItemClickListener() {\r
+        public boolean onMenuItemClick(final MenuItem menuItem) {\r
+          final String word = index.sortedIndexEntries.get(random.nextInt(index.sortedIndexEntries.size())).token;\r
+          setSearchText(word, true);\r
+          return false;\r
+        }\r
+      });\r
+    }\r
+    \r
     {\r
       final MenuItem dictionaryList = menu.add(getString(R.string.dictionaryManager));\r
       dictionaryList.setOnMenuItemClickListener(new OnMenuItemClickListener() {\r
index 25a5f445a6168452ca92e8968cb0656c0af43a1e..ba8960d02314817c8adcec4350cbde0d8b490001 100644 (file)
@@ -31,6 +31,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
+import android.net.Uri;
 import android.preference.PreferenceManager;
 import android.util.Log;
 import android.view.Menu;
@@ -148,6 +149,17 @@ public class DictionaryApplication extends Application {
         return false;
       }
     });
+    
+    
+    final MenuItem reportIssue = menu.add(getString(R.string.reportIssue));
+    reportIssue.setOnMenuItemClickListener(new OnMenuItemClickListener() {
+      public boolean onMenuItemClick(final MenuItem menuItem) {
+        final Intent intent = new Intent(Intent.ACTION_VIEW);
+        intent.setData(Uri.parse("http://code.google.com/p/quickdic-dictionary/issues/entry"));
+        context.startActivity(intent);
+        return false;
+      }
+    });
   }
   
   public synchronized File getDictDir() {