aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/ephy-completion-model.c28
-rw-r--r--src/ephy-completion-model.h1
-rw-r--r--src/ephy-location-action.c3
3 files changed, 31 insertions, 1 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;
}
}
diff --git a/src/ephy-completion-model.h b/src/ephy-completion-model.h
index a264ad2fd..6df64d288 100644
--- a/src/ephy-completion-model.h
+++ b/src/ephy-completion-model.h
@@ -42,6 +42,7 @@ typedef enum
EPHY_COMPLETION_RELEVANCE_COL,
EPHY_COMPLETION_EXTRA_COL,
EPHY_COMPLETION_FAVICON_COL,
+ EPHY_COMPLETION_URL_COL,
N_COL
} EphyCompletionColumn;
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 59aa51573..9c30f0dc6 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -370,7 +370,8 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
EPHY_COMPLETION_KEYWORDS_COL,
EPHY_COMPLETION_RELEVANCE_COL,
EPHY_COMPLETION_EXTRA_COL,
- EPHY_COMPLETION_FAVICON_COL);
+ EPHY_COMPLETION_FAVICON_COL,
+ EPHY_COMPLETION_URL_COL);
add_completion_actions (action, proxy);