[2809] in BarnOwl Developers

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

Re: [PATCH] Show how far you are in a long message

daemon@ATHENA.MIT.EDU (David A Benjamin)
Fri Nov 26 04:15:23 2010

Date: Fri, 26 Nov 2010 04:15:20 -0500 (EST)
From: David A Benjamin <davidben@MIT.EDU>
To: Jason Gross <jgross@mit.edu>
cc: barnowl-dev@mit.edu
In-Reply-To: <1290620288-27301-1-git-send-email-jgross@mit.edu>

Finally got around to playing with this... The dashes look somewhat odd. 
Maybe a colon would be better? More of a nuisance is that when you scroll 
off a message to the point that it isn't truncated, the number disappears. 
Perhaps the logic should be scrolled or truncated? Although, that feels 
kinda odd. Though perhaps what's actually odd is this separation of 
scroll through a message and scroll through a line; maybe messages should 
just be continuous.

Right now we have this weird thing here, especially given the scrolled || 
truncated logic, if you've scrolled off a message to the point that it is 
no longer truncated at the bottom, it shouldn't matter whether or not the 
stuff at the top you've truncated happens to be long enough that the 
message doesn't fit in the screen. Nevertheless, you can only get into 
such a state if this is true.

David

On Wed, 24 Nov 2010, Jason Gross wrote:

> Addresses most of ticket #119 - it show's how far you are in a long
> message, but not in a message that you're typing.  The display style
> I've somewhat arbitrarily chosen is to replace <truncated> with
> <truncated -- $num_lines_through/$total_lines>.
> ---
> sepbar.c |    5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sepbar.c b/sepbar.c
> index f0ff246..020e63a 100644
> --- a/sepbar.c
> +++ b/sepbar.c
> @@ -15,6 +15,7 @@ static void sepbar_redraw(owl_window *w, WINDOW *sepwin, void *user_data)
>   const owl_view *v;
>   int x, y, i;
>   const char *foo, *appendtosepbar;
> +  int cur_numlines, cur_totallines;
>
>   ml=owl_global_get_msglist(&g);
>   v=owl_global_get_current_view(&g);
> @@ -53,7 +54,9 @@ static void sepbar_redraw(owl_window *w, WINDOW *sepwin, void *user_data)
>     getyx(sepwin, y, x);
>     wmove(sepwin, y, x+2);
>     wattron(sepwin, A_BOLD);
> -    waddstr(sepwin, " <truncated> ");
> +    cur_numlines = owl_global_get_curmsg_vert_offset(&g) + 1;
> +    cur_totallines = owl_message_get_numlines(owl_view_get_element(v, owl_global_get_curmsg(&g)));
> +    wprintw(sepwin, " <truncated -- %d/%d> ", cur_numlines, cur_totallines);
>     wattroff(sepwin, A_BOLD);
>   }
>
> -- 
> 1.7.1
>
>

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