Skip to content

Commit

Permalink
Merge pull request #5 from derekprovance/move-dictionary
Browse files Browse the repository at this point in the history
Move dictionary
  • Loading branch information
derekprovance committed May 11, 2016
2 parents 7d42929 + 2cc8b05 commit 155c548
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 15 deletions.
6 changes: 3 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@
<include name="freemind.sh"/>
<include name="license"/>
<include name="patterns.xml"/>
<include name="dictionaries.properties"/>
<include name="dictionary_??.ortho"/>
<include name="dictionaries/dictionaries.properties"/>
<include name="dictionaries/dictionary_??.ortho"/>
</fileset>
</copy>
<chmod file="${dist}/freemind.sh" perm="u+rx"/>
Expand Down Expand Up @@ -322,7 +322,7 @@
<copy todir="${dist_macos_contents}/Resources/Java">
<fileset dir="${dist}">
<include name="doc/*" />
<include name="dictionar*" />
<include name="dictionaries/**" />
</fileset>
</copy>
<!-- change freemind.properties -->
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion freemind/main/FreeMind.java
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ private void setupSpellChecking() {
Tools.safeEquals("true", props.getProperty(FreeMindCommon.CHECK_SPELLING));
if (checkSpelling) {
try {
String decodedPath = Tools.getFreeMindBasePath();
String decodedPath = Tools.getFreeMindBasePath() + "dictionaries/";
URL url = null;
if (new File (decodedPath).exists()) {
url = new URL("file", null, decodedPath);
Expand Down
14 changes: 5 additions & 9 deletions freemind/main/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -2020,21 +2020,17 @@ public static void invokeAndWait(Runnable pRunnable)
}
}

public static String getFreeMindBasePath()
throws UnsupportedEncodingException {
String path = FreeMindStarter.class.getProtectionDomain()
.getCodeSource().getLocation().getPath();
public static String getFreeMindBasePath() throws UnsupportedEncodingException {
String path = FreeMindStarter.class.getProtectionDomain().getCodeSource().getLocation().getPath();
String decodedPath = URLDecoder.decode(path, "UTF-8");
logger.info("Path: " + decodedPath);
if (decodedPath.endsWith(CONTENTS_JAVA_FREEMIND_JAR)) {
decodedPath = decodedPath.substring(0, decodedPath.length()
- CONTENTS_JAVA_FREEMIND_JAR.length());
decodedPath = decodedPath.substring(0, decodedPath.length() - CONTENTS_JAVA_FREEMIND_JAR.length());
decodedPath = decodedPath + FREE_MIND_APP_CONTENTS_RESOURCES_JAVA;
logger.info("macPath: " + decodedPath);
} else if (decodedPath.endsWith(FREEMIND_LIB_FREEMIND_JAR)) {
decodedPath = decodedPath.substring(0, decodedPath.length()
- FREEMIND_LIB_FREEMIND_JAR.length());
logger.info("reducded Path: " + decodedPath);
decodedPath = decodedPath.substring(0, decodedPath.length() - FREEMIND_LIB_FREEMIND_JAR.length());
logger.info("reduced Path: " + decodedPath);
}
return decodedPath;
}
Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Wed May 11 16:02:16 CDT 2016
build.number=310
#Wed May 11 16:37:20 CDT 2016
build.number=320

0 comments on commit 155c548

Please sign in to comment.