- Timestamp:
- 11/02/20 15:47:20 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/management/ProfileManager.java
r1532 r1540 31 31 private static final String[] startPages = { "exploratorysearch", "webbrowser" }; 32 32 public static final String USER_NAME_FLAG = "${" + "USER.NAME" + "}"; 33 34 public static Frame createProfile(String profileFor, Map<String, Setting> specifiedSettings, 33 public static final String PROFILE_NAME_FLAG = "${" + "PROFILE.NAME" + "}"; 34 35 public static Frame createProfile(String username, String profileName, Map<String, Setting> specifiedSettings, 35 36 Map<String, Consumer<Frame>> notifyWhenGenerated) { 36 37 ensureDefaultProfile(); 37 38 Frame profileOne = null; 38 profileFor = FrameIO.ConvertToValidFramesetName(profileFor);39 //String profileName = FrameIO.ConvertToValidFramesetName(username); // TODO: Delete this line before SVN commit 39 40 40 41 try { 41 Frame profile = FrameIO.CreateFrameset(profile For, FrameIO.PROFILE_PATH, true, null);42 Frame profile = FrameIO.CreateFrameset(profileName, FrameIO.PROFILE_PATH, true, null); 42 43 profileOne = profile; 43 profile.setTitle( profileFor+ "'s Profile");44 profile.setTitle(username + "'s Profile"); 44 45 Frame defaultFrame = FrameIO.LoadFrame(DEFAULT + "1"); 45 46 MessageBay.suppressMessages(true); 46 UserSettings.UserName.set( profileFor);47 UserSettings.ProfileName.set( FrameIO.ConvertToValidFramesetName(profileFor));47 UserSettings.UserName.set(username); 48 UserSettings.ProfileName.set(profileName); 48 49 49 50 int lastNumber = FrameIO.getLastNumber(defaultFrame.getFramesetName()); … … 83 84 if (item instanceof Text) { 84 85 String content = item.getText(); 85 item.setText(ResourceUtil.substitute(content, ProfileManager.USER_NAME_FLAG, profileFor)); 86 String contentWithUserSub = ResourceUtil.substitute(content, ProfileManager.USER_NAME_FLAG, username); 87 String contentWithUserAndProfileSub = ResourceUtil.substitute(contentWithUserSub, ProfileManager.PROFILE_NAME_FLAG, FrameIO.ConvertToValidFramesetName(profileName)); 88 item.setText(contentWithUserAndProfileSub); 86 89 } 87 90 }
Note:
See TracChangeset
for help on using the changeset viewer.