Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 714:4bcd48f6ca5f
Display group name in the chat status line
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 04 Mar 2006 22:01:42 +0100 |
parents | b5aa7b7afee8 |
children | be9f6224c3ca |
comparison
equal
deleted
inserted
replaced
713:b5aa7b7afee8 | 714:4bcd48f6ca5f |
---|---|
724 const char *fullname; | 724 const char *fullname; |
725 const char *msg = NULL; | 725 const char *msg = NULL; |
726 char status; | 726 char status; |
727 char *buf; | 727 char *buf; |
728 | 728 |
729 fullname = buddy_getname(BUDDATA(current_buddy)); | |
729 btype = buddy_gettype(BUDDATA(current_buddy)); | 730 btype = buddy_gettype(BUDDATA(current_buddy)); |
730 | 731 |
731 isgrp = btype & ROSTER_TYPE_GROUP; | 732 isgrp = btype & ROSTER_TYPE_GROUP; |
732 ismuc = btype & ROSTER_TYPE_ROOM; | 733 ismuc = btype & ROSTER_TYPE_ROOM; |
733 | 734 |
734 // Clear the line | 735 // Clear the line |
735 werase(chatstatusWnd); | 736 werase(chatstatusWnd); |
736 | 737 |
737 if (isgrp) return; | 738 if (isgrp) { |
739 mvwprintw(chatstatusWnd, 0, 5, "Group: %s", fullname); | |
740 return; | |
741 } | |
738 | 742 |
739 status = '?'; | 743 status = '?'; |
740 | 744 |
741 if (ismuc) { | 745 if (ismuc) { |
742 if (buddy_getinsideroom(BUDDATA(current_buddy))) | 746 if (buddy_getinsideroom(BUDDATA(current_buddy))) |
747 enum imstatus budstate; | 751 enum imstatus budstate; |
748 budstate = buddy_getstatus(BUDDATA(current_buddy), NULL); | 752 budstate = buddy_getstatus(BUDDATA(current_buddy), NULL); |
749 if (budstate >= 0 && budstate < imstatus_size) | 753 if (budstate >= 0 && budstate < imstatus_size) |
750 status = imstatus2char[budstate]; | 754 status = imstatus2char[budstate]; |
751 } | 755 } |
752 | |
753 fullname = buddy_getname(BUDDATA(current_buddy)); | |
754 | 756 |
755 // No status message for groups & MUC rooms | 757 // No status message for groups & MUC rooms |
756 if (!isgrp && !ismuc) { | 758 if (!isgrp && !ismuc) { |
757 GSList *resources = buddy_getresources(BUDDATA(current_buddy)); | 759 GSList *resources = buddy_getresources(BUDDATA(current_buddy)); |
758 if (resources) | 760 if (resources) |