[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: [kopete-devel] Re: [PATCH] Decouple tabs from the ChatView class
From: Richard Smith <kde () metafoo ! co ! uk>
Date: 2005-06-06 19:38:58
Message-ID: 200506062038.59012.kde () metafoo ! co ! uk
[Download RAW message or body]
On Monday 06 June 2005 02:36, Duncan Mac-Vicar P. wrote:
> On Sunday 05 June 2005 18:03, Richard Smith wrote:
> > I'll give it some thought. I think Matt's right, and the tab bar
> > implementation details belong to KopeteChatWindow, not to ChatView.
>
> yes, that is straightforward, the problem is, how do you abstract the tabs
> in the chatview for the coloring issue.
> Probably the ChatView could emit some signals like "typing" "newmessage"
> and the chatwindow change color tabs on that. That is completely decoupled.
There's a fundamental rule: two interacting components can never be completely
decoupled from each other. Either you make them not interact with each other
directly, or you make at least one of them (and ideally only one of them)
make assumptions about the other. Where and how you make the split, and where
you put the knowledge depends primarily on the direction you see the code
changing in. Here, KopeteChatWindow currently knows that it's embedding
ChatViews into itself, and I can't really imagine that changing any time
soon, so it makes some sense for it to know a bit about the interface of
ChatView.
Therefore, we probably want to remove knowledge about KopeteChatWindow from
ChatView, and an easy way to do that is for ChatView to emit signals at
whatever times make sense for it, and for KopeteChatWindow to connect to
those, and interpret them in a way which allows it to colour the tabs
correctly, or to signal to KWin that it wants attention, or to close the tab,
or whatever it deems most appropriate.
In short: yes, ChatView can emit some signals. But it should emit the signals
that make sense from the context of ChatView, not the signals that make sense
from the context of KopeteChatWindow. What, not how. 'typing', not
'colourTheTabBlue'.
--
Thanks,
Richard
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic