aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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))
{