comparison mcabber/src/screen.c @ 866:b30df2ab457f

Add "/buffer purge"
author Mikael Berthe <mikael@lilotux.net>
date Wed, 24 May 2006 22:29:05 +0200
parents cee8d6be04e1
children ee39f6d94d43
comparison
equal deleted inserted replaced
865:cee8d6be04e1 866:b30df2ab457f
1521 // Finished :) 1521 // Finished :)
1522 update_panels(); 1522 update_panels();
1523 doupdate(); 1523 doupdate();
1524 } 1524 }
1525 1525
1526 // scr_BufferPurge()
1527 // Purge/Drop the current buddy buffer
1528 void scr_BufferPurge(void)
1529 {
1530 winbuf *win_entry;
1531 guint isspe;
1532
1533 // Get win_entry
1534 if (!current_buddy) return;
1535 isspe = buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_SPECIAL;
1536 win_entry = scr_SearchWindow(CURRENT_JID, isspe);
1537 if (!win_entry) return;
1538
1539 // Delete the current hbuf
1540 hbuf_free(&win_entry->hbuf);
1541 if (isspe) {
1542 // Currently it can only be the status buffer
1543 statushbuf = NULL;
1544 }
1545
1546 win_entry->cleared = FALSE;
1547 win_entry->top = NULL;
1548
1549 // Refresh the window
1550 scr_UpdateBuddyWindow();
1551
1552 // Finished :)
1553 update_panels();
1554 doupdate();
1555 }
1556
1526 // scr_BufferTopBottom() 1557 // scr_BufferTopBottom()
1527 // Jump to the head/tail of the current buddy window 1558 // Jump to the head/tail of the current buddy window
1528 // (top if topbottom == -1, bottom topbottom == 1) 1559 // (top if topbottom == -1, bottom topbottom == 1)
1529 void scr_BufferTopBottom(int topbottom) 1560 void scr_BufferTopBottom(int topbottom)
1530 { 1561 {