[gnome-contacts] Utils: remove canonincalize_for_search()
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Utils: remove canonincalize_for_search()
- Date: Sun, 21 Jan 2018 14:11:24 +0000 (UTC)
commit 96bf15bc55f85504971627e465eda927356e4e40
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Jan 21 15:10:32 2018 +0100
Utils: remove canonincalize_for_search()
Since we switched to Folks.Query for our searches, we no longer need
this function.
src/contacts-utils.vala | 30 ------------------------------
1 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index 6f16fbc..c1db1ab 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -172,21 +172,6 @@ namespace Contacts.Utils {
return null;
}
- private unichar strip_char (unichar ch) {
- switch (ch.type ()) {
- case UnicodeType.CONTROL:
- case UnicodeType.FORMAT:
- case UnicodeType.UNASSIGNED:
- case UnicodeType.NON_SPACING_MARK:
- case UnicodeType.COMBINING_MARK:
- case UnicodeType.ENCLOSING_MARK:
- /* Ignore those */
- return 0;
- default:
- return ch.tolower ();
- }
- }
-
/* Returns false if the given string contains at least one non-"space"
* character.
*/
@@ -201,21 +186,6 @@ namespace Contacts.Utils {
return true;
}
- public string canonicalize_for_search (string str) {
- unowned string s;
- var buf = new unichar[18];
- var res = new StringBuilder ();
- for (s = str; s[0] != 0; s = s.next_char ()) {
- var c = strip_char (s.get_char ());
- if (c != 0) {
- var size = c.fully_decompose (false, buf);
- if (size > 0)
- res.append_unichar (buf[0]);
- }
- }
- return res.str;
- }
-
public void grab_entry_focus_no_select (Entry entry) {
int start, end;
if (!entry.get_selection_bounds (out start, out end)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]