Skip to content

Commit

Permalink
window: find the simple bar
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed May 5, 2021
1 parent fa1db57 commit 5907f8c
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion alias/dlgalias.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static void dlg_select_alias(char *buf, size_t buflen, struct AliasMenuData *mda
menu->max = alias_array_count_visible(&mdata->ava);
menu->mdata = mdata;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);

char *title = menu_create_alias_title(_("Aliases"), mdata->str);
sbar_set_title(sbar, title);
Expand Down
2 changes: 1 addition & 1 deletion alias/dlgquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void dlg_select_query(char *buf, size_t buflen, struct AliasList *all,
snprintf(title, sizeof(title), "%s%s", _("Query: "), buf);

struct MuttWindow *dlg = dialog_create_simple_index(MENU_QUERY, WT_DLG_QUERY, QueryHelp);
struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);

struct Menu *menu = dlg->wdata;
menu->make_entry = query_make_entry;
Expand Down
2 changes: 1 addition & 1 deletion autocrypt/dlgautocrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static struct Menu *create_menu(struct MuttWindow *dlg)
menu->make_entry = account_make_entry;
/* menu->tag = account_tag; */

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
// L10N: Autocrypt Account Management Menu title
sbar_set_title(sbar, _("Autocrypt Accounts"));

Expand Down
2 changes: 1 addition & 1 deletion browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ void mutt_buffer_select_file(struct Buffer *file, SelectFileFlags flags,
if (multiple)
menu->tag = file_tag;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, title);

if (mailbox)
Expand Down
2 changes: 1 addition & 1 deletion conn/dlgverifycert.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int dlg_verify_certificate(const char *title, struct ListHead *list,

struct Menu *menu = dlg->wdata;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, title);

struct ListNode *np = NULL;
Expand Down
2 changes: 1 addition & 1 deletion history/dlghistory.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void dlg_select_history(char *buf, size_t buflen, char **matches, int match_coun
struct MuttWindow *dlg =
dialog_create_simple_index(MENU_GENERIC, WT_DLG_HISTORY, HistoryHelp);

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, title);

struct Menu *menu = dlg->wdata;
Expand Down
2 changes: 1 addition & 1 deletion ncrypt/dlggpgme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ struct CryptKeyInfo *dlg_select_gpgme_key(struct CryptKeyInfo *keys,
snprintf(buf, sizeof(buf), _("%s \"%s\""), ts, s);
}

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, buf);
}

Expand Down
2 changes: 1 addition & 1 deletion ncrypt/dlgpgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ struct PgpKeyInfo *dlg_select_pgp_key(struct PgpKeyInfo *keys,
else
snprintf(buf, sizeof(buf), _("PGP keys matching \"%s\""), s);

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, buf);

kp = NULL;
Expand Down
2 changes: 1 addition & 1 deletion ncrypt/dlgsmime.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct SmimeKey *dlg_select_smime_key(struct SmimeKey *keys, char *query)
/* sorting keys might be done later - TODO */

char title[256];
struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
snprintf(title, sizeof(title), _("S/MIME certificates matching \"%s\""), query);
sbar_set_title(sbar, title);

Expand Down
2 changes: 1 addition & 1 deletion pattern/dlgpattern.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static struct Menu *create_pattern_menu(struct MuttWindow *dlg)
menu->mdata = entries = mutt_mem_calloc(num_entries, sizeof(struct PatternEntry));
menu->max = num_entries;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
// L10N: Pattern completion menu title
sbar_set_title(sbar, _("Patterns"));

Expand Down
2 changes: 1 addition & 1 deletion postpone.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static struct Email *dlg_select_postponed_email(struct Mailbox *m)
menu->mdata = m;
menu->custom_search = true;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, _("Postponed Messages"));

/* The postponed mailbox is setup to have sorting disabled, but the global
Expand Down
2 changes: 1 addition & 1 deletion recvattach.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ void dlg_select_attachment(struct ConfigSubset *sub, struct Mailbox *m,
menu->make_entry = attach_make_entry;
menu->tag = attach_tag;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, _("Attachments"));

struct AttachCtx *actx = mutt_actx_new();
Expand Down
2 changes: 1 addition & 1 deletion remailer.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ void dlg_select_mixmaster_chain(struct ListHead *chainhead)
menu->mdata = type2_list;
menu->pagelen = MIX_VOFFSET - 1;

struct MuttWindow *sbar = TAILQ_LAST(&dlg->children, MuttWindowList);
struct MuttWindow *sbar = mutt_window_find(dlg, WT_INDEX_BAR);
sbar_set_title(sbar, _("Select a remailer chain"));

while (loop)
Expand Down

0 comments on commit 5907f8c

Please sign in to comment.