summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 03:39:05 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 03:39:05 (EDT)
commit86117c86ed80b6d660258045a680f89a46b0f9d5 (patch)
treed589d00c883d9f909de94620fc649ead5ced4238 /src
parent3ac8d86edc69715c8a763bb5622de3c425f48c3e (diff)
downloadmarquee-86117c86ed80b6d660258045a680f89a46b0f9d5.zip
marquee-86117c86ed80b6d660258045a680f89a46b0f9d5.tar.gz
marquee-86117c86ed80b6d660258045a680f89a46b0f9d5.tar.bz2
src/tab-chrome.c: Handle URI bar activation
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index d66fcb1..2808b3f 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -40,6 +40,13 @@ forward_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton,
webkit_web_view_go_forward(chrome->web_view);
}
+static void
+uri_activate_cb(GtkEntry *entry, MqTabChrome *chrome)
+{
+ webkit_web_view_load_uri(chrome->web_view,
+ gtk_entry_get_text(GTK_ENTRY(entry)));
+}
+
static GtkWidget *
navigation_toolbar_new(MqTabChrome *chrome, gchar *uri)
{
@@ -71,6 +78,8 @@ navigation_toolbar_new(MqTabChrome *chrome, gchar *uri)
gtk_entry_set_icon_from_icon_name(GTK_ENTRY(chrome->uri_entry),
GTK_ENTRY_ICON_PRIMARY, "text-x-generic");
gtk_entry_set_progress_fraction(GTK_ENTRY(chrome->uri_entry), 0.0);
+ g_signal_connect(chrome->uri_entry, "activate",
+ G_CALLBACK(uri_activate_cb), chrome);
gtk_container_add(GTK_CONTAINER(uri_toolitem),
chrome->uri_entry);
gtk_tool_item_set_expand(uri_toolitem, TRUE);