* mu-config: make cleanup the default, and nocleanup an option; + some cosmetics

This commit is contained in:
Dirk-Jan C. Binnema 2010-01-08 20:54:55 +02:00
parent 5a1be9fa01
commit c2ff9b3f25
2 changed files with 10 additions and 16 deletions

View File

@ -17,6 +17,8 @@
** **
*/ */
#include "config.h"
#include <glib.h> #include <glib.h>
#include <string.h> /* memset */ #include <string.h> /* memset */
@ -63,8 +65,8 @@ mu_config_options_group_index (MuConfigOptions *opts)
"top of the maildir", NULL}, "top of the maildir", NULL},
{"reindex", 'r', 0, G_OPTION_ARG_NONE, &opts->reindex, {"reindex", 'r', 0, G_OPTION_ARG_NONE, &opts->reindex,
"index already indexed messages too", NULL}, "index already indexed messages too", NULL},
{"cleanup", 'u', 0, G_OPTION_ARG_NONE, &opts->cleanup, {"nocleanup", 'u', 0, G_OPTION_ARG_NONE, &opts->nocleanup,
"cleanup database after indexing", NULL}, "don't clean up the database after indexing", NULL},
{ NULL, 0, 0, 0, NULL, NULL, NULL } { NULL, 0, 0, 0, NULL, NULL, NULL }
}; };
@ -77,7 +79,7 @@ mu_config_options_group_index (MuConfigOptions *opts)
} }
GOptionGroup* GOptionGroup*
mu_config_options_group_query (MuConfigOptions *opts) mu_config_options_group_find (MuConfigOptions *opts)
{ {
GOptionGroup *og; GOptionGroup *og;
GOptionEntry entries[] = { GOptionEntry entries[] = {
@ -96,8 +98,8 @@ mu_config_options_group_query (MuConfigOptions *opts)
{ NULL, 0, 0, 0, NULL, NULL, NULL } { NULL, 0, 0, 0, NULL, NULL, NULL }
}; };
og = g_option_group_new ("query", og = g_option_group_new ("find",
"options for the 'query' command", "options for the 'find' command",
"", NULL, NULL); "", NULL, NULL);
g_option_group_add_entries (og, entries); g_option_group_add_entries (og, entries);

View File

@ -41,7 +41,7 @@ struct _MuConfigOptions {
/* options for indexing */ /* options for indexing */
char *maildir; /* where the mails are */ char *maildir; /* where the mails are */
gboolean cleanup; /* cleanup deleted mails from db */ gboolean nocleanup; /* don't cleanup deleted mails from db */
gboolean reindex; /* re-index existing mails */ gboolean reindex; /* re-index existing mails */
/* options for querying */ /* options for querying */
@ -101,22 +101,14 @@ GOptionGroup* mu_config_options_group_mu (MuConfigOptions *opts);
GOptionGroup* mu_config_options_group_index (MuConfigOptions *opts); GOptionGroup* mu_config_options_group_index (MuConfigOptions *opts);
/** /**
* get the query-options option group * get the find-options option group
* *
* @param opts the MuConfigOptions to fill from this option group * @param opts the MuConfigOptions to fill from this option group
* *
* @return a new option group; *DON'T* unref when added to an optioncontext * @return a new option group; *DON'T* unref when added to an optioncontext
*/ */
GOptionGroup* mu_config_options_group_query (MuConfigOptions *opts); GOptionGroup* mu_config_options_group_find (MuConfigOptions *opts);
/**
*
*
* @param opts
*
* @return
*/
char* mu_config_expanded_mu_home (MuConfigOptions *opts);
G_END_DECLS G_END_DECLS