Merge "Omaha #3711 Allow configuration of how chat lines will display" into omaha_14.4.1

Former-commit-id: 190a85c872 [formerly f36afc27474267133b414d13951c271c5217f4dd]
Former-commit-id: 8ccb625dc4
This commit is contained in:
Nate Jensen 2014-10-10 14:45:54 -05:00 committed by Gerrit Code Review
commit 1efa1f1497
2 changed files with 13 additions and 2 deletions

View file

@ -45,6 +45,7 @@ import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants.HandleOpti
* Jan 14, 2014 2630 bclement added away on idle
* Jan 27, 2014 2700 bclement added auto accept subscribe
* Feb 3, 2014 2699 bclement added handle preferences
* Oct 9, 2014 3711 mapeters added chat lines preferences
*
* </pre>
*
@ -83,9 +84,15 @@ public class CollaborationPreferencePage extends FieldEditorPreferencePage
*/
@Override
protected void createFieldEditors() {
FieldEditor chatLines = new BooleanFieldEditor("chatLines",
"Display Chat Messages On Separate Line From Time And Name",
getFieldEditorParent());
this.addField(chatLines);
FieldEditor notifications = new BooleanFieldEditor("notifications",
"Show Notifications", getFieldEditorParent());
"Show Chat Notification Popups", getFieldEditorParent());
this.addField(notifications);
FieldEditor autojoinColl = new BooleanFieldEditor(
CollabPrefConstants.AUTO_JOIN, "Join Discussion On Login",
getFieldEditorParent());

View file

@ -93,6 +93,7 @@ import com.raytheon.viz.ui.views.CaveFloatingView;
* Mar 11, 2014 #2865 lvenable Added null checks for msgArchive.
* Jun 20, 2014 3281 bclement made sendErrorMessage() public
* Jun 27, 2014 3323 bclement fixed disposed font issue
* Oct 09, 2014 3711 mapeters Display chat text in accordance with preferences.
* </pre>
*
* @author rferrel
@ -358,8 +359,11 @@ public abstract class AbstractSessionView<T extends IUser> extends
sb.append("(").append(time).append(") ");
int offset = sb.length();
sb.append(name).append(": ").append(body);
boolean newLine = Activator.getDefault()
.getPreferenceStore().getBoolean("chatLines");
String displayPreference = newLine ? ("\n ") : (": ");
sb.append(name).append(displayPreference).append(body);
// here is the place to put the font and color changes for
// keywords
// read in localization file once and then don't read in again,