aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-06-09 02:31:27 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-06-09 02:31:27 +0800
commit04aed95972de36157dc05b849b7433448458d0bc (patch)
treec5577123ad67d78b328320c85d449a959c4c3266 /widgets/text
parent216d52cd439642b64f0ea789ed68591a7a278c5a (diff)
downloadgsoc2013-evolution-04aed95972de36157dc05b849b7433448458d0bc.tar.gz
gsoc2013-evolution-04aed95972de36157dc05b849b7433448458d0bc.tar.zst
gsoc2013-evolution-04aed95972de36157dc05b849b7433448458d0bc.zip
Turned off alternating row colors in our ETable specification.
2001-06-08 Jon Trowbridge <trow@ximian.com> * gal/e-text/e-completion-view.c: Turned off alternating row colors in our ETable specification. * gal/e-text/e-completion-match.c (e_completion_match_compare_alpha): Fix the sort routine to properly use the major & minor keys for sorting grouped elements with the same match text. I had this all wrong. svn path=/trunk/; revision=10159
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-completion-match.c21
-rw-r--r--widgets/text/e-completion-view.c2
-rw-r--r--widgets/text/e-completion.c1
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;