diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 19 |
2 files changed, 24 insertions, 4 deletions
@@ -1,5 +1,14 @@ 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. + +2003-02-20 Marco Pesenti Gritti <marco@it.gnome.org> + * Makefile.am: add a COPYING.README for GPL 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 |