changeset 1949:13d18777a629

Add scr_buffer_readmark()
author Mikael Berthe <mikael@lilotux.net>
date Mon, 14 Mar 2011 12:50:15 +0100
parents e8cebf5fd36c
children aec86670047b
files mcabber/mcabber/screen.c mcabber/mcabber/screen.h
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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);