diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-21 15:40:17 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-21 15:40:17 +0000 |
commit | e84c17069aad366dc9eb72ed344ceffeb3e84d3d (patch) | |
tree | 7ebf19205c0aff75ebc448ba07b2a1f6a1031b65 /browser.c | |
parent | 735c8718c6608f708650465759b25df3759eab13 (diff) |
Byrial Jensen's mutt_multi_choice() patch plus some German
translations.
Diffstat (limited to 'browser.c')
-rw-r--r-- | browser.c | 64 |
1 files changed, 23 insertions, 41 deletions
@@ -735,61 +735,43 @@ void mutt_select_file (char *f, size_t flen, int buffy) case OP_SORT: case OP_SORT_REVERSE: - { - int reverse = 0, done = 0; - event_t ch; - - move (LINES - 1, 0); - if (i == OP_SORT_REVERSE) - { - reverse = SORT_REVERSE; - addstr (_("Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ")); - } else { - addstr (_("Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ")); - } - clrtoeol (); - - FOREVER + { + int resort = 1; + int reverse = (i == OP_SORT_REVERSE); + + switch (mutt_multi_choice ((reverse) ? + _("Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ") : + _("Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? "), + _("dazn"))) { - ch = mutt_getch(); - if (ch.ch == 'a' || ch.ch == 'd' || ch.ch == 'z' || ch.ch == 'n') + case -1: /* abort */ + resort = 0; break; - if (ch.ch == -1 || CI_is_return (ch.ch)) - { - done = 1; - CLEARLINE (LINES - 1); + case 1: /* (d)ate */ + BrowserSort = reverse | SORT_DATE; break; - } - else - BEEP (); - } - - /* nothing to be done */ - if (done) - break; - switch (ch.ch) - { - case 'a': + case 2: /* (a)lpha */ BrowserSort = reverse | SORT_SUBJECT; break; - case 'd': - BrowserSort = reverse | SORT_DATE; - break; - case 'z': + + case 3: /* si(z)e */ BrowserSort = reverse | SORT_SIZE; break; - case 'n': + + case 4: /* do(n)'t sort */ BrowserSort = SORT_ORDER; break; } - browser_sort (&state); - menu->redraw = REDRAW_FULL; + if (resort) + { + browser_sort (&state); + menu->redraw = REDRAW_FULL; + } + break; } - break; - case OP_TOGGLE_MAILBOXES: buffy = 1 - buffy; |