From 59fbad181c80f98c2af511a16ad8815cfb23f885 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 8 Nov 2002 07:28:23 +0000 Subject: [PATCH] the 'force' argument to ChatDisplay.clear() is now implied. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1927 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../crowd/chat/client/ChatDirector.java | 18 ++++-------------- .../crowd/chat/client/ChatDisplay.java | 6 ++---- .../threerings/micasa/client/ChatPanel.java | 7 +++---- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index 594b1f089..53b10141a 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -1,5 +1,5 @@ // -// $Id: ChatDirector.java,v 1.38 2002/11/04 20:06:15 ray Exp $ +// $Id: ChatDirector.java,v 1.39 2002/11/08 07:28:23 ray Exp $ package com.threerings.crowd.chat; @@ -191,19 +191,9 @@ public class ChatDirector extends BasicDirector * Requests that all chat displays clear their contents. */ public void clearDisplays () - { - clearDisplays(false); - } - - /** - * Request that all chat displays clear their contents. - * - * @param force if false, a display may choose to ignore the clear. - */ - protected void clearDisplays (boolean force) { for (int ii=0, nn=_displays.size(); ii < nn; ii++) { - ((ChatDisplay) _displays.get(ii)).clear(force); + ((ChatDisplay) _displays.get(ii)).clear(); } } @@ -580,7 +570,7 @@ public class ChatDirector extends BasicDirector { super.clientObjectDidChange(client); - clearDisplays(true); + clearDisplays(); } // documentation inherited @@ -588,7 +578,7 @@ public class ChatDirector extends BasicDirector { super.clientDidLogoff(client); - clearDisplays(true); + clearDisplays(); // clear out the list of people we've chatted with _chatters.clear(); diff --git a/src/java/com/threerings/crowd/chat/client/ChatDisplay.java b/src/java/com/threerings/crowd/chat/client/ChatDisplay.java index 79c8e0688..a7287c872 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDisplay.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDisplay.java @@ -1,5 +1,5 @@ // -// $Id: ChatDisplay.java,v 1.15 2002/10/27 22:33:42 ray Exp $ +// $Id: ChatDisplay.java,v 1.16 2002/11/08 07:28:23 ray Exp $ package com.threerings.crowd.chat; @@ -12,10 +12,8 @@ public interface ChatDisplay { /** * Called to clear the chat display. - * - * @param force if false, the ChatDisplay can choose to ignore the clear. */ - public void clear (boolean force); + public void clear (); /** * Called to display a chat message. diff --git a/src/java/com/threerings/micasa/client/ChatPanel.java b/src/java/com/threerings/micasa/client/ChatPanel.java index f64413d21..2fca8124c 100644 --- a/src/java/com/threerings/micasa/client/ChatPanel.java +++ b/src/java/com/threerings/micasa/client/ChatPanel.java @@ -1,5 +1,5 @@ // -// $Id: ChatPanel.java,v 1.21 2002/10/27 22:34:43 ray Exp $ +// $Id: ChatPanel.java,v 1.22 2002/11/08 07:28:23 ray Exp $ package com.threerings.micasa.client; @@ -209,7 +209,7 @@ public class ChatPanel } else if (text.startsWith("/clear")) { // clear the chat box - _text.setText(""); + _chatdtr.clearDisplays(); } else { // request to send this text as a chat message @@ -221,9 +221,8 @@ public class ChatPanel } // documentation inherited from interface ChatDisplay - public void clear (boolean force) + public void clear () { - // we go ahead and always clear.. _text.setText(""); }