aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-location-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-27 01:41:04 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-27 01:41:04 +0800
commitfc69f229f306940d351fd20606fe6a77104ef48d (patch)
tree4ebf2c194552d38c330a9ac974b5c38abe1b198c /src/ephy-location-action.c
parent185ea56fa4d1b5626ff1418a90d979f3cc15b108 (diff)
downloadgsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.tar
gsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.tar.gz
gsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.tar.bz2
gsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.tar.lz
gsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.tar.xz
gsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.tar.zst
gsoc2013-epiphany-fc69f229f306940d351fd20606fe6a77104ef48d.zip
Unify bookmarks/smart bookmarks address resolution, and add a signal to
2005-07-26 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-marshal.list: * src/bookmarks/ephy-bookmark-action.c: (open_in_tab_activate_cb), (open_in_window_activate_cb), (activate_cb): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_class_init), (impl_resolve_address), (ephy_bookmarks_resolve_address): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-topic-action.c: (menu_activate_cb), (open_in_tabs_activate_cb): * src/ephy-location-action.c: (action_activated_cb), (entry_activate_cb): * src/epiphany.defs: Unify bookmarks/smart bookmarks address resolution, and add a signal to EphyBookmarks for it.
Diffstat (limited to 'src/ephy-location-action.c')
-rw-r--r--src/ephy-location-action.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 73d4456a3..1abf8c43b 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -133,7 +133,7 @@ action_activated_cb (GtkEntryCompletion *completion,
(node, EPHY_NODE_BMK_PROP_LOCATION);
g_return_if_fail (smart_url != NULL);
- url = ephy_bookmarks_solve_smart_url
+ url = ephy_bookmarks_resolve_address
(action->priv->bookmarks, smart_url, content);
g_return_if_fail (url != NULL);
@@ -148,13 +148,20 @@ static void
entry_activate_cb (GtkEntry *entry,
EphyLocationAction *action)
{
- const char *content;
+ EphyBookmarks *bookmarks;
GdkEvent *event;
gboolean control = FALSE;
+ const char *content;
+ char *address;
content = gtk_entry_get_text (entry);
if (content == NULL || content[0] == '\0') return;
+ bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
+
+ address = ephy_bookmarks_resolve_address (bookmarks, content, NULL);
+ g_return_if_fail (address != NULL);
+
event = gtk_get_current_event ();
if (event)
{
@@ -167,9 +174,11 @@ entry_activate_cb (GtkEntry *entry,
gdk_event_free (event);
}
-
- ephy_link_open (EPHY_LINK (action), content, NULL,
+ /* FIXME use ephy_bookmarks_resolve_address here too? */
+ ephy_link_open (EPHY_LINK (action), address, NULL,
control ? EPHY_LINK_NEW_TAB : 0);
+
+ g_free (address);
}
static void