Re: [PATCH 0 of 8] Change Mutt to use window structures for screen drawing

2016-04-19 Thread Kevin J. McCarthy
On Tue, Apr 19, 2016 at 09:22:34PM +0100, Richard Russon wrote: > Well done. It's an impressive start. Thanks, I have a few more patches to go, and after that the metrics should be much lower. > Can you put the changes into a public repo that people can fork? Right now, I'm still iterating the

Re: [PATCH 0 of 8] Change Mutt to use window structures for screen drawing

2016-04-19 Thread Richard Russon
Hi Kevin, > I am still in the middle of making these changes Well done. It's an impressive start. Here's a very reassuring metric. Count of uses of ncurses global variables: $ find . -name '*.[ch]' | xargs grep -who -e COLS -e LINES | wc -l Before: 119 After: 57 Can you put the changes int

Re: [PATCH 8 of 8] Modify the built-in editor to use windows.

2016-04-19 Thread Kevin J. McCarthy
This only involved changing to use the MuttMessageWindow. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA http://www.8t8.us/configs/gpg-key-transition-statement.txt # HG changeset patch # User Kevin McCarthy # Date 1461089995 25200 # Tue Apr 19 11:19

Re: [PATCH 7 of 8] Modify the compose screen to use windows.

2016-04-19 Thread Kevin J. McCarthy
The header field positions enum is now started at 0: the windows compute the relative positioning as needed. A small improvement from this is that the headers now align with the top: there isn't a gap if $help is turned off. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 AD

Re: [PATCH 6 of 8] Modify the pager to use windows.

2016-04-19 Thread Kevin J. McCarthy
The pager view is somewhat complex, due to the "mini-index" and the positioning of the index_status vs pager_status changes depending on $status_on_top as well as $pager_index_lines and $help. To make things simpler, it creates four "pager windows": index_status_window, index_window, pager_status_

Re: [PATCH 5 of 8] Modify the index to use windows.

2016-04-19 Thread Kevin J. McCarthy
Change the index screen to use MuttIndexWindow and MuttStatusWindow. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA http://www.8t8.us/configs/gpg-key-transition-statement.txt # HG changeset patch # User Kevin McCarthy # Date 1461089300 25200 # Tue A

Re: [PATCH 4 of 8] Modify enter.c routines to use windows.

2016-04-19 Thread Kevin J. McCarthy
This modifies the mutt_enter_string() functions to use MuttMessageWindow. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA http://www.8t8.us/configs/gpg-key-transition-statement.txt # HG changeset patch # User Kevin McCarthy # Date 1461089224 25200 #

Re: [PATCH 3 of 8] Modify the curs_lib.c to use windows.

2016-04-19 Thread Kevin J. McCarthy
This changes some of the "prompting" routines to use the MuttMessageWindow. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA http://www.8t8.us/configs/gpg-key-transition-statement.txt # HG changeset patch # User Kevin McCarthy # Date 1461088983 25200 #

Re: [PATCH 2 of 8] Modify the menu code to use windows.

2016-04-19 Thread Kevin J. McCarthy
Change menu.c to use the mutt_window_t structures and functions. The index/stats/help/message window pointers are stored inside the menu_t. This is useful for the pager, where the "index" we want to use is a mini-index. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 76

Re: [PATCH 1 of 8] Add window structures to use for screen layout.

2016-04-19 Thread Kevin J. McCarthy
This is a series of 8+ patches, centralizing Mutt screen drawing inside windows (mutt_window_t structures). Currently, the screen drawing and cursor positioning logic is distributed all over the code, resulting in many files having the same logic of where the help, status, message windows are. Ad

[PATCH 0 of 8] Change Mutt to use window structures for screen drawing

2016-04-19 Thread Kevin J. McCarthy
I am still in the middle of making these changes, but I wanted to send what I had to the list right now for any comments. This weekend, I'll add 2 or 3 more patches for the last few changes and add them to this thread. It's a lot of patches, but that's because I've tried to keep each patch small.