]> granicus.if.org Git - neomutt/commitdiff
rename menu functions
authorRichard Russon <rich@flatcap.org>
Sun, 1 Apr 2018 03:30:33 +0000 (04:30 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 1 Apr 2018 03:30:33 +0000 (04:30 +0100)
25 files changed:
addrbook.c
browser.c
buffy.c
color.c
compose.c
conn/ssl.c
conn/ssl_gnutls.c
curs_lib.c
curs_main.c
flags.c
history.c
imap/command.c
init.c
menu.c
mutt_menu.h
ncrypt/crypt_gpgme.c
ncrypt/pgpkey.c
ncrypt/smime.c
pager.c
postpone.c
query.c
recvattach.c
remailer.c
score.c
sidebar.c

index ce70601f8a3b397999e7fd3d15ec6562a74246b8..643aaff3e44c2f12278e2cc158f9c30aa1db17d9 100644 (file)
@@ -184,12 +184,12 @@ void mutt_alias_menu(char *buf, size_t buflen, struct Alias *aliases)
     return;
   }
 
-  menu = mutt_new_menu(MENU_ALIAS);
+  menu = mutt_menu_new(MENU_ALIAS);
   menu->make_entry = alias_entry;
   menu->tag = alias_tag;
   menu->title = _("Aliases");
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_ALIAS, AliasHelp);
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
 new_aliases:
 
@@ -278,7 +278,7 @@ new_aliases:
     mutt_addr_write(buf, buflen, AliasTable[t]->addr, true);
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   FREE(&AliasTable);
 }
index fddb0c7a2e4617fbfeedf16634faee5f591cf05f..7d64c501d5f193b9da195b955a9c82da650388ef 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1367,7 +1367,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi
     if (examine_directory(NULL, &state, LastDir, prefix) == -1)
       goto bail;
   }
-  menu = mutt_new_menu(MENU_FOLDER);
+  menu = mutt_menu_new(MENU_FOLDER);
   menu->make_entry = folder_entry;
   menu->search = select_file_search;
   menu->title = title;
@@ -1390,7 +1390,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi
                                  OPT_NEWS ? FolderNewsHelp :
 #endif
                                             FolderHelp);
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   init_menu(&state, menu, title, sizeof(title), buffy);
 
@@ -2202,7 +2202,7 @@ bail:
 
   if (menu)
   {
-    mutt_pop_current_menu(menu);
+    mutt_menu_pop_current(menu);
     mutt_menu_destroy(&menu);
   }
 
diff --git a/buffy.c b/buffy.c
index 04fb34f9ef7cc1b2cbe9ef1e4b1616d43ac8167e..030aede892fce59b3c30cc8920c934fb28afb90f 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -444,7 +444,7 @@ static void buffy_check(struct Buffy *tmp, struct stat *contex_sb, bool check_st
   if ((orig_new != tmp->new) || (orig_count != tmp->msg_count) ||
       (orig_unread != tmp->msg_unread) || (orig_flagged != tmp->msg_flagged))
   {
-    mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+    mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
   }
 #endif
 
diff --git a/color.c b/color.c
index e665cd798ae12029bca3fb73a79b4231b8e10ec7..106f45ef241199d677c5d9e838f8ea3dd2deaa36 100644 (file)
--- a/color.c
+++ b/color.c
@@ -515,7 +515,7 @@ static int parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long dat
   if (object > MT_COLOR_INDEX_SUBJECT)
   { /* uncolor index column */
     ColorDefs[object] = 0;
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
     return 0;
   }
 
@@ -580,7 +580,7 @@ static int parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long dat
 
   if (is_index && do_cache && !OPT_NO_CURSES)
   {
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
     /* force re-caching of index colors */
     for (int i = 0; Context && i < Context->msgcount; i++)
       Context->hdrs[i]->pair = 0;
@@ -937,27 +937,27 @@ static int parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err,
   else if (object == MT_COLOR_INDEX)
   {
     r = add_pattern(&ColorIndexList, buf->data, 1, fg, bg, attr, err, 1, match);
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
   }
   else if (object == MT_COLOR_INDEX_AUTHOR)
   {
     r = add_pattern(&ColorIndexAuthorList, buf->data, 1, fg, bg, attr, err, 1, match);
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
   }
   else if (object == MT_COLOR_INDEX_FLAGS)
   {
     r = add_pattern(&ColorIndexFlagsList, buf->data, 1, fg, bg, attr, err, 1, match);
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
   }
   else if (object == MT_COLOR_INDEX_SUBJECT)
   {
     r = add_pattern(&ColorIndexSubjectList, buf->data, 1, fg, bg, attr, err, 1, match);
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
   }
   else if (object == MT_COLOR_INDEX_TAG)
   {
     r = add_pattern(&ColorIndexTagList, buf->data, 1, fg, bg, attr, err, 1, match);
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
   }
   else if (object == MT_COLOR_QUOTED)
   {
@@ -987,7 +987,7 @@ static int parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err,
   {
     ColorDefs[object] = fgbgattr_to_color(fg, bg, attr);
     if (object > MT_COLOR_INDEX_AUTHOR)
-      mutt_set_menu_redraw_full(MENU_MAIN);
+      mutt_menu_set_redraw_full(MENU_MAIN);
   }
 
   return r;
index ef7d5a8baa9ed39b43ccc9da3be1a393b8ebaaef..689f4ff2ba1622f9afe805c0cebaa5a51ecb136c 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -799,7 +799,7 @@ int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
   rd.msg = msg;
   rd.fcc = fcc;
 
-  menu = mutt_new_menu(MENU_COMPOSE);
+  menu = mutt_menu_new(MENU_COMPOSE);
   menu->offset = HDR_ATTACH;
   menu->make_entry = snd_entry;
   menu->tag = mutt_tag_attach;
@@ -811,7 +811,7 @@ int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
     menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_COMPOSE, ComposeHelp);
   menu->custom_menu_redraw = compose_menu_redraw;
   menu->redraw_data = &rd;
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   actx = mutt_mem_calloc(sizeof(struct AttachCtx), 1);
   actx->hdr = msg;
@@ -1670,7 +1670,7 @@ int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
     }
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
 
   if (actx->idxlen)
index 5b44e6d07268d8039d9dadc60a3fa2428d444dbe..9318081487755991da9c329aab57362d58f54f81 100644 (file)
@@ -952,12 +952,12 @@ static int interactive_check_cert(X509 *cert, int idx, size_t len, SSL *ssl, int
   char helpstr[LONG_STRING];
   char buf[STRING];
   char title[STRING];
-  struct Menu *menu = mutt_new_menu(MENU_GENERIC);
+  struct Menu *menu = mutt_menu_new(MENU_GENERIC);
   int done, row;
   FILE *fp = NULL;
   int ALLOW_SKIP = 0; /**< All caps tells Coverity that this is effectively a preproc condition */
 
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   menu->max = mutt_array_size(part) * 2 + 10;
   menu->dialog = mutt_mem_calloc(1, menu->max * sizeof(char *));
@@ -1088,7 +1088,7 @@ static int interactive_check_cert(X509 *cert, int idx, size_t len, SSL *ssl, int
     }
   }
   OPT_IGNORE_MACRO_EVENTS = false;
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   mutt_debug(2, "done=%d\n", done);
   return (done == 2);
index 2a02e0f33950a061c74251ee927e4483fc107d19..8521d1c55ef2204a50f4acd9f2b3e3877b422b73 100644 (file)
@@ -600,12 +600,12 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata,
     return 0;
   }
 
-  menu = mutt_new_menu(MENU_GENERIC);
+  menu = mutt_menu_new(MENU_GENERIC);
   menu->max = 25;
   menu->dialog = mutt_mem_calloc(1, menu->max * sizeof(char *));
   for (int i = 0; i < menu->max; i++)
     menu->dialog[i] = mutt_mem_calloc(1, SHORT_STRING * sizeof(char));
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   row = 0;
   mutt_str_strfcpy(menu->dialog[row], _("This certificate belongs to:"), SHORT_STRING);
@@ -848,7 +848,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata,
     }
   }
   OPT_IGNORE_MACRO_EVENTS = false;
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   gnutls_x509_crt_deinit(cert);
 
index 50244f29cb74ac011f2c022425bf3f1ae1ba0558..5773acf66c13a7f2e14662cc6c0eee8fa5a90c8f 100644 (file)
@@ -112,7 +112,7 @@ void mutt_need_hard_redraw(void)
 {
   keypad(stdscr, true);
   clearok(stdscr, true);
-  mutt_set_current_menu_redraw_full();
+  mutt_menu_set_current_redraw_full();
 }
 
 struct Event mutt_getch(void)
@@ -184,7 +184,7 @@ int mutt_get_field_full(const char *field, char *buf, size_t buflen,
       SigWinch = 0;
       mutt_resize_screen();
       clearok(stdscr, TRUE);
-      mutt_current_menu_redraw();
+      mutt_menu_current_redraw();
     }
     mutt_window_clearline(MuttMessageWindow, 0);
     SETCOLOR(MT_COLOR_PROMPT);
@@ -273,7 +273,7 @@ int mutt_yesorno(const char *msg, int def)
         SigWinch = 0;
         mutt_resize_screen();
         clearok(stdscr, TRUE);
-        mutt_current_menu_redraw();
+        mutt_menu_current_redraw();
       }
       if (MuttMessageWindow->cols)
       {
@@ -284,7 +284,7 @@ int mutt_yesorno(const char *msg, int def)
       if (prompt_lines != MuttMessageWindow->rows)
       {
         reflow_message_window_rows(prompt_lines);
-        mutt_current_menu_redraw();
+        mutt_menu_current_redraw();
       }
 
       /* maxlen here is sort of arbitrary, so pick a reasonable upper bound */
@@ -342,7 +342,7 @@ int mutt_yesorno(const char *msg, int def)
   if (MuttMessageWindow->rows != 1)
   {
     reflow_message_window_rows(1);
-    mutt_current_menu_redraw();
+    mutt_menu_current_redraw();
   }
   else
     mutt_window_clearline(MuttMessageWindow, 0);
@@ -618,9 +618,9 @@ void mutt_reflow_windows(void)
   }
 #endif
 
-  mutt_set_current_menu_redraw_full();
+  mutt_menu_set_current_redraw_full();
   /* the pager menu needs this flag set to recalc line_info */
-  mutt_set_current_menu_redraw(REDRAW_FLOW);
+  mutt_menu_set_current_redraw(REDRAW_FLOW);
 }
 
 static void reflow_message_window_rows(int mw_rows)
@@ -643,7 +643,7 @@ static void reflow_message_window_rows(int mw_rows)
 
   /* We don't also set REDRAW_FLOW because this function only
    * changes rows and is a temporary adjustment. */
-  mutt_set_current_menu_redraw_full();
+  mutt_menu_set_current_redraw_full();
 }
 
 int mutt_window_move(struct MuttWindow *win, int row, int col)
@@ -996,7 +996,7 @@ int mutt_multi_choice(char *prompt, char *letters)
         SigWinch = 0;
         mutt_resize_screen();
         clearok(stdscr, TRUE);
-        mutt_current_menu_redraw();
+        mutt_menu_current_redraw();
       }
       if (MuttMessageWindow->cols)
       {
@@ -1007,7 +1007,7 @@ int mutt_multi_choice(char *prompt, char *letters)
       if (prompt_lines != MuttMessageWindow->rows)
       {
         reflow_message_window_rows(prompt_lines);
-        mutt_current_menu_redraw();
+        mutt_menu_current_redraw();
       }
 
       SETCOLOR(MT_COLOR_PROMPT);
@@ -1049,7 +1049,7 @@ int mutt_multi_choice(char *prompt, char *letters)
   if (MuttMessageWindow->rows != 1)
   {
     reflow_message_window_rows(1);
-    mutt_current_menu_redraw();
+    mutt_menu_current_redraw();
   }
   else
     mutt_window_clearline(MuttMessageWindow, 0);
index f924dfc871b948bcb117e830ef95807687f0d67c..56a64238a86d45da4b9166f21188ec581076147f 100644 (file)
@@ -919,7 +919,7 @@ int mutt_index_menu(void)
   int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */
   int attach_msg = OPT_ATTACH_MSG;
 
-  menu = mutt_new_menu(MENU_MAIN);
+  menu = mutt_menu_new(MENU_MAIN);
   menu->make_entry = index_make_entry;
   menu->color = index_color;
   menu->current = ci_first_message();
@@ -930,7 +930,7 @@ int mutt_index_menu(void)
 #endif
                                                                      IndexHelp);
   menu->custom_menu_redraw = index_menu_redraw;
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   if (!attach_msg)
     mutt_buffy_check(true); /* force the buffy check after we enter the folder */
@@ -2206,7 +2206,7 @@ int mutt_index_menu(void)
         int hint = Context->hdrs[Context->v2r[menu->current]]->index;
 
         /* If we are returning to the pager via an index menu redirection, we
-         * need to reset the menu->menu.  Otherwise mutt_pop_current_menu() will
+         * need to reset the menu->menu.  Otherwise mutt_menu_pop_current() will
          * set CurrentMenu incorrectly when we return back to the index menu. */
         menu->menu = MENU_MAIN;
 
@@ -3385,7 +3385,7 @@ int mutt_index_menu(void)
       break;
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   return close;
 }
diff --git a/flags.c b/flags.c
index f0333a14a8911a5d287b4b80174555ab46f412b6..549c5aae67bf635a058ae56bfa4f82108d03e4d5 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -316,7 +316,7 @@ void mutt_set_flag_update(struct Context *ctx, struct Header *h, int flag, int b
   {
     mutt_set_header_color(ctx, h);
 #ifdef USE_SIDEBAR
-    mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+    mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
 #endif
   }
 
index 4d88d55be53f8ee72d1b3ea12e20ee2b24cc6504..088f531848cad86e854d1b37b54e3b22535036cd 100644 (file)
--- a/history.c
+++ b/history.c
@@ -661,11 +661,11 @@ static void history_menu(char *buf, size_t buflen, char **matches, int match_cou
 
   snprintf(title, sizeof(title), _("History '%s'"), buf);
 
-  menu = mutt_new_menu(MENU_GENERIC);
+  menu = mutt_menu_new(MENU_GENERIC);
   menu->make_entry = history_entry;
   menu->title = title;
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_GENERIC, HistoryHelp);
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   menu->max = match_count;
   menu->data = matches;
@@ -684,7 +684,7 @@ static void history_menu(char *buf, size_t buflen, char **matches, int match_cou
     }
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
 }
 
index 0cd15feded10a80cc44d5cab83ae965859d036c5..970d63185ae53f062b87f53d7ae508136d31743c 100644 (file)
@@ -754,7 +754,7 @@ static void cmd_parse_status(struct ImapData *idata, char *s)
         if ((inc->new != new) || (inc->msg_count != status->messages) ||
             (inc->msg_unread != status->unseen))
         {
-          mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+          mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
         }
 #endif
         inc->new = new;
diff --git a/init.c b/init.c
index 94947b620eead2db48c1c3921bc7f20a57cf4e4f..1db6f7796dbd0bda7fa4bc1230d667486b9fe26c 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1657,7 +1657,7 @@ static int parse_unalias(struct Buffer *buf, struct Buffer *s,
       {
         for (tmp = Aliases; tmp; tmp = tmp->next)
           tmp->del = true;
-        mutt_set_current_menu_redraw_full();
+        mutt_menu_set_current_redraw_full();
       }
       else
         mutt_alias_free(&Aliases);
@@ -1672,7 +1672,7 @@ static int parse_unalias(struct Buffer *buf, struct Buffer *s,
           if (CurrentMenu == MENU_ALIAS)
           {
             tmp->del = true;
-            mutt_set_current_menu_redraw_full();
+            mutt_menu_set_current_redraw_full();
             break;
           }
 
@@ -1733,7 +1733,7 @@ static int parse_alias(struct Buffer *buf, struct Buffer *s, unsigned long data,
     /* override the previous value */
     mutt_addr_free(&tmp->addr);
     if (CurrentMenu == MENU_ALIAS)
-      mutt_set_current_menu_redraw_full();
+      mutt_menu_set_current_redraw_full();
   }
 
   mutt_extract_token(buf, s, MUTT_TOKEN_QUOTE | MUTT_TOKEN_SPACE | MUTT_TOKEN_SEMICOLON);
@@ -1950,13 +1950,13 @@ static void restore_default(struct Option *p)
   }
 
   if (p->flags & R_INDEX)
-    mutt_set_menu_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_MAIN);
   if (p->flags & R_PAGER)
-    mutt_set_menu_redraw_full(MENU_PAGER);
+    mutt_menu_set_redraw_full(MENU_PAGER);
   if (p->flags & R_PAGER_FLOW)
   {
-    mutt_set_menu_redraw_full(MENU_PAGER);
-    mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
+    mutt_menu_set_redraw_full(MENU_PAGER);
+    mutt_menu_set_redraw(MENU_PAGER, REDRAW_FLOW);
   }
   if (p->flags & R_RESORT_SUB)
     OPT_SORT_SUBTHREADS = true;
@@ -1970,10 +1970,10 @@ static void restore_default(struct Option *p)
     mutt_reflow_windows();
 #ifdef USE_SIDEBAR
   if (p->flags & R_SIDEBAR)
-    mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+    mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
 #endif
   if (p->flags & R_MENU)
-    mutt_set_current_menu_redraw_full();
+    mutt_menu_set_current_redraw_full();
 }
 
 static void esc_char(char c, char *p, char *dst, size_t len)
@@ -2221,7 +2221,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
         }
         for (idx = 0; MuttVars[idx].name; idx++)
           restore_default(&MuttVars[idx]);
-        mutt_set_current_menu_redraw_full();
+        mutt_menu_set_current_redraw_full();
         OPT_SORT_SUBTHREADS = true;
         OPT_NEED_RESORT = true;
         OPT_RESORT_INIT = true;
@@ -2698,13 +2698,13 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
     if (!myvar)
     {
       if (MuttVars[idx].flags & R_INDEX)
-        mutt_set_menu_redraw_full(MENU_MAIN);
+        mutt_menu_set_redraw_full(MENU_MAIN);
       if (MuttVars[idx].flags & R_PAGER)
-        mutt_set_menu_redraw_full(MENU_PAGER);
+        mutt_menu_set_redraw_full(MENU_PAGER);
       if (MuttVars[idx].flags & R_PAGER_FLOW)
       {
-        mutt_set_menu_redraw_full(MENU_PAGER);
-        mutt_set_menu_redraw(MENU_PAGER, REDRAW_FLOW);
+        mutt_menu_set_redraw_full(MENU_PAGER);
+        mutt_menu_set_redraw(MENU_PAGER, REDRAW_FLOW);
       }
       if (MuttVars[idx].flags & R_RESORT_SUB)
         OPT_SORT_SUBTHREADS = true;
@@ -2718,10 +2718,10 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
         mutt_reflow_windows();
 #ifdef USE_SIDEBAR
       if (MuttVars[idx].flags & R_SIDEBAR)
-        mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+        mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
 #endif
       if (MuttVars[idx].flags & R_MENU)
-        mutt_set_current_menu_redraw_full();
+        mutt_menu_set_current_redraw_full();
     }
   }
   return r;
diff --git a/menu.c b/menu.c
index 7918e674fe7cea919f6f619eb6626692dc295e78..e7194ceee2097f9e91c0342a004e1df05691ad2d 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -800,7 +800,7 @@ void mutt_menu_init(void)
     SearchBuffers[i] = NULL;
 }
 
-struct Menu *mutt_new_menu(int menu)
+struct Menu *mutt_menu_new(int menu)
 {
   struct Menu *p = mutt_mem_calloc(1, sizeof(struct Menu));
 
@@ -841,7 +841,7 @@ static struct Menu *get_current_menu(void)
   return MenuStackCount ? MenuStack[MenuStackCount - 1] : NULL;
 }
 
-void mutt_push_current_menu(struct Menu *menu)
+void mutt_menu_push_current(struct Menu *menu)
 {
   if (MenuStackCount >= MenuStackLen)
   {
@@ -853,7 +853,7 @@ void mutt_push_current_menu(struct Menu *menu)
   CurrentMenu = menu->menu;
 }
 
-void mutt_pop_current_menu(struct Menu *menu)
+void mutt_menu_pop_current(struct Menu *menu)
 {
   struct Menu *prev_menu = NULL;
 
@@ -876,7 +876,7 @@ void mutt_pop_current_menu(struct Menu *menu)
   }
 }
 
-void mutt_set_current_menu_redraw(int redraw)
+void mutt_menu_set_current_redraw(int redraw)
 {
   struct Menu *current_menu = NULL;
 
@@ -885,7 +885,7 @@ void mutt_set_current_menu_redraw(int redraw)
     current_menu->redraw |= redraw;
 }
 
-void mutt_set_current_menu_redraw_full(void)
+void mutt_menu_set_current_redraw_full(void)
 {
   struct Menu *current_menu = NULL;
 
@@ -894,19 +894,19 @@ void mutt_set_current_menu_redraw_full(void)
     current_menu->redraw = REDRAW_FULL;
 }
 
-void mutt_set_menu_redraw(int menu_type, int redraw)
+void mutt_menu_set_redraw(int menu_type, int redraw)
 {
   if (CurrentMenu == menu_type)
-    mutt_set_current_menu_redraw(redraw);
+    mutt_menu_set_current_redraw(redraw);
 }
 
-void mutt_set_menu_redraw_full(int menu_type)
+void mutt_menu_set_redraw_full(int menu_type)
 {
   if (CurrentMenu == menu_type)
-    mutt_set_current_menu_redraw_full();
+    mutt_menu_set_current_redraw_full();
 }
 
-void mutt_current_menu_redraw()
+void mutt_menu_current_redraw()
 {
   struct Menu *current_menu = NULL;
 
index 95d7b6085ebd7952b41c870c4a3d05096c832974..a83a1bd83f73fd90b10787520e21f308a113a9f5 100644 (file)
@@ -95,46 +95,46 @@ struct Menu
   int tagged;     /**< number of tagged entries */
 };
 
-void mutt_menu_init(void);
-void menu_redraw_full(struct Menu *menu);
-#ifdef USE_SIDEBAR
-void menu_redraw_sidebar(struct Menu *menu);
-#endif
-void menu_redraw_index(struct Menu *menu);
-void menu_redraw_status(struct Menu *menu);
-void menu_redraw_motion(struct Menu *menu);
-void menu_redraw_current(struct Menu *menu);
-int menu_redraw(struct Menu *menu);
+int  menu_redraw(struct Menu *menu);
+void menu_bottom_page(struct Menu *menu);
+void menu_check_recenter(struct Menu *menu);
+void menu_current_bottom(struct Menu *menu);
+void menu_current_middle(struct Menu *menu);
+void menu_current_top(struct Menu *menu);
 void menu_first_entry(struct Menu *menu);
+void menu_half_down(struct Menu *menu);
+void menu_half_up(struct Menu *menu);
 void menu_last_entry(struct Menu *menu);
-void menu_top_page(struct Menu *menu);
-void menu_bottom_page(struct Menu *menu);
 void menu_middle_page(struct Menu *menu);
-void menu_next_page(struct Menu *menu);
-void menu_prev_page(struct Menu *menu);
 void menu_next_line(struct Menu *menu);
+void menu_next_page(struct Menu *menu);
 void menu_prev_line(struct Menu *menu);
-void menu_half_up(struct Menu *menu);
-void menu_half_down(struct Menu *menu);
-void menu_current_top(struct Menu *menu);
-void menu_current_middle(struct Menu *menu);
-void menu_current_bottom(struct Menu *menu);
-void menu_check_recenter(struct Menu *menu);
+void menu_prev_page(struct Menu *menu);
+void menu_redraw_current(struct Menu *menu);
+void menu_redraw_full(struct Menu *menu);
+void menu_redraw_index(struct Menu *menu);
+void menu_redraw_motion(struct Menu *menu);
+#ifdef USE_SIDEBAR
+void menu_redraw_sidebar(struct Menu *menu);
+#endif
+void menu_redraw_status(struct Menu *menu);
 void menu_status_line(char *buf, size_t buflen, struct Menu *menu, const char *p);
 bool mutt_ts_capability(void);
 void mutt_ts_status(char *str);
 void mutt_ts_icon(char *str);
+void menu_top_page(struct Menu *menu);
 
-struct Menu *mutt_new_menu(int menu);
-void mutt_menu_destroy(struct Menu **p);
-void mutt_push_current_menu(struct Menu *menu);
-void mutt_pop_current_menu(struct Menu *menu);
-void mutt_set_current_menu_redraw(int redraw);
-void mutt_set_current_menu_redraw_full(void);
-void mutt_set_menu_redraw(int menu_type, int redraw);
-void mutt_set_menu_redraw_full(int menu_type);
-void mutt_current_menu_redraw(void);
-int mutt_menu_loop(struct Menu *menu);
+void         mutt_menu_current_redraw(void);
+void         mutt_menu_destroy(struct Menu **p);
+void         mutt_menu_init(void);
+int          mutt_menu_loop(struct Menu *menu);
+struct Menu *mutt_menu_new(int menu);
+void         mutt_menu_pop_current(struct Menu *menu);
+void         mutt_menu_push_current(struct Menu *menu);
+void         mutt_menu_set_current_redraw_full(void);
+void         mutt_menu_set_current_redraw(int redraw);
+void         mutt_menu_set_redraw_full(int menu_type);
+void         mutt_menu_set_redraw(int menu_type, int redraw);
 
 /* used in both the index and pager index to make an entry. */
 void index_make_entry(char *s, size_t l, struct Menu *menu, int num);
index a81b3b72b8338c64266d781ab008cffa100aafc1..0c550d06748bc42458c6ce1ad358ad1831cfe504 100644 (file)
@@ -4233,12 +4233,12 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
   mutt_make_help(buf, sizeof(buf), _("Help"), menu_to_use, OP_HELP);
   strcat(helpstr, buf);
 
-  menu = mutt_new_menu(menu_to_use);
+  menu = mutt_menu_new(menu_to_use);
   menu->max = i;
   menu->make_entry = crypt_entry;
   menu->help = helpstr;
   menu->data = key_table;
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   {
     const char *ts = NULL;
@@ -4345,7 +4345,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
     }
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   FREE(&key_table);
 
index 8a03f80ee309ae6f487934b352522831e6d961db..dd05eed15f48f80768553a1326a050e7826ebcbe 100644 (file)
@@ -544,12 +544,12 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
   mutt_make_help(buf, sizeof(buf), _("Help"), MENU_PGP, OP_HELP);
   strcat(helpstr, buf);
 
-  menu = mutt_new_menu(MENU_PGP);
+  menu = mutt_menu_new(MENU_PGP);
   menu->max = i;
   menu->make_entry = pgp_entry;
   menu->help = helpstr;
   menu->data = KeyTable;
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   if (p)
     snprintf(buf, sizeof(buf), _("PGP keys matching <%s>."), p->mailbox);
@@ -670,7 +670,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
     }
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   FREE(&KeyTable);
 
index d5557035137888438857e28288eec52a229e9c3a..9761a56c0fe459ce14e8686e63a430cb5f887835 100644 (file)
@@ -422,13 +422,13 @@ static struct SmimeKey *smime_select_key(struct SmimeKey *keys, char *query)
   strcat(helpstr, buf);
 
   /* Create the menu */
-  menu = mutt_new_menu(MENU_SMIME);
+  menu = mutt_menu_new(MENU_SMIME);
   menu->max = table_index;
   menu->make_entry = smime_entry;
   menu->help = helpstr;
   menu->data = table;
   menu->title = title;
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
   /* sorting keys might be done later - TODO */
 
   mutt_clear_error();
@@ -474,7 +474,7 @@ static struct SmimeKey *smime_select_key(struct SmimeKey *keys, char *query)
     }
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   FREE(&table);
 
diff --git a/pager.c b/pager.c
index 261e621e0059cd8ca74d53c705667099fc7d8ac1..531fae58ae814270d76ff362f6438c4f5a716f4e 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1860,7 +1860,7 @@ static void pager_menu_redraw(struct Menu *pager_menu)
       {
         /* only allocate the space if/when we need the index.
            Initialise the menu as per the main index */
-        rd->index = mutt_new_menu(MENU_MAIN);
+        rd->index = mutt_menu_new(MENU_MAIN);
         rd->index->make_entry = index_make_entry;
         rd->index->color = index_color;
         rd->index->max = Context ? Context->vcount : 0;
@@ -2147,10 +2147,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
   rd.pager_status_window = mutt_mem_calloc(1, sizeof(struct MuttWindow));
   rd.pager_window = mutt_mem_calloc(1, sizeof(struct MuttWindow));
 
-  pager_menu = mutt_new_menu(MENU_PAGER);
+  pager_menu = mutt_menu_new(MENU_PAGER);
   pager_menu->custom_menu_redraw = pager_menu_redraw;
   pager_menu->redraw_data = &rd;
-  mutt_push_current_menu(pager_menu);
+  mutt_menu_push_current(pager_menu);
 
   while (ch != -1)
   {
@@ -3278,7 +3278,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
     rd.search_compiled = 0;
   }
   FREE(&rd.line_info);
-  mutt_pop_current_menu(pager_menu);
+  mutt_menu_pop_current(pager_menu);
   mutt_menu_destroy(&pager_menu);
   if (rd.index)
     mutt_menu_destroy(&rd.index);
index 72b12799b3fc462336f54551aa0b238315b940d4..ca34158f06c8eb8599790d37047094d589b9953b 100644 (file)
@@ -192,13 +192,13 @@ static struct Header *select_msg(void)
   bool done = false;
   char helpstr[LONG_STRING];
 
-  struct Menu *menu = mutt_new_menu(MENU_POST);
+  struct Menu *menu = mutt_menu_new(MENU_POST);
   menu->make_entry = post_entry;
   menu->max = PostContext->msgcount;
   menu->title = _("Postponed Messages");
   menu->data = PostContext;
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_POST, PostponeHelp);
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   /* The postponed mailbox is setup to have sorting disabled, but the global
    * Sort variable may indicate something different.   Sorting has to be
@@ -245,7 +245,7 @@ static struct Header *select_msg(void)
   }
 
   Sort = orig_sort;
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
   return (r > -1 ? PostContext->hdrs[r] : NULL);
 }
diff --git a/query.c b/query.c
index 83a10477d32856135460efcc5779b25a978d05e7..faa6f64b5bdbc6247971cc734841b7b8a480692d 100644 (file)
--- a/query.c
+++ b/query.c
@@ -326,14 +326,14 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, int retb
   {
     snprintf(title, sizeof(title), _("Query '%s'"), buf);
 
-    menu = mutt_new_menu(MENU_QUERY);
+    menu = mutt_menu_new(MENU_QUERY);
     menu->make_entry = query_entry;
     menu->search = query_search;
     menu->tag = query_tag;
     menu->title = title;
     char helpstr[LONG_STRING];
     menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_QUERY, QueryHelp);
-    mutt_push_current_menu(menu);
+    mutt_menu_push_current(menu);
 
     /* count the number of results */
     for (queryp = results; queryp; queryp = queryp->next)
@@ -380,15 +380,15 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, int retb
               }
 
               menu->current = 0;
-              mutt_pop_current_menu(menu);
+              mutt_menu_pop_current(menu);
               mutt_menu_destroy(&menu);
-              menu = mutt_new_menu(MENU_QUERY);
+              menu = mutt_menu_new(MENU_QUERY);
               menu->make_entry = query_entry;
               menu->search = query_search;
               menu->tag = query_tag;
               menu->title = title;
               menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_QUERY, QueryHelp);
-              mutt_push_current_menu(menu);
+              mutt_menu_push_current(menu);
 
               /* count the number of results */
               for (queryp = results; queryp; queryp = queryp->next)
@@ -533,7 +533,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, int retb
 
     free_query(&results);
     FREE(&QueryTable);
-    mutt_pop_current_menu(menu);
+    mutt_menu_pop_current(menu);
     mutt_menu_destroy(&menu);
   }
 }
index 77f95638ca9981c8de29167015c31865f8caa70a..3b89e483acbad93d737e8496bdde5fc08edd34f3 100644 (file)
@@ -1168,12 +1168,12 @@ void mutt_view_attachments(struct Header *hdr)
   if (!msg)
     return;
 
-  menu = mutt_new_menu(MENU_ATTACH);
+  menu = mutt_menu_new(MENU_ATTACH);
   menu->title = _("Attachments");
   menu->make_entry = attach_entry;
   menu->tag = mutt_tag_attach;
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_ATTACH, AttachHelp);
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   actx = mutt_mem_calloc(sizeof(struct AttachCtx), 1);
   actx->hdr = hdr;
@@ -1430,7 +1430,7 @@ void mutt_view_attachments(struct Header *hdr)
 
         mutt_free_attach_context(&actx);
 
-        mutt_pop_current_menu(menu);
+        mutt_menu_pop_current(menu);
         mutt_menu_destroy(&menu);
         return;
     }
index 252e4463233107e347b5629edfb85ab199803f52..3ec59e837b67eab7fb169c48c9efd261f86ff2a4 100644 (file)
@@ -518,7 +518,7 @@ void mix_make_chain(struct ListHead *chainhead)
 
   mix_screen_coordinates(type2_list, &coords, chain, 0);
 
-  menu = mutt_new_menu(MENU_MIX);
+  menu = mutt_menu_new(MENU_MIX);
   menu->max = ttll;
   menu->make_entry = mix_entry;
   menu->tag = NULL;
@@ -526,7 +526,7 @@ void mix_make_chain(struct ListHead *chainhead)
   menu->data = type2_list;
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_MIX, RemailerHelp);
   menu->pagelen = MIX_VOFFSET - 1;
-  mutt_push_current_menu(menu);
+  mutt_menu_push_current(menu);
 
   while (loop)
   {
@@ -663,7 +663,7 @@ void mix_make_chain(struct ListHead *chainhead)
     }
   }
 
-  mutt_pop_current_menu(menu);
+  mutt_menu_pop_current(menu);
   mutt_menu_destroy(&menu);
 
   /* construct the remailer list */
diff --git a/score.c b/score.c
index 9db9be6d04feaa0891db48d232647b38eaa500a8..de30dc5867fa35eaaf8b59afe436234bac67e85d 100644 (file)
--- a/score.c
+++ b/score.c
@@ -62,8 +62,8 @@ void mutt_check_rescore(struct Context *ctx)
     }
 
     /* must redraw the index since the user might have %N in it */
-    mutt_set_menu_redraw_full(MENU_MAIN);
-    mutt_set_menu_redraw_full(MENU_PAGER);
+    mutt_menu_set_redraw_full(MENU_MAIN);
+    mutt_menu_set_redraw_full(MENU_PAGER);
 
     for (int i = 0; ctx && i < ctx->msgcount; i++)
     {
index 39af41502a6327147064db85a2be1054a1752dfa..5ef642a55d120ce7169d9b2474f23a89fdf0537c 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -1040,7 +1040,7 @@ void mutt_sb_change_mailbox(int op)
     default:
       return;
   }
-  mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+  mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
 }
 
 /**
@@ -1173,7 +1173,7 @@ void mutt_sb_notify_mailbox(struct Buffy *b, int created)
       Entries[del_index] = Entries[del_index + 1];
   }
 
-  mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+  mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
 }
 
 /**
@@ -1207,5 +1207,5 @@ void mutt_sb_toggle_virtual(void)
     }
   }
 
-  mutt_set_current_menu_redraw(REDRAW_SIDEBAR);
+  mutt_menu_set_current_redraw(REDRAW_SIDEBAR);
 }