Re: [PATCH] Popup menu
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Feb 22, 2009, 12:57 UTC
- Message-ID
- <cb7bb73a0902220457y7e9b18c5ka30ca523318cc223@mail.gmail.com>
- In-Reply-To
- <2c6b72b30902220415q2d3cfa7dmd5fd584c89acbecc@mail.gmail.com>
On Sun, Feb 22, 2009 at 1:15 PM, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:
Show 14 quoted lines
> On Sun, Feb 22, 2009 at 12:40, Giuseppe Bilotta > <giuseppe.bilotta@gmail.com> wrote: >> Make the menu into a popup window that complements the status prompt. >> >> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> >> --- >> >> We should probably consider using the high-level menu and panel features from >> ncurses if we want to do anything more complex. > > First of all very cute. I take it as a comment that the menu thing I > added yesterday leaves a lot to be desired. :) I certainly agree it is > limited and would have liked to make it similar to Vim's horizontal > menu, but gave up when it got too complicated.
I wouldn't say your implementation left _a lot_ to be desired, but I found it to be somewhat uninformative on the available options, which is why I tried this route instead.
Show 5 quoted lines
> About using the menu, panel and maybe even the form library: Yes, it > might make sense but then again I had also hoped to maybe at some > point try to get tig running on just the terminfo interface. But I > don't know if there is any compelling reason for doing this anymore, > other than reducing the dependencies a bit.
If reducing dependencies means having to reimplement most of them from scratch, it might not be worth it so much ;-)
Show 5 quoted lines
> BTW, the code doesn't handle resizing or background loading (try > starting with `tig --stat` and immediately press 'o'). To fix this I > don't know if it would be better to "rip off" the status window and > use this as the menu window. It would require a few flags to make the > resize code do the right thing.
I was pretty sure resizing would bomb it, but I hadn't thought about background loading at all, I'll see if I can think about it a little.
> tig.c: In function 'menu_select': > tig.c:6629: warning: unused variable 'width' > tig.c:6628: warning: unused variable 'win'
Oops, leftovers, I'll clean them up.
-- Giuseppe "Oblomov" Bilotta