aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-02-20 19:07:18 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-02-20 19:07:18 +0800
commitcbe9ef1b847ac3ffe97ac44f60c65613101cbb92 (patch)
tree43b0310c23228f72f07a60584612401f773b3c7e /lib
parentbc890e54e7b5a77829e3f97b855f921f09e5192a (diff)
downloadgsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.tar
gsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.tar.gz
gsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.tar.bz2
gsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.tar.lz
gsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.tar.xz
gsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.tar.zst
gsoc2013-epiphany-cbe9ef1b847ac3ffe97ac44f60c65613101cbb92.zip
Activate the url when clicking on it from the combo dropdown. Based on
2003-02-20 Marco Pesenti Gritti <marco@it.gnome.org> * lib/widgets/ephy-location-entry.c: (ephy_location_entry_list_event_after_cb), (ephy_location_entry_editable_changed_cb): Activate the url when clicking on it from the combo dropdown. Based on galeon patch.
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-location-entry.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index af7da215e..fbd8a8216 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -44,6 +44,7 @@ struct _EphyLocationEntryPrivate {
gint autocompletion_timeout;
gint show_alternatives_timeout;
gboolean block_set_autocompletion_key;
+ gboolean going_to_site;
gchar *autocompletion_key;
gchar *last_completion;
@@ -686,17 +687,27 @@ ephy_location_entry_list_event_after_cb (GtkWidget *list,
if (event->type == GDK_BUTTON_PRESS
&& ((GdkEventButton *) event)->button == 1)
{
- gchar *url = ephy_location_entry_get_location (e);
- g_signal_emit
- (e, EphyLocationEntrySignals[ACTIVATED], 0, url);
- g_free (url);
+ e->priv->going_to_site = TRUE;
}
}
static void
ephy_location_entry_editable_changed_cb (GtkEditable *editable, EphyLocationEntry *e)
{
+ EphyLocationEntryPrivate *p = e->priv;
+
ephy_location_entry_set_autocompletion_key (e);
+
+ if (p->going_to_site)
+ {
+ char *url = ephy_location_entry_get_location (e);
+ if (url && url[0] != '\0')
+ {
+ p->going_to_site = FALSE;
+ g_signal_emit (e, EphyLocationEntrySignals[ACTIVATED], 0, NULL, url);
+ g_free (url);
+ }
+ }
}
static void