Changeset 10009 for trunk/gli/src/org/greenstone/gatherer/gui
- Timestamp:
- 2005-06-03T14:49:55+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/HelpFrame.java
r10006 r10009 44 44 import javax.swing.event.*; 45 45 import javax.swing.tree.*; 46 import org.greenstone.gatherer.Configuration; 46 47 import org.greenstone.gatherer.DebugStream; 47 48 import org.greenstone.gatherer.Dictionary; … … 121 122 122 123 124 /** Retrieve the full file path to the help index xml file. 125 * @return the full path as a String 126 */ 127 private String getHelpFolder() 128 { 129 String help_folder = "help/" + Configuration.getLanguage() + "/"; 130 131 // Try in the JAR/classes directory first 132 URL help_folder_url = Utility.base.getResource("/" + help_folder); // !! 133 if (help_folder_url != null) { 134 return help_folder; 135 } 136 137 // Look in the base directory next 138 File help_folder_file = new File(help_folder); 139 if (help_folder_file.exists()) { 140 return help_folder; 141 } 142 143 // Resort to English 144 return "help/" + StaticStrings.ENGLISH_LANGUAGE_STR + "/"; 145 } 146 147 123 148 static public void setView(String section_name) 124 149 { … … 162 187 // Load the XML help file and build the contents structure from it 163 188 try { 164 String help_index = Utility.getHelpFolder() + StaticStrings.HELP_INDEX_FILENAME;189 String help_index = getHelpFolder() + StaticStrings.HELP_INDEX_FILENAME; 165 190 Document document = XMLTools.parseXMLFile(help_index, true); 166 191 … … 291 316 URL url = null; 292 317 293 String help_file = Utility.getHelpFolder() + name + StaticStrings.HTM_FILE_EXTENSION;318 String help_file = getHelpFolder() + name + StaticStrings.HTM_FILE_EXTENSION; 294 319 295 320 if (name != null && !name.equals(NULL_STRING)) {
Note:
See TracChangeset
for help on using the changeset viewer.