diff options
-rw-r--r-- | widgets/text/e-completion-match.c | 21 | ||||
-rw-r--r-- | widgets/text/e-completion-view.c | 2 | ||||
-rw-r--r-- | widgets/text/e-completion.c | 1 |
3 files changed, 11 insertions, 13 deletions
diff --git a/widgets/text/e-completion-match.c b/widgets/text/e-completion-match.c index e00d5c8bdb..a3e69cb2ed 100644 --- a/widgets/text/e-completion-match.c +++ b/widgets/text/e-completion-match.c @@ -141,11 +141,10 @@ e_completion_match_compare (const ECompletionMatch *a, const ECompletionMatch *b return 0; } -/* Copied from the above, with one addition. */ gint e_completion_match_compare_alpha (const ECompletionMatch *a, const ECompletionMatch *b) { - gint rv; + gint rv, rv2; /* Deal with NULL arguments. */ if (!(a || b)) { @@ -158,17 +157,17 @@ e_completion_match_compare_alpha (const ECompletionMatch *a, const ECompletionMa if ( (rv = (b->score > a->score) - (a->score > b->score)) ) return rv; - /* Consider the menu text in the sort. */ - if ( (rv = strcmp (a->menu_text, b->menu_text)) ) - return rv; - - if ( (rv = (b->sort_major < a->sort_major) - (a->sort_major < b->sort_major)) ) - return rv; + /* When the match text is the same, we use the major and minor fields */ + rv2 = strcmp (a->match_text, b->match_text); + if (!rv2) { + if ( (rv = (b->sort_major < a->sort_major) - (a->sort_major < b->sort_major)) ) + return rv; - if ( (rv = (b->sort_minor < a->sort_minor) - (a->sort_minor < b->sort_minor)) ) - return rv; + if ( (rv = (b->sort_minor < a->sort_minor) - (a->sort_minor < b->sort_minor)) ) + return rv; + } - return 0; + return strcmp (a->menu_text, b->menu_text); } ECompletionMatch * diff --git a/widgets/text/e-completion-view.c b/widgets/text/e-completion-view.c index e62209efe6..53bb24bc3d 100644 --- a/widgets/text/e-completion-view.c +++ b/widgets/text/e-completion-view.c @@ -584,7 +584,7 @@ end_completion_cb (ECompletion *completion, gpointer user_data) /*** Table Callbacks ***/ static char *simple_spec = -"<ETableSpecification no-headers=\"true\" draw-grid=\"false\" cursor-mode=\"line\"> " +"<ETableSpecification no-headers=\"true\" draw-grid=\"false\" cursor-mode=\"line\" alternating-row-colors=\"false\">" " <ETableColumn model_col=\"0\" _title=\"Node\" expansion=\"1.0\" " " minimum_width=\"16\" resizable=\"true\" cell=\"string\" " " compare=\"string\"/> " diff --git a/widgets/text/e-completion.c b/widgets/text/e-completion.c index f15ce3027e..0ede90a088 100644 --- a/widgets/text/e-completion.c +++ b/widgets/text/e-completion.c @@ -320,7 +320,6 @@ e_completion_sort (ECompletion *complete) sort_list = g_list_sort (sort_list, (GCompareFunc) e_completion_match_compare_alpha); - diff = FALSE; count = 0; i = complete->priv->matches; |