comparison mcabber/src/screen.c @ 187:4ce9ff808baa

[/trunk] Changeset 199 by mikael * Add the "/buffer" command (/buffer clear, /buffer top, /buffer bottom)
author mikael
date Fri, 06 May 2005 09:35:40 +0000
parents e8e447a07641
children 4f3975f1b852
comparison
equal deleted inserted replaced
186:888ad9f15346 187:4ce9ff808baa
920 // Finished :) 920 // Finished :)
921 update_panels(); 921 update_panels();
922 doupdate(); 922 doupdate();
923 } 923 }
924 924
925 // scr_BufferTop()
926 // Jump to the head of the current buddy window
927 void scr_BufferTop(void)
928 {
929 const gchar *jid;
930 window_entry_t *win_entry;
931
932 // Get win_entry
933 if (!current_buddy) return;
934 jid = CURRENT_JID;
935 if (!jid) return;
936 win_entry = scr_SearchWindow(jid);
937
938 if (!win_entry) return;
939
940 win_entry->cleared = FALSE;
941 win_entry->top = g_list_first(win_entry->hbuf);
942
943 // Refresh the window
944 scr_UpdateWindow(win_entry);
945
946 // Finished :)
947 update_panels();
948 doupdate();
949 }
950
951 // scr_BufferBottom()
952 // Jump to the end of the current buddy window
953 void scr_BufferBottom(void)
954 {
955 const gchar *jid;
956 window_entry_t *win_entry;
957
958 // Get win_entry
959 if (!current_buddy) return;
960 jid = CURRENT_JID;
961 if (!jid) return;
962 win_entry = scr_SearchWindow(jid);
963
964 if (!win_entry) return;
965
966 win_entry->cleared = FALSE;
967 win_entry->top = NULL;
968
969 // Refresh the window
970 scr_UpdateWindow(win_entry);
971
972 // Finished :)
973 update_panels();
974 doupdate();
975 }
976
925 // scr_LogPrint(...) 977 // scr_LogPrint(...)
926 // Display a message in the log window. 978 // Display a message in the log window.
927 void scr_LogPrint(const char *fmt, ...) 979 void scr_LogPrint(const char *fmt, ...)
928 { 980 {
929 time_t timestamp; 981 time_t timestamp;