Commit a48067ec40edf166d28a777a4565bc1c71aadbb3

Authored by Marcin Woliński
1 parent d2095876

nowa wersja GUI

sprawdzająca istnienie ścieżki do słownika zapamiętanej w
preferencjach (poprzednia się na tym wywalała)

Autor, jak poprzednio: Piotr Rychlik
CMakeLists.txt
... ... @@ -4,7 +4,7 @@ project (Morfeusz)
4 4  
5 5 set (Morfeusz_VERSION_MAJOR 1)
6 6 set (Morfeusz_VERSION_MINOR 9)
7   -set (Morfeusz_VERSION_PATCH 12)
  7 +set (Morfeusz_VERSION_PATCH 13)
8 8 set (Morfeusz_VERSION "${Morfeusz_VERSION_MAJOR}.${Morfeusz_VERSION_MINOR}.${Morfeusz_VERSION_PATCH}")
9 9 set (Morfeusz_LIB_VERSION "${Morfeusz_VERSION}")
10 10 if (BUILT_ON)
... ...
gui/morfeusz.nsi
... ... @@ -9,7 +9,7 @@
9 9 !define WEB_SITE "morfeusz.sgjp.pl/"
10 10 !define COPYRIGHT "Institute of Computer Science, Polish Academy of Sciences"
11 11 !define DESCRIPTION "Morfological analyzer and generator for Polish"
12   -!define INSTALLER_NAME "${TARGET_DIR}/morfeusz-gui${VERSION}-Windows-${ARCHITECTURE}.exe"
  12 +!define INSTALLER_NAME "${TARGET_DIR}/morfeusz2-gui-${VERSION}-Windows-${ARCHITECTURE}.exe"
13 13 !define MAIN_APP_EXE "morfeusz-gui.exe"
14 14 !define INSTALL_TYPE "SetShellVarContext all"
15 15 !define REG_ROOT "HKLM"
... ...
gui/morfeusz/AboutDialog.java
... ... @@ -15,7 +15,7 @@ public class AboutDialog extends JPanel
15 15 private JDialog dialog;
16 16 private JCheckBox pr = new JCheckBox("Program");
17 17 private JCheckBox dict = new JCheckBox("S\u0142ownik");
18   - private JTextArea ta = new JTextArea(4, 58);
  18 + private JTextArea ta = new JTextArea(14, 58);
19 19 private Rectangle rect = new Rectangle(0, 0, 0, 0);
20 20 private String copyrights;
21 21 private String dictCopyrights;
... ...
gui/morfeusz/Agent.java
... ... @@ -54,13 +54,18 @@ public class Agent
54 54  
55 55 morfeusz = null;
56 56 if (prefs.dictionary != null) {
57   - try {
58   - morfeusz = pl.sgjp.morfeusz.Morfeusz.createInstance(prefs.dictionary, MorfeuszUsage.BOTH_ANALYSE_AND_GENERATE);
59   - }
60   - catch (Exception exception) {
61   - morfeusz = null;
62   - prefs.dictionary = null;
  57 + File file = new File(prefs.dictionary);
  58 +
  59 + if (file.exists()) {
  60 + try {
  61 + morfeusz = pl.sgjp.morfeusz.Morfeusz.createInstance(prefs.dictionary, MorfeuszUsage.BOTH_ANALYSE_AND_GENERATE);
  62 + }
  63 + catch (Exception exception) {
  64 + morfeusz = null;
  65 + prefs.dictionary = null;
  66 + }
63 67 }
  68 + else prefs.dictionary = null;
64 69 }
65 70 if (morfeusz == null) {
66 71 try {
... ...