Changeset 641 for trunk/src/org/expeditee/settings/UserSettings.java
- Timestamp:
- 12/18/13 14:22:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/settings/UserSettings.java
r639 r641 90 90 public static String HomeFrame = null; 91 91 public static void setHomeFrame(Text t) { 92 if(t.getText().indexOf(':') == -1 || !t.hasLink()) { 93 t.setLink(FrameIO.LoadProfile(UserSettings.ProfileName).getName()); 94 } 92 95 String first = FrameUtils.getLink(t, UserSettings.HomeFrame); 93 96 // do not use non-existant frames as the first frame … … 111 114 } 112 115 public static void setFramesetDir(Text t) { 116 if(t.getText().indexOf(':') == -1) { 117 return; 118 } 113 119 String dir = null; 114 120 AttributeValuePair avp = new AttributeValuePair(t.getText()); … … 126 132 } 127 133 public static void setImageDir(Text t) { 134 if(t.getText().indexOf(':') == -1) { 135 return; 136 } 128 137 String dir = null; 129 138 AttributeValuePair avp = new AttributeValuePair(t.getText()); … … 137 146 138 147 public static void setLogDir(Text t) { 148 if(t.getText().indexOf(':') == -1) { 149 return; 150 } 139 151 AttributeValuePair avp = new AttributeValuePair(t.getText()); 140 152 if(avp.getValue().trim().length() != 0) { … … 177 189 */ 178 190 public static void setColorWheel(Text t) { 179 Item.COLOR_WHEEL = FrameUtils.getColorWheel(t);191 if(t.getChild() != null) Item.COLOR_WHEEL = FrameUtils.getColorWheel(t); 180 192 } 181 193 182 194 public static void setFillColorWheel(Text t) { 183 Item.FILL_COLOR_WHEEL = FrameUtils.getColorWheel(t);195 if(t.getChild() != null) Item.FILL_COLOR_WHEEL = FrameUtils.getColorWheel(t); 184 196 } 185 197 186 198 public static void setBackgroundColorWheel(Text t) { 187 Frame.COLOR_WHEEL = FrameUtils.getColorWheel(t);199 if(t.getChild() != null) Frame.COLOR_WHEEL = FrameUtils.getColorWheel(t); 188 200 } 189 201 … … 218 230 219 231 public static void setSpellChecker(Text t) { 220 try { 221 JSpellChecker.create(); 222 } catch (FileNotFoundException e) { 223 MessageBay.errorMessage("Could not find dictionary: " 224 + e.getMessage()); 225 } catch (IOException e) { 226 e.printStackTrace(); 232 AttributeValuePair avp = new AttributeValuePair(t.getText()); 233 if(avp.getBooleanValue()) { 234 try { 235 JSpellChecker.create(); 236 } catch (FileNotFoundException e) { 237 MessageBay.errorMessage("Could not find dictionary: " 238 + e.getMessage()); 239 } catch (IOException e) { 240 e.printStackTrace(); 241 } 227 242 } 228 243 } 229 244 public static void setSpelling(Text t) { 230 try { 231 JSpellChecker.create(t.getChild()); 232 } catch (Exception e) { 233 e.printStackTrace(); 234 } 245 if(t.hasLink()) { 246 try { 247 JSpellChecker.create(t.getChild()); 248 } catch (Exception e) { 249 e.printStackTrace(); 250 } 251 } 235 252 } 236 253
Note:
See TracChangeset
for help on using the changeset viewer.