NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
mdata_free()

Free the private data attached to the Menu. More...

+ Collaboration diagram for mdata_free():

Functions

static void autocrypt_menu_free (struct Menu *menu, void **ptr)
 Free the Autocrypt account Menu - Implements Menu::mdata_free() -. More...
 
void attach_data_free (struct Menu *menu, void **ptr)
 Free the Compose Attach Data - Implements Menu::mdata_free() -. More...
 
static void gpgme_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static void pgp_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static void smime_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static void free_pattern_menu (struct Menu *menu, void **ptr)
 Free the Pattern Completion menu - Implements Menu::mdata_free() -. More...
 

Detailed Description

Free the private data attached to the Menu.

Parameters
menuMenu
ptrMenu data to free

Contract

Function Documentation

◆ autocrypt_menu_free()

static void autocrypt_menu_free ( struct Menu menu,
void **  ptr 
)
static

Free the Autocrypt account Menu - Implements Menu::mdata_free() -.

Definition at line 205 of file dlgautocrypt.c.

206 {
207  struct AccountEntry *entries = *ptr;
208 
209  for (size_t i = 0; i < menu->max; i++)
210  {
212  mutt_addr_free(&entries[i].addr);
213  }
214 
215  FREE(ptr);
216 }
void mutt_autocrypt_db_account_free(struct AutocryptAccount **ptr)
Free an AutocryptAccount.
Definition: db.c:246
void mutt_addr_free(struct Address **ptr)
Free a single Address.
Definition: address.c:440
An entry in the Autocrypt account Menu.
Definition: dlgautocrypt.c:89
struct Address * addr
Definition: dlgautocrypt.c:93
int max
Number of entries in the menu.
Definition: lib.h:71
struct AutocryptAccount * account
Definition: dlgautocrypt.c:92
#define FREE(x)
Definition: memory.h:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attach_data_free()

void attach_data_free ( struct Menu menu,
void **  ptr 
)

Free the Compose Attach Data - Implements Menu::mdata_free() -.

Definition at line 37 of file attach_data.c.

38 {
39  struct ComposeAttachData *attach_data = *ptr;
40 
41  mutt_actx_free(&attach_data->actx);
42 
43  FREE(ptr);
44 }
Data to fill the Compose Attach Window.
Definition: attach_data.h:32
struct AttachCtx * actx
Definition: attach_data.h:34
#define FREE(x)
Definition: memory.h:40
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:140
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gpgme_key_table_free()

static void gpgme_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 1249 of file dlggpgme.c.

1250 {
1251  FREE(ptr);
1252 }
#define FREE(x)
Definition: memory.h:40
+ Here is the caller graph for this function:

◆ pgp_key_table_free()

static void pgp_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 522 of file dlgpgp.c.

523 {
524  FREE(ptr);
525 }
#define FREE(x)
Definition: memory.h:40
+ Here is the caller graph for this function:

◆ smime_key_table_free()

static void smime_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 184 of file dlgsmime.c.

185 {
186  FREE(ptr);
187 }
#define FREE(x)
Definition: memory.h:40
+ Here is the caller graph for this function:

◆ free_pattern_menu()

static void free_pattern_menu ( struct Menu menu,
void **  ptr 
)
static

Free the Pattern Completion menu - Implements Menu::mdata_free() -.

Definition at line 160 of file dlgpattern.c.

161 {
162  struct PatternEntry *entries = *ptr;
163 
164  for (size_t i = 0; i < menu->max; i++)
165  {
166  FREE(&entries[i].tag);
167  FREE(&entries[i].expr);
168  FREE(&entries[i].desc);
169  }
170 
171  FREE(ptr);
172 }
const char * expr
Displayed in the menu.
Definition: dlgpattern.c:94
const char * tag
Copied to buffer if selected.
Definition: dlgpattern.c:93
int max
Number of entries in the menu.
Definition: lib.h:71
#define FREE(x)
Definition: memory.h:40
const char * desc
Description of pattern.
Definition: dlgpattern.c:95
A line in the Pattern Completion menu.
Definition: dlgpattern.c:90
+ Here is the caller graph for this function: