# HG changeset patch # User Mikael Berthe # Date 1300103415 -3600 # Node ID 13d18777a6297e4e32e0dbc551a2d0997564d79e # Parent e8cebf5fd36cfbb19c1a743b905329abd76d2e07 Add scr_buffer_readmark() diff -r e8cebf5fd36c -r 13d18777a629 mcabber/mcabber/screen.c --- a/mcabber/mcabber/screen.c Mon Mar 14 12:48:15 2011 +0100 +++ b/mcabber/mcabber/screen.c Mon Mar 14 12:50:15 2011 +0100 @@ -2800,6 +2800,22 @@ update_panels(); } +void scr_buffer_readmark(gboolean action) +{ + winbuf *win_entry; + guint isspe; + + // Get win_entry + if (!current_buddy) return; + isspe = buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_SPECIAL; + if (isspe) return; // Maybe not necessary + win_entry = scr_search_window(CURRENT_JID, isspe); + if (!win_entry) return; + + hbuf_set_readmark(win_entry->bd->hbuf, action); +} + + // scr_buffer_top_bottom() // Jump to the head/tail of the current buddy window // (top if topbottom == -1, bottom topbottom == 1) diff -r e8cebf5fd36c -r 13d18777a629 mcabber/mcabber/screen.h --- a/mcabber/mcabber/screen.h Mon Mar 14 12:48:15 2011 +0100 +++ b/mcabber/mcabber/screen.h Mon Mar 14 12:50:15 2011 +0100 @@ -155,6 +155,7 @@ void scr_buffer_dump(const char *file); void scr_buffer_list(void); void scr_buffer_scroll_up_down(int updown, unsigned int nblines); +void scr_buffer_readmark(gboolean action); bool scr_roster_color(const char *status, const char *wildcard, const char *color);