[sip-comm-dev] [PATCH] Added methods to get Chat´s and MetaContact from a Chat


#1

Hello

I have added two new methods to the UIService:

public java.util.List<Chat> getChats();
public MetaContact getMetaContact(Chat chat);

and one method to ChatWindowManager:
public List<ChatPanel> getChatPanels()

getChats returns a list of all currently open chats by using the ChatPanels
returned by ChatWindowManager.getChatPanels().

getMetaContact returns the meta contact from a Chat if it is a one on one
chat. Otherwise it returns null

pub avalible chats.txt (13.3 KB)

···

**
getChatPanels returns a list of active ChatPanels directly from
ChatWindowManager.

This is required in my gsoc project geek-communicator in order to list open
chats and close them (two seperate features).

I could find no other way to get the currently open chats nor a way to alter
them. I have discussed this with Emil and this seems to be the best way.

Have a nice day!
Linus


#2

Hi Linus,

Nice work! Patch was very clear and is already committed and ack-ed.

I hope you don't mind, I've just renamed one of the methods from getMetaContact to getChatContact, which seems a little clearer for me. Hope this doesn't make a lot of modifications for you.

By the way, I remember that some time ago we had a chat off-list and you said you have found some bugs in the ChatWindowManager. Most of them were related to how we manage single and multiple chat windows. If you have resolved also any of them, don't hesitate to send us a patch:)

Thanks again!
Yana

···

On Aug 1, 2009, at 2:31 AM, Linus wrote:

Hello

I have added two new methods to the UIService:

public java.util.List<Chat> getChats();
public MetaContact getMetaContact(Chat chat);

and one method to ChatWindowManager:
public List<ChatPanel> getChatPanels()

getChats returns a list of all currently open chats by using the ChatPanels returned by ChatWindowManager.getChatPanels().

getMetaContact returns the meta contact from a Chat if it is a one on one chat. Otherwise it returns null

getChatPanels returns a list of active ChatPanels directly from ChatWindowManager.

This is required in my gsoc project geek-communicator in order to list open chats and close them (two seperate features).

I could find no other way to get the currently open chats nor a way to alter them. I have discussed this with Emil and this seems to be the best way.

Have a nice day!
Linus
<pub avalible chats.txt>---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hello again,

Hi Linus,

Nice work! Patch was very clear and is already committed and ack-ed.

I hope you don't mind, I've just renamed one of the methods from
getMetaContact to getChatContact, which seems a little clearer for me. Hope
this doesn't make a lot of modifications for you.

No worries, just a simple refactor :slight_smile:

By the way, I remember that some time ago we had a chat off-list and you
said you have found some bugs in the ChatWindowManager. Most of them were
related to how we manage single and multiple chat windows. If you have
resolved also any of them, don't hesitate to send us a patch:)

I have not looked futher into that bug, if I'm able to fix it I will ofc
send a patch :slight_smile:

Thanks again!
Yana

Thank you :slight_smile:
Linus

···

2009/8/1 Yana Stamcheva <yana@sip-communicator.org>

On Aug 1, 2009, at 2:31 AM, Linus wrote:

  Hello

I have added two new methods to the UIService:

public java.util.List<Chat> getChats();
public MetaContact getMetaContact(Chat chat);

and one method to ChatWindowManager:
public List<ChatPanel> getChatPanels()

getChats returns a list of all currently open chats by using the
ChatPanels returned by ChatWindowManager.getChatPanels().

getMetaContact returns the meta contact from a Chat if it is a one on one
chat. Otherwise it returns null

getChatPanels returns a list of active ChatPanels directly from
ChatWindowManager.

This is required in my gsoc project geek-communicator in order to list
open chats and close them (two seperate features).

I could find no other way to get the currently open chats nor a way to
alter them. I have discussed this with Emil and this seems to be the best
way.

Have a nice day!
Linus
<pub avalible
chats.txt>---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net