Mercurial > pidgin.yaz
diff console/gntblist.c @ 13885:582aaa4e287e
[gaim-migrate @ 16365]
Add ui for conversation. It 'works', but it's broken. So don't use it just yet.
I probably will not be able to touch it in the next couple of days. So feel
free to fix the brokenness :)
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 28 Jun 2006 05:52:23 +0000 |
parents | eac18261c6f0 |
children | a621329e8c85 |
line wrap: on
line diff
--- a/console/gntblist.c Wed Jun 28 01:46:41 2006 +0000 +++ b/console/gntblist.c Wed Jun 28 05:52:23 2006 +0000 @@ -179,6 +179,8 @@ { GaimChat *chat = (GaimChat*)node; name = gaim_chat_get_name(chat); + + strncpy(status, "~", sizeof(status) - 1); } snprintf(text, sizeof(text) - 1, "%s %s", status, name); @@ -363,6 +365,25 @@ return TRUE; } } + else if (text[0] == '\r' && text[1] == '\0') + { + GntTree *tree = GNT_TREE(ggblist->tree); + GaimBlistNode *node = gnt_tree_get_selection_data(tree); + + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimBuddy *buddy = (GaimBuddy *)node; + gaim_conversation_new(GAIM_CONV_TYPE_IM, + gaim_buddy_get_account(buddy), + gaim_buddy_get_name(buddy)); + } + else if (GAIM_BLIST_NODE_IS_CHAT(node)) + { + GaimChat *chat = (GaimChat*)node; + serv_join_chat(chat->account->gc, chat->components); + } + } + return FALSE; }