NeoMutt  2024-04-16-36-g75b6fb
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mdata_free()

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

+ Collaboration diagram for mdata_free():

Functions

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

Detailed Description

Free the private data attached to the Menu.

Parameters
menuMenu
ptrMenu data to free
Precondition
menu is not NULL
ptr is not NULL
*ptr is not NULL

Function Documentation

◆ attach_private_data_free()

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

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

Parameters
menuMenu
ptrAttach Data to free

Definition at line 38 of file private_data.c.

39{
40 if (!ptr || !*ptr)
41 return;
42
43 FREE(ptr);
44}
#define FREE(x)
Definition: memory.h:45
+ Here is the caller graph for this function:

◆ 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 216 of file dlg_autocrypt.c.

217{
218 struct AccountEntry *entries = *ptr;
219
220 for (size_t i = 0; i < menu->max; i++)
221 {
223 mutt_addr_free(&entries[i].addr);
224 }
225
226 FREE(ptr);
227}
void mutt_addr_free(struct Address **ptr)
Free a single Address.
Definition: address.c:462
void mutt_autocrypt_db_account_free(struct AutocryptAccount **ptr)
Free an AutocryptAccount.
Definition: db.c:247
An entry in the Autocrypt account Menu.
Definition: private.h:45
struct Address * addr
Email address associated with the account.
Definition: private.h:48
struct AutocryptAccount * account
Account details.
Definition: private.h:47
int max
Number of entries in the menu.
Definition: lib.h:81
+ 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 if (!ptr || !*ptr)
40 return;
41
42 struct ComposeAttachData *attach_data = *ptr;
43
44 mutt_actx_free(&attach_data->actx);
45
46 FREE(ptr);
47}
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
Data to fill the Compose Attach Window.
Definition: attach_data.h:33
struct AttachCtx * actx
Set of attachments.
Definition: attach_data.h:34
+ 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 566 of file dlg_gpgme.c.

567{
568 FREE(ptr);
569}
+ 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 560 of file dlg_pgp.c.

561{
562 FREE(ptr);
563}
+ 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 187 of file dlg_smime.c.

188{
189 FREE(ptr);
190}
+ 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 155 of file dlg_pattern.c.

156{
157 struct PatternEntry *entries = *ptr;
158
159 for (size_t i = 0; i < menu->max; i++)
160 {
161 FREE(&entries[i].tag);
162 FREE(&entries[i].expr);
163 FREE(&entries[i].desc);
164 }
165
166 FREE(ptr);
167}
A line in the Pattern Completion menu.
Definition: private.h:37
const char * desc
Description of pattern.
Definition: private.h:41
const char * tag
Copied to buffer if selected.
Definition: private.h:39
const char * expr
Displayed in the menu.
Definition: private.h:40
+ Here is the caller graph for this function: