comparison mcabber/src/screen.c @ 1227:79c396678f1b

Make buffer list display the number of allocated HBB blocks
author Mikael Berthe <mikael@lilotux.net>
date Sat, 19 May 2007 12:18:25 +0200
parents 2521efbf3b72
children 9a68fe4515dc
comparison
equal deleted inserted replaced
1226:2521efbf3b72 1227:79c396678f1b
2130 // key: winId/jid 2130 // key: winId/jid
2131 // value: winbuf structure 2131 // value: winbuf structure
2132 // data: none. 2132 // data: none.
2133 static void buffer_list(gpointer key, gpointer value, gpointer data) 2133 static void buffer_list(gpointer key, gpointer value, gpointer data)
2134 { 2134 {
2135 GList *head;
2135 winbuf *win_entry = value; 2136 winbuf *win_entry = value;
2136 scr_LogPrint(LPRINT_NORMAL, " %s (%ld)", key, 2137
2137 g_list_length(g_list_first(win_entry->bd->hbuf))); 2138 head = g_list_first(win_entry->bd->hbuf);
2139
2140 scr_LogPrint(LPRINT_NORMAL, " %s (%u/%u)", key,
2141 g_list_length(head), hbuf_get_blocks_number(head));
2138 } 2142 }
2139 2143
2140 void scr_BufferList(void) 2144 void scr_BufferList(void)
2141 { 2145 {
2142 scr_LogPrint(LPRINT_NORMAL, "Buffer list:"); 2146 scr_LogPrint(LPRINT_NORMAL, "Buffer list:");
2143 scr_LogPrint(LPRINT_NORMAL, " [status] (%ld)", 2147 buffer_list("[status]", statusWindow, NULL);
2144 g_list_length(g_list_first(statusWindow->bd->hbuf)));
2145 g_hash_table_foreach(winbufhash, buffer_list, NULL); 2148 g_hash_table_foreach(winbufhash, buffer_list, NULL);
2146 scr_LogPrint(LPRINT_NORMAL, "End of buffer list."); 2149 scr_LogPrint(LPRINT_NORMAL, "End of buffer list.");
2147 } 2150 }
2148 #endif 2151 #endif
2149 2152