]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/DictionaryActivity.java
Fixed add to wordlist on fresh install.
[Dictionary.git] / src / com / hughes / android / dictionary / DictionaryActivity.java
index f15a186869c1c1deb01f69b9fbdb022ce1ec0a6e..999a4f0b783b4662b8cb185cb6bf75718bdd8447 100644 (file)
@@ -413,8 +413,7 @@ public class DictionaryActivity extends SherlockListActivity {
         registerForContextMenu(getListView());
 
         // Cache some prefs.
-        wordList = new File(prefs.getString(getString(R.string.wordListFileKey),
-                new File(application.getDictDir(), "wordList.txt").getAbsolutePath()));
+        wordList = application.getWordListFile();
         saveOnlyFirstSubentry = prefs.getBoolean(getString(R.string.saveOnlyFirstSubentryKey),
                 false);
         clickOpensContextMenu = prefs.getBoolean(getString(R.string.clickOpensContextMenuKey),
@@ -920,6 +919,8 @@ public class DictionaryActivity extends SherlockListActivity {
                             return false;
                         }
                     });
+            // Rats, this won't be shown:
+            searchForSelection.setIcon(R.drawable.abs__ic_search);
         }
 
         if (row instanceof TokenRow && ttsReady) {
@@ -1008,7 +1009,7 @@ public class DictionaryActivity extends SherlockListActivity {
             final PrintWriter out = new PrintWriter(new FileWriter(wordList, true));
             out.println(rawText.toString());
             out.close();
-        } catch (IOException e) {
+        } catch (Exception e) {
             Log.e(LOG, "Unable to append to " + wordList.getAbsolutePath(), e);
             Toast.makeText(this,
                     getString(R.string.failedAddingToWordList, wordList.getAbsolutePath()),