Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 164:faf534be8ff0
[/trunk] Changeset 176 by mikael
* Add roster_free()
* Empty roster when disconnecting from the server / going offline
* Don't display buddies status when we're offline
* Fix a bug when the roster is empty and we try to send a message (commands.c)
author | mikael |
---|---|
date | Mon, 02 May 2005 20:31:01 +0000 |
parents | ba51d1737086 |
children | a6ac5498d254 |
comparison
equal
deleted
inserted
replaced
163:a8f7dc0a56cb | 164:faf534be8ff0 |
---|---|
565 char name[ROSTER_WIDTH]; | 565 char name[ROSTER_WIDTH]; |
566 int maxx, maxy; | 566 int maxx, maxy; |
567 GList *buddy; | 567 GList *buddy; |
568 int i, n; | 568 int i, n; |
569 int rOffset; | 569 int rOffset; |
570 enum imstatus currentstatus = jb_getstatus(); | |
570 | 571 |
571 // We can reset update_roster | 572 // We can reset update_roster |
572 update_roster = FALSE; | 573 update_roster = FALSE; |
573 | 574 |
574 getmaxyx(rosterWnd, maxy, maxx); | 575 getmaxyx(rosterWnd, maxy, maxx); |
626 if (ismsg && (!isgrp || ishid)) { | 627 if (ismsg && (!isgrp || ishid)) { |
627 pending = '#'; | 628 pending = '#'; |
628 } | 629 } |
629 | 630 |
630 budstate = buddy_getstatus(BUDDATA(buddy)); | 631 budstate = buddy_getstatus(BUDDATA(buddy)); |
631 if (budstate >= 0 && budstate < imstatus_size) | 632 if (budstate >= 0 && budstate < imstatus_size && currentstatus != offline) |
632 status = imstatus2char[budstate]; | 633 status = imstatus2char[budstate]; |
633 if (buddy == current_buddy) { | 634 if (buddy == current_buddy) { |
634 wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DESSEL)); | 635 wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DESSEL)); |
635 // The 3 following lines aim to color the whole line | 636 // The 3 following lines aim to color the whole line |
636 wmove(rosterWnd, i, 0); | 637 wmove(rosterWnd, i, 0); |