[epiphany/wip/dazzle] suggestion: Disable suffix suggestion for now
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/dazzle] suggestion: Disable suffix suggestion for now
- Date: Wed, 30 Aug 2017 03:15:29 +0000 (UTC)
commit 2b0142fcb35ce181c16a5505995ab63ea1917c03
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Aug 29 22:14:55 2017 -0500
suggestion: Disable suffix suggestion for now
This is harder to get right than I expected
src/ephy-suggestion.c | 21 ---------------------
1 files changed, 0 insertions(+), 21 deletions(-)
---
diff --git a/src/ephy-suggestion.c b/src/ephy-suggestion.c
index 66dc5a5..94c4156 100644
--- a/src/ephy-suggestion.c
+++ b/src/ephy-suggestion.c
@@ -21,7 +21,6 @@
#include <dazzle.h>
#include <glib.h>
-#include <string.h>
struct _EphySuggestion {
DzlSuggestion parent;
@@ -30,25 +29,6 @@ struct _EphySuggestion {
G_DEFINE_TYPE (EphySuggestion, ephy_suggestion, DZL_TYPE_SUGGESTION)
char *
-ephy_suggestion_suggest_suffix (DzlSuggestion *self,
- const char *typed_text)
-{
- const char *suffix;
- const char *url;
-
- if (typed_text == NULL || strlen (typed_text) == 0 ||
- g_str_has_prefix ("www.", typed_text) ||
- g_str_has_prefix ("http://www.", typed_text) ||
- g_str_has_prefix ("https://www.", typed_text))
- return NULL;
-
- url = dzl_suggestion_get_id (self);
- suffix = strstr (url, typed_text);
-
- return suffix ? g_strdup (&suffix[strlen (typed_text)]) : NULL;
-}
-
-char *
ephy_suggestion_replace_typed_text (DzlSuggestion *self,
const char *typed_text)
{
@@ -62,7 +42,6 @@ ephy_suggestion_class_init (EphySuggestionClass *klass)
{
DzlSuggestionClass *dzl_suggestion_class = DZL_SUGGESTION_CLASS (klass);
- dzl_suggestion_class->suggest_suffix = ephy_suggestion_suggest_suffix;
dzl_suggestion_class->replace_typed_text = ephy_suggestion_replace_typed_text;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]