aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-21 06:37:42 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-21 06:37:42 +0800
commitb2b76e137020df45176f40f80afac433a0f368d9 (patch)
tree49946212d36580d87bd0cda91485f6587f4131b7
parent7e816a76bac00b8c34bec6849d175bd478af2f16 (diff)
downloadgsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.tar
gsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.tar.gz
gsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.tar.bz2
gsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.tar.lz
gsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.tar.xz
gsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.tar.zst
gsoc2013-epiphany-b2b76e137020df45176f40f80afac433a0f368d9.zip
Ensure that there are no more chars after the last /. Cut down number of
2004-02-20 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-completion-model.c: (is_base_address), (init_relevance_col): Ensure that there are no more chars after the last /. Cut down number of visists properly.
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-completion-model.c13
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e7d032d26..f7d19d9de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-20 Marco Pesenti Gritti <marco@gnome.org>
+
+ * src/ephy-completion-model.c: (is_base_address),
+ (init_relevance_col):
+
+ Ensure that there are no more chars after the last /.
+ Cut down number of visists properly.
+
2004-02-20 Christian Persch <chpe@cvs.gnome.org>
* lib/egg/egg-editable-toolbar.c: (popup_toolbar_context_menu_cb):
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 851174fc3..a3766cfcc 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -358,13 +358,16 @@ is_base_address (const char *address)
{
if (*address == '/') slashes++;
- /* Base uris has 3 slashes like http://www.gnome.org/ */
- if (slashes == 4) return FALSE;
-
address++;
+
+ /* Base uris has 3 slashes like http://www.gnome.org/ */
+ if (slashes == 3)
+ {
+ return (*address == '\0');
+ }
}
- return TRUE;
+ return FALSE;
}
static void
@@ -389,7 +392,7 @@ init_relevance_col (GValue *value, EphyNode *node, int group)
address = ephy_node_get_property_string
(node, EPHY_NODE_PAGE_PROP_LOCATION);
- visits = MAX (visits, (1 << 5) - 1);
+ visits = MIN (visits, (1 << 5) - 1);
if (is_base_address (address))
{