* src/, man/, NEWS: rename --descending into --reverse

This commit is contained in:
Dirk-Jan C. Binnema
2011-09-22 21:00:52 +03:00
parent 3d41a0fe3d
commit e2fc573d42
7 changed files with 56 additions and 56 deletions

View File

@ -129,7 +129,7 @@ run_query (MuQuery *xapian, const gchar *query, MuConfig *opts,
}
iter = mu_query_run (xapian, query, opts->threads, sortid,
opts->descending ? FALSE : TRUE, err);
opts->reverse, err);
return iter;
}

View File

@ -166,12 +166,8 @@ set_group_find_defaults (MuConfig *opts)
* *are* specified, we sort in ascending order. */
if (!opts->fields) {
opts->fields = "d f s";
if (!opts->sortfield) {
if (!opts->sortfield)
opts->sortfield = "d";
opts->descending = TRUE;
} else
opts->descending = FALSE;
}
if (!opts->formatstr) /* by default, use plain output */
@ -203,8 +199,8 @@ config_options_group_find (MuConfig *opts)
"show message threads", NULL},
{"bookmark", 'b', 0, G_OPTION_ARG_STRING, &opts->bookmark,
"use a bookmarked query", NULL},
{"descending", 'z', 0, G_OPTION_ARG_NONE, &opts->descending,
"sort in descending order (z -> a)", NULL},
{"reverse", 'z', 0, G_OPTION_ARG_NONE, &opts->reverse,
"sort in reverse (descending) order (z -> a)", NULL},
{"summary", 'k', 0, G_OPTION_ARG_NONE, &opts->summary,
"include a short summary of the message (false)", NULL},
{"linksdir", 0, 0, G_OPTION_ARG_STRING, &opts->linksdir,

View File

@ -111,7 +111,7 @@ struct _MuConfig {
/* options for querying 'find' (and view-> 'summary') */
char *fields; /* fields to show in output */
char *sortfield; /* field to sort by (string) */
gboolean descending; /* sort descending (z->a)? */
gboolean reverse; /* sort in revers order (z->a) */
gboolean threads; /* show message threads */
gboolean summary; /* include a summary? */
char *bookmark; /* use bookmark */

View File

@ -296,7 +296,7 @@ mu_query_preprocess (const char *query)
MuMsgIter*
mu_query_run (MuQuery *self, const char* searchexpr, gboolean threads,
MuMsgFieldId sortfieldid, gboolean ascending,
MuMsgFieldId sortfieldid, gboolean reverse,
GError **err)
{
g_return_val_if_fail (self, NULL);
@ -311,8 +311,7 @@ mu_query_run (MuQuery *self, const char* searchexpr, gboolean threads,
* there, and don't let Xapian do any sorting */
if (!threads && sortfieldid != MU_MSG_FIELD_ID_NONE)
enq.set_sort_by_value ((Xapian::valueno)sortfieldid,
ascending ? true : false);
reverse ? true : false);
if (!mu_str_is_empty(searchexpr)) /* NULL or "" */
enq.set_query(get_query (self, searchexpr, err));
else

View File

@ -73,8 +73,8 @@ char* mu_query_version (MuQuery *store)
* @param threads calculate message-threads
* @param sortfield the field id to sort by or MU_MSG_FIELD_ID_NONE if
* sorting is not desired
* @param ascending if TRUE sort in ascending (A-Z) order, otherwise,
* sort in descending (Z-A) order
* @param reverse if TRUE, sort in descending (Z-A) order, otherwise,
* sort in descending (A-Z) order
* @param err receives error information (if there is any); if
* function returns non-NULL, err will _not_be set. err can be NULL
* possible error (err->code) is MU_ERROR_QUERY,