Changeset 1540 for trunk/src/org/expeditee/gui/FrameIO.java
- Timestamp:
- 11/02/20 15:47:20 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameIO.java
r1532 r1540 1100 1100 1101 1101 if (toSave == null || !toSave.hasChanged() || toSave.isSaved()) { 1102 System.err.println("FrameIO::SaveFrame::Nothing to save, backing out."); 1102 1103 return ""; 1104 } 1105 1106 if (toSave.getName().toLowerCase().equals("abc146a1")) { 1107 System.out.println("here"); 1103 1108 } 1104 1109 … … 1200 1205 boolean fileModifyConflict = fileLastModify > frameLastModify && !isBayFrameset; 1201 1206 boolean versionConflict = savedVersion > toSave.getVersion() && !isBayFrameset; 1207 1208 System.err.println("FrameIO::SaveFrame::Checking for conflicts for frame:" + toSave.getName()); 1202 1209 1203 1210 if ((fileModifyConflict || versionConflict) && savedVersion > 0) { … … 1405 1412 } 1406 1413 1407 public static Frame LoadProfile(String userName)1414 public static Frame LoadProfile(String profileName) 1408 1415 { 1409 1416 final String profilesLoc = System.getProperty("profiles.loc"); 1410 1417 if (profilesLoc != null) { 1411 return LoadFrame( userName + "1", profilesLoc);1418 return LoadFrame(profileName + "1", profilesLoc); 1412 1419 } else { 1413 return LoadFrame( userName + "1");1414 } 1415 } 1416 1417 public static Frame CreateNewProfile(String user name, Map<String, Setting> initialSettings, Map<String, Consumer<Frame>> toNotifyOnSet) throws InvalidFramesetNameException, ExistingFramesetException {1420 return LoadFrame(profileName + "1"); 1421 } 1422 } 1423 1424 public static Frame CreateNewProfile(String userName, String profileName, Map<String, Setting> initialSettings, Map<String, Consumer<Frame>> toNotifyOnSet) throws InvalidFramesetNameException, ExistingFramesetException { //TODO: Investigate these throws, they never seem to be thrown up this far. 1418 1425 // Frame profile = CreateFrameset(username, PROFILE_PATH, true); 1419 1426 // if (profile != null) { … … 1425 1432 // } 1426 1433 // return profile; 1427 if ( username.equals(UserSettings.DEFAULT_PROFILE_NAME)) {1428 ProfileManager.ensureDefaultProfile();1429 return FrameIO.LoadFrame(UserSettings.DEFAULT_PROFILE_NAME + "1");1434 if (profileName.equals(UserSettings.DEFAULT_PROFILE_NAME)) { 1435 System.err.println("FrameIO::CreateNewProfile::DEPRECATED::CreateNewProfile should no longer be called to create a default profile. Use FrameIO::CreateNewDefaultProfile instead."); 1436 return CreateNewDefaultProfile(); 1430 1437 } else { 1431 return ProfileManager.createProfile(username, initialSettings, toNotifyOnSet); 1432 } 1438 return ProfileManager.createProfile(userName, profileName, initialSettings, toNotifyOnSet); 1439 } 1440 } 1441 1442 public static Frame CreateNewDefaultProfile() throws InvalidFramesetNameException, ExistingFramesetException { //TODO: Investigate these throws, they never seem to be thrown up this far. 1443 ProfileManager.ensureDefaultProfile(); 1444 return FrameIO.LoadFrame(UserSettings.DEFAULT_PROFILE_NAME + "1"); 1433 1445 } 1434 1446
Note:
See TracChangeset
for help on using the changeset viewer.