[tracker] tracker-utils: Display nameGiven and nameFamily when fullname is empty
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-utils: Display nameGiven and nameFamily when fullname is empty
- Date: Wed, 26 Oct 2011 10:37:59 +0000 (UTC)
commit bb6185d16c7b0316b6c3641cf537190a0975695e
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Oct 26 12:36:39 2011 +0200
tracker-utils: Display nameGiven and nameFamily when fullname is empty
Fixes NB#287970.
src/tracker-utils/tracker-search.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-utils/tracker-search.c b/src/tracker-utils/tracker-search.c
index 25b5e58..7f2e1c1 100644
--- a/src/tracker-utils/tracker-search.c
+++ b/src/tracker-utils/tracker-search.c
@@ -281,7 +281,7 @@ get_contacts (TrackerSparqlConnection *connection,
fts = get_fts_string (search_terms, use_or_operator);
if (fts) {
- query = g_strdup_printf ("SELECT tracker:coalesce(nco:fullname(?contact), \"%s\") tracker:coalesce(nco:hasEmailAddress(?contact), \"%s\") ?contact "
+ query = g_strdup_printf ("SELECT tracker:coalesce(nco:fullname(?contact), fn:concat(nco:nameFamily(?contact), \" \", nco:nameGiven(?contact)),\"%s\") tracker:coalesce(nco:hasEmailAddress(?contact), \"%s\") ?contact "
"WHERE { "
" ?contact a nco:Contact ;"
" fts:match \"%s\" ."
@@ -289,21 +289,21 @@ get_contacts (TrackerSparqlConnection *connection,
"ORDER BY ASC(nco:fullname(?contact)) ASC(nco:hasEmailAddress(?contact)) "
"OFFSET %d "
"LIMIT %d",
- _("No Name"),
- _("No Address"),
+ _("No name"),
+ _("No E-mail address"),
fts,
search_offset,
search_limit);
} else {
- query = g_strdup_printf ("SELECT tracker:coalesce(nco:fullname(?contact), \"%s\") tracker:coalesce(nco:hasEmailAddress(?contact), \"%s\") ?contact "
+ query = g_strdup_printf ("SELECT tracker:coalesce(nco:fullname(?contact), fn:concat(nco:nameFamily(?contact), \" \", nco:nameGiven(?contact)), \"%s\") tracker:coalesce(nco:hasEmailAddress(?contact), \"%s\") ?contact "
"WHERE { "
" ?contact a nco:Contact ."
"} "
"ORDER BY ASC(nco:fullname(?contact)) ASC(nco:hasEmailAddress(?contact)) "
"OFFSET %d "
"LIMIT %d",
- _("No Name"),
- _("No Address"),
+ _("No name"),
+ _("No E-mail address"),
search_offset,
search_limit);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]