Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-08-06 21:37:28 +0000
committerslewis2007-08-06 21:37:28 +0000
commit14f97ee42c019adc699adde94df706065e04841d (patch)
tree4a43303b7be794600a92f3ef8d8b69ce2b44f378 /framework/bundles/org.eclipse.ecf.presence.ui
parent9733520c17132c2352e7ffdf7ac2e215c35bbf8a (diff)
downloadorg.eclipse.ecf-14f97ee42c019adc699adde94df706065e04841d.tar.gz
org.eclipse.ecf-14f97ee42c019adc699adde94df706065e04841d.tar.xz
org.eclipse.ecf-14f97ee42c019adc699adde94df706065e04841d.zip
Simplified rules for scrolling on tabs that are not being displayed.
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.presence.ui')
-rw-r--r--framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java b/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java
index 68e1dbc6e..3132f6c65 100644
--- a/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java
+++ b/framework/bundles/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java
@@ -1396,6 +1396,8 @@ public class ChatRoomManagerView extends ViewPart implements
return;
}
+ boolean isAtEnd = !isLastOutputInvisible(st);
+
String originator = null;
if (text.getOriginator() != null) {
originator = text.getOriginator().getNickname();
@@ -1425,13 +1427,14 @@ public class ChatRoomManagerView extends ViewPart implements
st.setStyleRange(ranges[i]);
}
}
- // If we are not the currently active tab, then bold the tab
- // item so that user can see that they received something
- if (!isCurrentlyActive(chatRoomTab) || isLastOutputInvisible(st)) chatRoomTab.makeTabItemBold();
- else chatRoomTab.makeTabItemNormal();
- // In either case, if the last output is visible, then scroll to end
- if (!isLastOutputInvisible(st)) scrollToEnd(st);
+ if (isCurrentlyActive(chatRoomTab)) {
+ scrollToEnd(st);
+ chatRoomTab.makeTabItemNormal();
+ } else {
+ if (isAtEnd) scrollToEnd(st);
+ chatRoomTab.makeTabItemBold();
+ }
}
protected void outputClear() {

Back to the top