[1168] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r1116 - trunk/owl

daemon@ATHENA.MIT.EDU (geofft@MIT.EDU)
Thu Oct 29 18:13:43 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
Date: Fri, 22 Aug 2008 21:48:20 -0400 (EDT)
To: dirty-owl-hackers@mit.edu
From: geofft@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU

Author: geofft
Date: 2008-08-22 21:48:20 -0400 (Fri, 22 Aug 2008)
New Revision: 1116

Modified:
   trunk/owl/global.c
   trunk/owl/variable.c
Log:
At broder/ccpost's suggestion, add a typewindelta variable that lets you
expand the typewin on small screens when it is active, and keep it small by
default.


Modified: trunk/owl/global.c
===================================================================
--- trunk/owl/global.c	2008-08-22 16:22:37 UTC (rev 1115)
+++ trunk/owl/global.c	2008-08-23 01:48:20 UTC (rev 1116)
@@ -309,10 +309,18 @@
 }
 
 void owl_global_set_typwin_active(owl_global *g) {
+  int d = owl_global_get_typewindelta(g);
+  if (d > 0)
+      owl_function_resize_typwin(owl_global_get_typwin_lines(g) + d);
+
   g->typwinactive=1;
 }
 
 void owl_global_set_typwin_inactive(owl_global *g) {
+  int d = owl_global_get_typewindelta(g);
+  if (d > 0)
+      owl_function_resize_typwin(owl_global_get_typwin_lines(g) - d);
+
   g->typwinactive=0;
 }
 

Modified: trunk/owl/variable.c
===================================================================
--- trunk/owl/variable.c	2008-08-22 16:22:37 UTC (rev 1115)
+++ trunk/owl/variable.c	2008-08-23 01:48:20 UTC (rev 1116)
@@ -312,6 +312,16 @@
 		   NULL /* use default for get */
 		   ),
 
+  OWLVAR_INT( "typewindelta" /* %OwlVarStub */, 0,
+		  "number of lines to add to the typing window when in use",
+		   "On small screens you may want the typing window to\n"
+		   "auto-hide when not entering a command or message.\n"
+		   "This variable is the number of lines to add to the\n"
+           "typing window when it is in use; you can then set\n"
+           "typewinsize to 1.\n\n"
+           "This works a lot better with a non-default scrollmode;\n"
+           "try :set scrollmode pagedcenter.\n"),
+
   OWLVAR_ENUM( "scrollmode" /* %OwlVarStub */, OWL_SCROLLMODE_NORMAL,
 	       "how to scroll up and down",
 	       "This controls how the screen is scrolled as the\n"


home help back first fref pref prev next nref lref last post