Changeset 1539 for trunk/src/org/expeditee/settings/UserSettings.java
- Timestamp:
- 11/02/20 15:41:32 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/settings/UserSettings.java
r1474 r1539 31 31 import org.expeditee.agents.wordprocessing.JSpellChecker; 32 32 import org.expeditee.auth.AuthenticatorBrowser; 33 import org.expeditee.gui.Browser; 33 34 import org.expeditee.gui.Frame; 34 35 import org.expeditee.gui.FrameIO; … … 36 37 import org.expeditee.gui.MessageBay; 37 38 import org.expeditee.gui.management.ProfileManager; 39 import org.expeditee.gui.management.ResourceUtil; 38 40 import org.expeditee.items.Text; 39 41 import org.expeditee.setting.BooleanSetting; … … 59 61 public static final IntegerSetting Gravity = new IntegerSetting("Distance the cursor has to be from a text item to select the text item", "Gravity", 3); 60 62 63 public static final StringSetting UserName = new StringSetting("User name", ProfileManager.USER_NAME_FLAG); 64 65 public static final StringSetting ProfileName = new StringSetting("Profile name", ProfileManager.PROFILE_NAME_FLAG); 66 61 67 public static final StringSetting StartFrame = new StringSetting("The frame to go to when Expeditee is started (defaults to the profile frame)", null); 62 68 … … 68 74 public boolean setSetting(Text text) { 69 75 String profileName = UserSettings.ProfileName.get(); 76 77 if (profileName == null) { profileName = Browser.getExpediteeUserProfileName(); } 78 else { 79 // Legacy case for if the order of the settings frame causes HomeFrame to be parsed before the UserName and ProfileName. 80 profileName = ResourceUtil.substitute(profileName, ProfileManager.PROFILE_NAME_FLAG, Browser.getExpediteeUserProfileName()); 81 } 82 70 83 if(text.getText().indexOf(':') == -1 || !text.hasLink()) { 71 84 //if (!profileName.equals(ProfileManager.USER_NAME_FLAG)) { 72 if (profileName != null) { 73 text.setLink(profileName + "1"); 74 } 85 text.setLink(profileName + "1"); 75 86 //text.setLink(FrameIO.LoadProfile(UserSettings.ProfileName.get()).getName()); 76 87 } … … 108 119 109 120 public static final IntegerSetting TitlePosition = new IntegerSetting("Position of title item in frame (TODO: find whether this is x-offset or y-offset)", "TitlePosition", 150); 110 111 public static final StringSetting UserName = new StringSetting("User name", ProfileManager.USER_NAME_FLAG); 112 113 // public static final StringSetting ProfileName = new StringSetting("Profile name", ProfileManager.USER_NAME_FLAG); // FrameIO.ConvertToValidFramesetName(System.getProperty("user.name")) 114 public static final StringSetting ProfileName = new StringSetting("Profile name", null); // FrameIO.ConvertToValidFramesetName(System.getProperty("user.name")) 115 121 116 122 public static final BooleanSetting AntiAlias = new BooleanSetting("Whether anti-aliasing should be enabled", "AntiAlias", false); 117 123
Note:
See TracChangeset
for help on using the changeset viewer.