diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/config.c b/src/config.c index dd444fe..94afb20 100644 --- a/src/config.c +++ b/src/config.c @@ -260,17 +260,12 @@ cb_mailer (enum gconf_callback_command cmd, void *cb_data) { int rc; if (assert_string_arg (locus, cmd, value)) return 1; - if (cmd != gconf_callback_set_value) - { - gconf_error (locus, 0, _("Unexpected block statement")); - return 1; - } rc = mu_mailer_create (&mailer, value->v.string); if (rc) gconf_error (locus, 0, _("cannot create mailer `%s': %s"), value->v.string, mu_strerror (rc)); return rc; } @@ -1082,28 +1077,23 @@ cb_access_method (enum gconf_callback_command cmd, gconf_error (locus, 0, _("invalid use of block statement")); } return 0; } static int -cb_destination_url (enum gconf_callback_command cmd, - gconf_locus_t *locus, - void *varptr, - gconf_value_t *value, - void *cb_data) +cb_url (enum gconf_callback_command cmd, + gconf_locus_t *locus, + void *varptr, + gconf_value_t *value, + void *cb_data) { mu_url_t *purl = varptr, url; int rc; if (assert_string_arg (locus, cmd, value)) return 1; - if (cmd != gconf_callback_set_value) - { - gconf_error (locus, 0, _("Unexpected block statement")); - return 1; - } rc = mu_url_create (&url, value->v.string); if (rc) { gconf_error (locus, 0, _("cannot create URL `%s': %s"), value->v.string, mu_strerror (rc)); return rc; @@ -1119,17 +1109,21 @@ cb_destination_url (enum gconf_callback_command cmd, *purl = url; return 0; } static struct gconf_keyword spool_kw[] = { + { "url", N_("arg"), N_("URL corresponding to this spool"), + gconf_type_string, NULL, offsetof(struct spool, url) }, + { "alias", N_("arg"), N_("Aliases"), + gconf_type_string|GCONF_LIST, NULL, offsetof(struct spool, aliases) }, { "source", N_("dir"), N_("Source directory"), gconf_type_string, NULL, offsetof(struct spool, source_dir) }, { "destination", N_("dir"), N_("Destination directory"), gconf_type_string, NULL, offsetof(struct spool, dest_url), - cb_destination_url }, + cb_url }, { "file-sweep-time", N_("interval"), N_("Define file sweep time"), gconf_type_string, NULL, offsetof(struct spool, file_sweep_time), cb_interval }, { "access-method", N_("ident"), N_("Define access method"), gconf_type_section, NULL, offsetof(struct spool, access_method), cb_access_method, NULL, access_method_kw }, @@ -1161,13 +1155,13 @@ cb_spool (enum gconf_callback_command cmd, if (!value || value->type != GCONF_TYPE_STRING) { gconf_error (locus, 0, _("tag must be a string")); return 1; } spool = xzalloc (sizeof (*spool)); - spool->url = xstrdup (value->v.string); + spool->tag = xstrdup (value->v.string); spool->file_sweep_time = file_sweep_time; for (i = 0; i < NITEMS (spool->access_method); i++) spool->access_method[i] = default_access_method[i]; spool->archive = default_archive_descr; *pdata = spool; break; @@ -1230,12 +1224,24 @@ cb_spool (enum gconf_callback_command cmd, return 0; } static struct gconf_keyword wydawca_kw[] = { + { "daemon", NULL, N_("Enable daemon mode"), + gconf_type_bool, &daemon_mode }, + { "foreground", NULL, N_("Start in foreground even in daemon mode"), + gconf_type_bool, &foreground }, + { "single-process", NULL, N_("Do not spawn subprocesses"), + gconf_type_bool, &single_process }, + { "wakeup-interval", N_("time"), N_("Set wake-up interval"), + gconf_type_string, &wakeup_interval, 0, cb_interval }, + { "pidfile", N_("file"), N_("Set pid file name"), + gconf_type_string, &pidfile }, + { "listen", N_("socket"), N_("Listen on this address"), + gconf_type_sockaddr, &listen_sockaddr, }, { "mailer", N_("url"), N_("Set mailer URL"), gconf_type_string, &mailer, 0, cb_mailer }, { "admin-address", N_("email"), N_("Set admin email address"), gconf_type_string, &admin_address, 0, cb_email_address }, { "from-address", N_("email"), N_("Set sender email address"), gconf_type_string, &from_address, 0, cb_email_address }, |