aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-completion-model.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-05-02 01:13:10 +0800
committerXan Lopez <xan@src.gnome.org>2007-05-02 01:13:10 +0800
commitbe0b0b965e05963d42b9bf21899b4675b0a18e24 (patch)
tree89e6027cce96af82bb45b68f20923cd945bb9fa1 /src/ephy-completion-model.c
parent9a3819459ea8edf60d3674cb0150566a2c2e1824 (diff)
downloadgsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.tar
gsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.tar.gz
gsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.tar.bz2
gsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.tar.lz
gsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.tar.xz
gsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.tar.zst
gsoc2013-epiphany-be0b0b965e05963d42b9bf21899b4675b0a18e24.zip
Copy the items on the completion list as the user moves through them. The
* lib/widgets/ephy-location-entry.c: * lib/widgets/ephy-location-entry.h: * src/ephy-completion-model.c: * src/ephy-completion-model.h: * src/ephy-location-action.c: Copy the items on the completion list as the user moves through them. The original input can be restored pressing Esc. The tentative completion can be made definitive pressing Left or Right. Fixes #409291, #102528 svn path=/trunk/; revision=7020
Diffstat (limited to 'src/ephy-completion-model.c')
-rw-r--r--src/ephy-completion-model.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 566cc4a0d..c2699ccac 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2002 Jorn Baayen <jorn@nl.linux.org>
*
@@ -444,6 +445,29 @@ init_relevance_col (GValue *value, EphyNode *node, int group)
}
static void
+init_url_col (GValue *value, EphyNode *node, int group)
+{
+ const char *url = NULL;
+
+ if (group == BOOKMARKS_GROUP)
+ {
+ url = ephy_node_get_property_string
+ (node, EPHY_NODE_BMK_PROP_LOCATION);
+ }
+ else if (group == HISTORY_GROUP)
+ {
+ url = ephy_node_get_property_string
+ (node, EPHY_NODE_PAGE_PROP_LOCATION);
+ }
+ else
+ {
+ url = "";
+ }
+
+ g_value_set_string (value, url);
+}
+
+static void
ephy_completion_model_get_value (GtkTreeModel *tree_model,
GtkTreeIter *iter,
int column,
@@ -494,6 +518,10 @@ ephy_completion_model_get_value (GtkTreeModel *tree_model,
g_value_init (value, G_TYPE_INT);
init_relevance_col (value, node, group);
break;
+ case EPHY_COMPLETION_URL_COL:
+ g_value_init (value, G_TYPE_STRING);
+ init_url_col (value, node, group);
+ break;
}
}