# HG changeset patch # User Mikael Berthe # Date 1269384081 -3600 # Node ID d13315366ba518352947ce2ace91b506faf76d87 # Parent 4694fad35ed8fe172cbabf76bd14b3fad824a7f9 Add scr_getlogwinheight() diff -r 4694fad35ed8 -r d13315366ba5 mcabber/mcabber/api.h --- a/mcabber/mcabber/api.h Tue Mar 23 16:47:18 2010 +0200 +++ b/mcabber/mcabber/api.h Tue Mar 23 23:41:21 2010 +0100 @@ -3,7 +3,7 @@ #include // For MCABBER_BRANCH -#define MCABBER_API_VERSION 11 +#define MCABBER_API_VERSION 12 #define MCABBER_API_MIN 11 extern const gchar *mcabber_branch; diff -r 4694fad35ed8 -r d13315366ba5 mcabber/mcabber/screen.c --- a/mcabber/mcabber/screen.c Tue Mar 23 16:47:18 2010 +0200 +++ b/mcabber/mcabber/screen.c Tue Mar 23 23:41:21 2010 +0100 @@ -869,6 +869,13 @@ return maxY - Log_Win_Height - 3; } +guint scr_getlogwinheight(void) +{ + if (Log_Win_Height >= 2) + return Log_Win_Height - 2; + return 0; +} + // scr_print_logwindow(string) // Display the string in the log window. // Note: The string must be in the user's locale! diff -r 4694fad35ed8 -r d13315366ba5 mcabber/mcabber/screen.h --- a/mcabber/mcabber/screen.h Tue Mar 23 16:47:18 2010 +0200 +++ b/mcabber/mcabber/screen.h Tue Mar 23 23:41:21 2010 +0100 @@ -125,6 +125,7 @@ guint scr_getprefixwidth(void); guint scr_gettextwidth(void); guint scr_gettextheight(void); +guint scr_getlogwinheight(void); void scr_line_prefix(hbb_line *line, char *prefix, guint preflen); void scr_beep(void);