{"thread":{"id":"17948","subject":"[tig PATCH v2 0/2] popup menu","startedAt":"2009-02-22T14:09:36Z","lastAt":"2009-02-25T22:56:27Z","messageCount":6,"participants":["Giuseppe Bilotta","Jonas Fonseca"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"105768","messageId":"1235311778-11112-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17948","inReplyTo":null,"subject":"[tig PATCH v2 0/2] popup menu","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-22T14:09:36Z","receivedAt":"2009-02-22T14:09:36Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Second version, in two patches. The first one is just the same as\nprevious one, minus a couple of leftovers.\n\nThe second one reimplements the menu drawing routine so that it can be\ncalled when necessary to redraw the menu entirely, e.g. after a resize\nor when background loading finishes.\n\nGiuseppe Bilotta (2):\n  Popup menu\n  Popup menu: redraw as needed\n\n tig.c |  149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-\n 1 files changed, 147 insertions(+), 2 deletions(-)\n"},{"id":"105770","messageId":"1235311778-11112-2-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17948","inReplyTo":"1235311778-11112-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"[tig PATCH v2 1/2] Popup menu","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-22T14:09:37Z","receivedAt":"2009-02-22T14:09:37Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Make the menu into a popup window that complements the status prompt.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n tig.c |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-\n 1 files changed, 113 insertions(+), 2 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex 20a40b9..9b9c34b 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -6542,6 +6542,98 @@ utf8_length(const char **start, size_t skip, int *width, size_t max_width, int *\n \treturn string - *start;\n }\n \n+/*\n+ * Popup management\n+ */\n+\n+struct popup {\n+\tWINDOW *win;\n+\tint width;\n+\tbool hotkeys;\n+\tint selected;\n+};\n+\n+static struct popup menu;\n+\n+\n+static void\n+menu_popup(void)\n+{\n+\twnoutrefresh(menu.win);\n+}\n+\n+static void\n+menu_popdown(void)\n+{\n+\tdelwin(menu.win);\n+\tmenu.win = NULL;\n+\tredraw_display(FALSE);\n+}\n+\n+static void\n+menu_create(int height, int width, const char* title, bool hotkeys)\n+{\n+\tWINDOW *win;\n+\tint ymax, xmax, top, left;\n+\tenum line_type type = LINE_TITLE_FOCUS;\n+\n+\tgetmaxyx(stdscr, ymax, xmax);\n+\ttop = (ymax - height)/2;\n+\tleft = (xmax - width)/2;\n+\tif (top < 0)\n+\t\ttop = 0;\n+\tif (left < 0)\n+\t\tleft = 0;\n+\n+\twin = newwin(height, width, top, left);\n+\twbkgd(win, COLOR_PAIR(type));\n+\n+\tbox(win, 0, 0);\n+\twattrset(win, get_line_attr(type));\n+\tmvwprintw(win, 0, (width-strlen(title))/2, \" %s \", title);\n+\n+\tmenu.win = win;\n+\tmenu.width = width;\n+\tmenu.hotkeys = hotkeys;\n+\tmenu.selected = -1;\n+}\n+\n+static void\n+menu_set_line_attr(int index, enum line_type type)\n+{\n+\tWINDOW *win = menu.win;\n+\tint width = menu.width-2;\n+\tmvwchgat(win, index+1, 1, width,\n+\t\t\tget_line_attr(type), type, NULL);\n+}\n+\n+static void\n+menu_putline(int index, const struct menu_item *item)\n+{\n+\tWINDOW *win = menu.win;\n+\tbool hotkeys = menu.hotkeys;\n+\tif (hotkeys) {\n+\t\tif (item->hotkey)\n+\t\t\tmvwprintw(win, index+1, 2, \"[%c] %s\", (char) item->hotkey, item->text);\n+\t\telse\n+\t\t\tmvwprintw(win, index+1, 6, \"%s\", item->text);\n+\t} else {\n+\t\tmvwprintw(win, index+1, 2, \"%s\", item->text);\n+\t}\n+}\n+\n+static void\n+menu_select(int index)\n+{\n+\tif (menu.selected >= 0) {\n+\t\tmenu_set_line_attr(menu.selected, LINE_TITLE_FOCUS);\n+\t}\n+\tif (index >= 0) {\n+\t\tmenu_set_line_attr(index, LINE_CURSOR);\n+\t}\n+\tmenu.selected = index;\n+\tmenu_popup();\n+}\n \n /*\n  * Status management\n@@ -6836,14 +6928,30 @@ static bool prompt_menu(const char *prompt, const struct menu_item *items, int *\n {\n \tenum input_status status = INPUT_OK;\n \tint size = 0;\n+\tint width = strlen(prompt+2);\n+\tbool hotkeys = false;\n+\tint i;\n \n-\twhile (items[size].text)\n+\twhile (items[size].text) {\n+\t\tint w = strlen(items[size].text);\n+\t\tif (w > width)\n+\t\t\twidth = w;\n+\t\tif (items[size].hotkey)\n+\t\t\thotkeys = true;\n \t\tsize++;\n+\t}\n+\t/* padding */\n+\twidth += hotkeys ? 8 : 4;\n+\n+\tmenu_create(size+2, width, prompt, hotkeys);\n+\tfor (i=0; i < size; ++i)\n+\t\tmenu_putline(i, &items[i]);\n+\tmenu_popup();\n+\n \n \twhile (status == INPUT_OK) {\n \t\tconst struct menu_item *item = &items[*selected];\n \t\tint key;\n-\t\tint i;\n \n \t\tmvwprintw(status_win, 0, 0, \"%s (%d of %d) \",\n \t\t\t  prompt, *selected + 1, size);\n@@ -6851,6 +6959,7 @@ static bool prompt_menu(const char *prompt, const struct menu_item *items, int *\n \t\t\twprintw(status_win, \"[%c] \", (char) item->hotkey);\n \t\twprintw(status_win, \"%s\", item->text);\n \t\twclrtoeol(status_win);\n+\t\tmenu_select(*selected);\n \n \t\tkey = get_input(COLS - 1);\n \t\tswitch (key) {\n@@ -6886,6 +6995,8 @@ static bool prompt_menu(const char *prompt, const struct menu_item *items, int *\n \t\t}\n \t}\n \n+\tmenu_popdown();\n+\n \t/* Clear the status window */\n \tstatus_empty = FALSE;\n \treport(\"\");\n-- \n1.6.2.rc1.258.g1d592.dirty\n"},{"id":"105771","messageId":"1235311778-11112-3-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17948","inReplyTo":"1235311778-11112-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"[tig PATCH v2 2/2] Popup menu: redraw as needed","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-22T14:09:38Z","receivedAt":"2009-02-22T14:09:38Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Redraw the popup menu after a resize or an update during background\nloading.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n tig.c |  132 ++++++++++++++++++++++++++++++++++++++++++----------------------\n 1 files changed, 86 insertions(+), 46 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex 9b9c34b..96ab26d 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -2274,6 +2274,8 @@ resize_display(void)\n \t}\n }\n \n+static void menu_redraw(void);\n+\n static void\n redraw_display(bool clear)\n {\n@@ -2286,6 +2288,8 @@ redraw_display(bool clear)\n \t\tredraw_view(view);\n \t\tupdate_view_title(view);\n \t}\n+\n+\tmenu_redraw();\n }\n \n static void\n@@ -2952,6 +2956,10 @@ update_view(struct view *view)\n \t/* Update the title _after_ the redraw so that if the redraw picks up a\n \t * commit reference in view->ref it'll be available here. */\n \tupdate_view_title(view);\n+\n+\t/* Redraw menu if needed */\n+\tmenu_redraw();\n+\n \treturn TRUE;\n }\n \n@@ -6549,6 +6557,9 @@ utf8_length(const char **start, size_t skip, int *width, size_t max_width, int *\n struct popup {\n \tWINDOW *win;\n \tint width;\n+\tint height;\n+\tconst char *title;\n+\tconst struct menu_item *items;\n \tbool hotkeys;\n \tint selected;\n };\n@@ -6557,6 +6568,32 @@ static struct popup menu;\n \n \n static void\n+menu_set_line_attr(int index, enum line_type type)\n+{\n+\tWINDOW *win = menu.win;\n+\tint width = menu.width-2;\n+\tmvwchgat(win, index+1, 1, width,\n+\t\t\tget_line_attr(type), type, NULL);\n+}\n+\n+static void\n+menu_putline(int index, const struct menu_item *item, bool selected)\n+{\n+\tWINDOW *win = menu.win;\n+\tbool hotkeys = menu.hotkeys;\n+\tif (hotkeys) {\n+\t\tif (item->hotkey)\n+\t\t\tmvwprintw(win, index+1, 2, \"[%c] %s\", (char) item->hotkey, item->text);\n+\t\telse\n+\t\t\tmvwprintw(win, index+1, 6, \"%s\", item->text);\n+\t} else {\n+\t\tmvwprintw(win, index+1, 2, \"%s\", item->text);\n+\t}\n+\tif (selected)\n+\t\tmenu_set_line_attr(index, LINE_CURSOR);\n+}\n+\n+static void\n menu_popup(void)\n {\n \twnoutrefresh(menu.win);\n@@ -6571,55 +6608,62 @@ menu_popdown(void)\n }\n \n static void\n-menu_create(int height, int width, const char* title, bool hotkeys)\n+menu_redraw(void)\n {\n-\tWINDOW *win;\n-\tint ymax, xmax, top, left;\n-\tenum line_type type = LINE_TITLE_FOCUS;\n-\n-\tgetmaxyx(stdscr, ymax, xmax);\n-\ttop = (ymax - height)/2;\n-\tleft = (xmax - width)/2;\n-\tif (top < 0)\n-\t\ttop = 0;\n-\tif (left < 0)\n-\t\tleft = 0;\n-\n-\twin = newwin(height, width, top, left);\n-\twbkgd(win, COLOR_PAIR(type));\n+\tWINDOW *win = menu.win;\n+\tif (win)\n+\t{\n+\t\tint width = menu.width;\n+\t\tint height = menu.height;\n+\t\tconst char *title = menu.title;\n+\t\tconst struct menu_item *items = menu.items;\n \n-\tbox(win, 0, 0);\n-\twattrset(win, get_line_attr(type));\n-\tmvwprintw(win, 0, (width-strlen(title))/2, \" %s \", title);\n+\t\tint ymax, xmax, top, left;\n+\t\tenum line_type type = LINE_TITLE_FOCUS;\n+\t\tint i;\n \n-\tmenu.win = win;\n-\tmenu.width = width;\n-\tmenu.hotkeys = hotkeys;\n-\tmenu.selected = -1;\n+\t\tgetmaxyx(stdscr, ymax, xmax);\n+\t\ttop = (ymax - height)/2;\n+\t\tleft = (xmax - width)/2;\n+\t\tif (top < 0)\n+\t\t\ttop = 0;\n+\t\tif (left < 0)\n+\t\t\tleft = 0;\n+\n+\t\tmvwin(win, top, left);\n+\t\twbkgd(win, COLOR_PAIR(type));\n+\n+\t\tbox(win, 0, 0);\n+\t\twattrset(win, get_line_attr(type));\n+\t\tmvwprintw(win, 0, (width-strlen(title))/2, \" %s \", title);\n+\n+\t\tfor (i=0; items[i].text; ++i) {\n+\t\t\tmenu_putline(i, &items[i], i==menu.selected);\n+\t\t\tif (items[i].hotkey)\n+\t\t\t\tmenu.hotkeys = true;\n+\t\t}\n+\t\tmenu_popup();\n+\t}\n }\n \n static void\n-menu_set_line_attr(int index, enum line_type type)\n+menu_create(int height, int width, const char *title, const struct menu_item *items)\n {\n-\tWINDOW *win = menu.win;\n-\tint width = menu.width-2;\n-\tmvwchgat(win, index+1, 1, width,\n-\t\t\tget_line_attr(type), type, NULL);\n-}\n+\tint i=0;\n+\tmenu.win = newwin(height, width, 0, 0);\n+\tmenu.width = width;\n+\tmenu.height = height;\n+\tmenu.title = title;\n+\tmenu.items = items;\n+\tmenu.hotkeys = false;\n+\tfor(;items[i].text;++i)\n+\t\tif (items[i].hotkey) {\n+\t\t\tmenu.hotkeys=true;\n+\t\t\tbreak;\n+\t\t}\n+\tmenu.selected = -1;\n \n-static void\n-menu_putline(int index, const struct menu_item *item)\n-{\n-\tWINDOW *win = menu.win;\n-\tbool hotkeys = menu.hotkeys;\n-\tif (hotkeys) {\n-\t\tif (item->hotkey)\n-\t\t\tmvwprintw(win, index+1, 2, \"[%c] %s\", (char) item->hotkey, item->text);\n-\t\telse\n-\t\t\tmvwprintw(win, index+1, 6, \"%s\", item->text);\n-\t} else {\n-\t\tmvwprintw(win, index+1, 2, \"%s\", item->text);\n-\t}\n+\tmenu_redraw();\n }\n \n static void\n@@ -6943,11 +6987,7 @@ static bool prompt_menu(const char *prompt, const struct menu_item *items, int *\n \t/* padding */\n \twidth += hotkeys ? 8 : 4;\n \n-\tmenu_create(size+2, width, prompt, hotkeys);\n-\tfor (i=0; i < size; ++i)\n-\t\tmenu_putline(i, &items[i]);\n-\tmenu_popup();\n-\n+\tmenu_create(size+2, width, prompt, items);\n \n \twhile (status == INPUT_OK) {\n \t\tconst struct menu_item *item = &items[*selected];\n-- \n1.6.2.rc1.258.g1d592.dirty\n"},{"id":"105808","messageId":"1235327792-12338-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17948","inReplyTo":"1235311778-11112-3-git-send-email-giuseppe.bilotta@gmail.com","subject":"[tig PATCH v2bis 2/2] Popup menu: redraw as needed","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-22T18:36:32Z","receivedAt":"2009-02-22T18:36:32Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Redraw the popup menu after a resize or an update during background\nloading.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\nOf course, I forgot some leftovers here too. Here's the cleaned up patch for this.\n\n tig.c |  126 ++++++++++++++++++++++++++++++++++++++++++-----------------------\n 1 files changed, 82 insertions(+), 44 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex 9b9c34b..1d7dcce 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -2274,6 +2274,8 @@ resize_display(void)\n \t}\n }\n \n+static void menu_redraw(void);\n+\n static void\n redraw_display(bool clear)\n {\n@@ -2286,6 +2288,8 @@ redraw_display(bool clear)\n \t\tredraw_view(view);\n \t\tupdate_view_title(view);\n \t}\n+\n+\tmenu_redraw();\n }\n \n static void\n@@ -2952,6 +2956,10 @@ update_view(struct view *view)\n \t/* Update the title _after_ the redraw so that if the redraw picks up a\n \t * commit reference in view->ref it'll be available here. */\n \tupdate_view_title(view);\n+\n+\t/* Redraw menu if needed */\n+\tmenu_redraw();\n+\n \treturn TRUE;\n }\n \n@@ -6549,6 +6557,9 @@ utf8_length(const char **start, size_t skip, int *width, size_t max_width, int *\n struct popup {\n \tWINDOW *win;\n \tint width;\n+\tint height;\n+\tconst char *title;\n+\tconst struct menu_item *items;\n \tbool hotkeys;\n \tint selected;\n };\n@@ -6557,6 +6568,32 @@ static struct popup menu;\n \n \n static void\n+menu_set_line_attr(int index, enum line_type type)\n+{\n+\tWINDOW *win = menu.win;\n+\tint width = menu.width-2;\n+\tmvwchgat(win, index+1, 1, width,\n+\t\t\tget_line_attr(type), type, NULL);\n+}\n+\n+static void\n+menu_putline(int index, const struct menu_item *item, bool selected)\n+{\n+\tWINDOW *win = menu.win;\n+\tbool hotkeys = menu.hotkeys;\n+\tif (hotkeys) {\n+\t\tif (item->hotkey)\n+\t\t\tmvwprintw(win, index+1, 2, \"[%c] %s\", (char) item->hotkey, item->text);\n+\t\telse\n+\t\t\tmvwprintw(win, index+1, 6, \"%s\", item->text);\n+\t} else {\n+\t\tmvwprintw(win, index+1, 2, \"%s\", item->text);\n+\t}\n+\tif (selected)\n+\t\tmenu_set_line_attr(index, LINE_CURSOR);\n+}\n+\n+static void\n menu_popup(void)\n {\n \twnoutrefresh(menu.win);\n@@ -6571,55 +6608,60 @@ menu_popdown(void)\n }\n \n static void\n-menu_create(int height, int width, const char* title, bool hotkeys)\n+menu_redraw(void)\n {\n-\tWINDOW *win;\n-\tint ymax, xmax, top, left;\n-\tenum line_type type = LINE_TITLE_FOCUS;\n+\tWINDOW *win = menu.win;\n+\tif (win)\n+\t{\n+\t\tint width = menu.width;\n+\t\tint height = menu.height;\n+\t\tconst char *title = menu.title;\n+\t\tconst struct menu_item *items = menu.items;\n \n-\tgetmaxyx(stdscr, ymax, xmax);\n-\ttop = (ymax - height)/2;\n-\tleft = (xmax - width)/2;\n-\tif (top < 0)\n-\t\ttop = 0;\n-\tif (left < 0)\n-\t\tleft = 0;\n+\t\tint ymax, xmax, top, left;\n+\t\tenum line_type type = LINE_TITLE_FOCUS;\n+\t\tint i;\n \n-\twin = newwin(height, width, top, left);\n-\twbkgd(win, COLOR_PAIR(type));\n+\t\tgetmaxyx(stdscr, ymax, xmax);\n+\t\ttop = (ymax - height)/2;\n+\t\tleft = (xmax - width)/2;\n+\t\tif (top < 0)\n+\t\t\ttop = 0;\n+\t\tif (left < 0)\n+\t\t\tleft = 0;\n \n-\tbox(win, 0, 0);\n-\twattrset(win, get_line_attr(type));\n-\tmvwprintw(win, 0, (width-strlen(title))/2, \" %s \", title);\n+\t\tmvwin(win, top, left);\n+\t\twbkgd(win, COLOR_PAIR(type));\n \n-\tmenu.win = win;\n-\tmenu.width = width;\n-\tmenu.hotkeys = hotkeys;\n-\tmenu.selected = -1;\n-}\n+\t\tbox(win, 0, 0);\n+\t\twattrset(win, get_line_attr(type));\n+\t\tmvwprintw(win, 0, (width-strlen(title))/2, \" %s \", title);\n \n-static void\n-menu_set_line_attr(int index, enum line_type type)\n-{\n-\tWINDOW *win = menu.win;\n-\tint width = menu.width-2;\n-\tmvwchgat(win, index+1, 1, width,\n-\t\t\tget_line_attr(type), type, NULL);\n+\t\tfor (i=0; items[i].text; ++i)\n+\t\t\tmenu_putline(i, &items[i], i==menu.selected);\n+\n+\t\tmenu_popup();\n+\t}\n }\n \n static void\n-menu_putline(int index, const struct menu_item *item)\n+menu_create(int height, int width, const char *title, const struct menu_item *items)\n {\n-\tWINDOW *win = menu.win;\n-\tbool hotkeys = menu.hotkeys;\n-\tif (hotkeys) {\n-\t\tif (item->hotkey)\n-\t\t\tmvwprintw(win, index+1, 2, \"[%c] %s\", (char) item->hotkey, item->text);\n-\t\telse\n-\t\t\tmvwprintw(win, index+1, 6, \"%s\", item->text);\n-\t} else {\n-\t\tmvwprintw(win, index+1, 2, \"%s\", item->text);\n-\t}\n+\tint i=0;\n+\tmenu.win = newwin(height, width, 0, 0);\n+\tmenu.width = width;\n+\tmenu.height = height;\n+\tmenu.title = title;\n+\tmenu.items = items;\n+\tmenu.hotkeys = false;\n+\tfor(;items[i].text;++i)\n+\t\tif (items[i].hotkey) {\n+\t\t\tmenu.hotkeys=true;\n+\t\t\tbreak;\n+\t\t}\n+\tmenu.selected = -1;\n+\n+\tmenu_redraw();\n }\n \n static void\n@@ -6943,11 +6985,7 @@ static bool prompt_menu(const char *prompt, const struct menu_item *items, int *\n \t/* padding */\n \twidth += hotkeys ? 8 : 4;\n \n-\tmenu_create(size+2, width, prompt, hotkeys);\n-\tfor (i=0; i < size; ++i)\n-\t\tmenu_putline(i, &items[i]);\n-\tmenu_popup();\n-\n+\tmenu_create(size+2, width, prompt, items);\n \n \twhile (status == INPUT_OK) {\n \t\tconst struct menu_item *item = &items[*selected];\n-- \n1.6.2.rc1.258.g1d592.dirty\n"},{"id":"106270","messageId":"2c6b72b30902251432p18f7cb48sb5565cc200d5e3b9@mail.gmail.com","threadId":"17948","inReplyTo":"1235311778-11112-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [tig PATCH v2 0/2] popup menu","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2009-02-25T22:32:11Z","receivedAt":"2009-02-25T22:32:11Z","isPatch":true,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Sun, Feb 22, 2009 at 15:09, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n> Second version, in two patches. The first one is just the same as\n> previous one, minus a couple of leftovers.\n>\n> The second one reimplements the menu drawing routine so that it can be\n> called when necessary to redraw the menu entirely, e.g. after a resize\n> or when background loading finishes.\n\nI didn't read them through very carefully yet, so will \"queue\" them\nfor now until I get fully back to tig. There are still some quirks\nthat might needs to be addressed related with resizing, but this could\nalso be fixed later. Anyway, I would like to think a bit more whether\nor not I like the cute menus, and also whether options might be served\nbetter by introducing an option view.\n\nRegarding the \"tig branch\", would you mind if I postpone applying it\nuntil the branch view develops into something that is actually usable?\n\n-- \nJonas Fonseca\n"},{"id":"106271","messageId":"cb7bb73a0902251456g70bf4a01ica17ecb37de20733@mail.gmail.com","threadId":"17948","inReplyTo":"2c6b72b30902251432p18f7cb48sb5565cc200d5e3b9@mail.gmail.com","subject":"Re: [tig PATCH v2 0/2] popup menu","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-02-25T22:56:27Z","receivedAt":"2009-02-25T22:56:27Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Wed, Feb 25, 2009 at 11:32 PM, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:\n> On Sun, Feb 22, 2009 at 15:09, Giuseppe Bilotta\n> <giuseppe.bilotta@gmail.com> wrote:\n>> Second version, in two patches. The first one is just the same as\n>> previous one, minus a couple of leftovers.\n>>\n>> The second one reimplements the menu drawing routine so that it can be\n>> called when necessary to redraw the menu entirely, e.g. after a resize\n>> or when background loading finishes.\n>\n> I didn't read them through very carefully yet, so will \"queue\" them\n> for now until I get fully back to tig. There are still some quirks\n> that might needs to be addressed related with resizing, but this could\n> also be fixed later. Anyway, I would like to think a bit more whether\n> or not I like the cute menus, and also whether options might be served\n> better by introducing an option view.\n\nI like the minimalistic interface of tig, but when the user has to\nselect among a fixed number of choices it's much better to be able to\nsee all of them. The idea of a menu view which is not a popup is\nprobably good too, but it might have issues with the switching (what\nif q is a hotkey? how would you close the view?)\n\n> Regarding the \"tig branch\", would you mind if I postpone applying it\n> until the branch view develops into something that is actually usable?\n\nPlease, be my guest 8-) I'm not even convinced it's useful anymore 8-)\n(\"tig branch\", not the branch view).\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"}]}