Mercurial > hg
comparison mcabber/src/screen.c @ 104:fe7257d251ac
[/trunk] Changeset 118 by mikael
* Commands are ready. Callback system in place.
* Implement /roster callback :)
* Completion is case-insensitive (good idea??)
author | mikael |
---|---|
date | Thu, 21 Apr 2005 20:22:35 +0000 |
parents | 93dcc4e15d4a |
children | 91d3ec21c24e |
comparison
equal
deleted
inserted
replaced
103:93dcc4e15d4a | 104:fe7257d251ac |
---|---|
533 WINDOW *scr_GetInputWindow(void) | 533 WINDOW *scr_GetInputWindow(void) |
534 { | 534 { |
535 return inputWnd; | 535 return inputWnd; |
536 } | 536 } |
537 | 537 |
538 void scr_RosterTop() | |
539 { | |
540 current_buddy = buddylist; | |
541 // XXX We should rebuild the buddylist but perhaps not everytime? | |
542 if (chatmode) | |
543 scr_ShowBuddyWindow(); | |
544 } | |
545 | |
546 void scr_RosterBottom() | |
547 { | |
548 current_buddy = g_list_last(buddylist); | |
549 // XXX We should rebuild the buddylist but perhaps not everytime? | |
550 if (chatmode) | |
551 scr_ShowBuddyWindow(); | |
552 } | |
553 | |
538 void scr_RosterUp() | 554 void scr_RosterUp() |
539 { | 555 { |
540 if (current_buddy) { | 556 if (current_buddy) { |
541 if (g_list_previous(current_buddy)) { | 557 if (g_list_previous(current_buddy)) { |
542 current_buddy = g_list_previous(current_buddy); | 558 current_buddy = g_list_previous(current_buddy); |
543 scr_DrawRoster(); | 559 scr_DrawRoster(); |
544 } | 560 } |
545 } | 561 } |
546 // XXX We should rebuild the buddylist but perhaps not everytime? | 562 // XXX We should rebuild the buddylist but perhaps not everytime? |
563 | |
564 if (chatmode) | |
565 scr_ShowBuddyWindow(); | |
547 } | 566 } |
548 | 567 |
549 void scr_RosterDown() | 568 void scr_RosterDown() |
550 { | 569 { |
551 if (current_buddy) { | 570 if (current_buddy) { |
553 current_buddy = g_list_next(current_buddy); | 572 current_buddy = g_list_next(current_buddy); |
554 scr_DrawRoster(); | 573 scr_DrawRoster(); |
555 } | 574 } |
556 } | 575 } |
557 // XXX We should rebuild the buddylist but perhaps not everytime? | 576 // XXX We should rebuild the buddylist but perhaps not everytime? |
577 | |
578 if (chatmode) | |
579 scr_ShowBuddyWindow(); | |
558 } | 580 } |
559 | 581 |
560 // scr_LogPrint(...) | 582 // scr_LogPrint(...) |
561 // Display a message in the log window. | 583 // Display a message in the log window. |
562 void scr_LogPrint(const char *fmt, ...) | 584 void scr_LogPrint(const char *fmt, ...) |
785 *ptr_inputline = 0; | 807 *ptr_inputline = 0; |
786 inputline_offset = 0; | 808 inputline_offset = 0; |
787 break; | 809 break; |
788 case KEY_UP: | 810 case KEY_UP: |
789 scr_RosterUp(); | 811 scr_RosterUp(); |
790 if (chatmode) | |
791 scr_ShowBuddyWindow(); | |
792 break; | 812 break; |
793 case KEY_DOWN: | 813 case KEY_DOWN: |
794 scr_RosterDown(); | 814 scr_RosterDown(); |
795 if (chatmode) | |
796 scr_ShowBuddyWindow(); | |
797 break; | 815 break; |
798 case KEY_PPAGE: | 816 case KEY_PPAGE: |
799 scr_LogPrint("PageUp??"); | 817 scr_LogPrint("PageUp??"); |
800 break; | 818 break; |
801 case KEY_NPAGE: | 819 case KEY_NPAGE: |