NeoMutt  2024-04-25-89-g194907
Teaching an old dog new tricks
No Matches
dlg_mixmaster.c File Reference

Mixmaster Remailer Dialog. More...

#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "functions.h"
#include "mutt_logging.h"
#include "private_data.h"
#include "remailer.h"
#include "win_chain.h"
#include "win_hosts.h"
+ Include dependency graph for dlg_mixmaster.c:

Go to the source code of this file.


static int remailer_config_observer (struct NotifyCallback *nc)
 Notification that a Config Variable has changed - Implements observer_t -.
static int remailer_window_observer (struct NotifyCallback *nc)
 Notification that a Window has changed - Implements observer_t -.
static struct MuttWindowmix_dlg_new (struct MixmasterPrivateData *priv, struct RemailerArray *ra)
 Create a new Mixmaster Remailer Dialog.
void dlg_mixmaster (struct ListHead *chainhead)
 Create a Mixmaster chain -.


static const struct Mapping RemailerHelp []
 Help Bar for the Mixmaster dialog.

Detailed Description

Mixmaster Remailer Dialog.

  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Definition in file dlg_mixmaster.c.

Function Documentation

◆ mix_dlg_new()

static struct MuttWindow * mix_dlg_new ( struct MixmasterPrivateData priv,
struct RemailerArray *  ra 

Create a new Mixmaster Remailer Dialog.

privMixmaster private data
raArray of all Remailer hosts
Return values
ptrNew Mixmaster Remailer Dialog

Definition at line 140 of file dlg_mixmaster.c.

147 dlg->help_data = RemailerHelp;
148 dlg->wdata = priv;
150 priv->win_hosts = win_hosts_new(ra);
151 struct MuttWindow *win_cbar = sbar_new();
152 priv->win_chain = win_chain_new(win_cbar);
154 struct MuttWindow *win_rbar = sbar_new();
155 sbar_set_title(win_rbar, _("Select a remailer chain"));
157 const bool c_status_on_top = cs_subset_bool(NeoMutt->sub, "status_on_top");
158 if (c_status_on_top)
159 {
160 mutt_window_add_child(dlg, win_rbar);
162 mutt_window_add_child(dlg, win_cbar);
164 }
165 else
166 {
168 mutt_window_add_child(dlg, win_cbar);
170 mutt_window_add_child(dlg, win_rbar);
171 }
176 return dlg;
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:47
static const struct Mapping RemailerHelp[]
Help Bar for the Mixmaster dialog.
Definition: dlg_mixmaster.c:79
static int remailer_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition: dlg_mixmaster.c:93
static int remailer_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
#define _(a)
Definition: message.h:28
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:191
void mutt_window_add_child(struct MuttWindow *parent, struct MuttWindow *child)
Add a child to Window.
Definition: mutt_window.c:446
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
Definition: mutt_window.c:182
Mixmaster Dialog, dlg_mixmaster()
Definition: mutt_window.h:91
Window uses all available vertical space.
Definition: mutt_window.h:38
Use as much space as possible.
Definition: mutt_window.h:52
Window wants as much space as possible.
Definition: mutt_window.h:48
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:57
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
struct MuttWindow * sbar_new(void)
Add the Simple Bar (status)
Definition: sbar.c:203
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
Definition: sbar.c:227
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
Definition: subset.h:52
struct MuttWindow * win_chain
Chain Window.
Definition: private_data.h:32
struct MuttWindow * win_hosts
Hosts Window.
Definition: private_data.h:31
const struct Mapping * help_data
Data for the Help Bar.
Definition: mutt_window.h:142
void * wdata
Private data.
Definition: mutt_window.h:145
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
int help_menu
Menu for key bindings, e.g. MENU_PAGER.
Definition: mutt_window.h:141
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
Create/edit a Mixmaster chain.
Definition: type.h:53
struct MuttWindow * win_chain_new(struct MuttWindow *win_cbar)
Create a new Chain list Window.
Definition: win_chain.c:184
struct MuttWindow * win_hosts_new(struct RemailerArray *ra)
Create a new Hosts Window.
Definition: win_hosts.c:185
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ RemailerHelp

const struct Mapping RemailerHelp[]
Initial value:
= {
{ N_("Append"), OP_MIX_APPEND },
{ N_("Insert"), OP_MIX_INSERT },
{ N_("Delete"), OP_MIX_DELETE },
{ N_("Abort"), OP_EXIT },
{ N_("OK"), OP_MIX_USE },
{ NULL, 0 },
#define N_(a)
Definition: message.h:32

Help Bar for the Mixmaster dialog.

Definition at line 79 of file dlg_mixmaster.c.