mu4e: use the new command-parser

Update mu4e-proc to use the new mu4e <-> mu protocol
This commit is contained in:
Dirk-Jan C. Binnema
2020-01-19 17:23:24 +02:00
parent c71f683e39
commit d2ec85f01c
7 changed files with 116 additions and 104 deletions

View File

@ -696,7 +696,11 @@ mu_cmd_execute (MuConfig *opts, GError **err)
case MU_CONFIG_CMD_TICKLE:
merr = with_store (mu_cmd_tickle, opts, FALSE, err); break;
case MU_CONFIG_CMD_SERVER:
merr = with_store (mu_cmd_server, opts, FALSE, err); break;
if (opts->commands)
merr = mu_cmd_server (NULL, opts, err);
else
merr = with_store (mu_cmd_server, opts, FALSE, err);
break;
default:
merr = MU_ERROR_IN_PARAMETERS; break;
}

View File

@ -441,8 +441,8 @@ config_options_group_server (void)
GOptionEntry entries[] = {
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &MU_CONFIG.maildir,
"top of the maildir", "<maildir>"},
{"list-commands", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.list_commands,
"overwrite existing files (false)", NULL},
{"commands", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.commands,
"list the available command and their parameters, then exit", NULL},
{NULL, 0, 0, 0, NULL, NULL, NULL}
};
@ -760,7 +760,6 @@ mu_config_uninit (MuConfig *opts)
memset (opts, 0, sizeof(MU_CONFIG));
}
size_t
mu_config_param_num (MuConfig *opts)
{

View File

@ -179,8 +179,8 @@ struct _MuConfig {
gboolean play; /* after saving, try to 'play'
* (open) the attmnt using xdgopen */
/* for server */
gboolean list_commands; /* dump documentations for server
* commands */
gboolean commands; /* dump documentations for server
* commands */
/* options for mu-script */
gchar *script; /* script to run */