From 15dd9817a91d1c0b9a12f5dc5999d08c38c6d396 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 14 Oct 2003 11:36:37 +0000 Subject: Make location a normal entry. 2003-10-14 Marco Pesenti Gritti * lib/widgets/ephy-location-entry.c: (ephy_location_entry_class_init), (ephy_location_entry_construct_contents), (ephy_location_entry_init), (ephy_location_entry_activate): * lib/widgets/ephy-location-entry.h: * src/ephy-history-window.c: (confirmation_dialog_response_cb): * src/ephy-location-action.c: (remove_completion_actions), (add_completion_actions), (connect_proxy), (ephy_location_action_set_address): * src/ephy-location-action.h: * src/toolbar.c: * src/toolbar.h: Make location a normal entry. --- src/ephy-location-action.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'src/ephy-location-action.c') diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c index 0d90e8e24..73568195a 100644 --- a/src/ephy-location-action.c +++ b/src/ephy-location-action.c @@ -172,7 +172,7 @@ remove_completion_actions (GtkAction *action, GtkWidget *proxy) EphyLocationAction *la = EPHY_LOCATION_ACTION (action); GList *l; - entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy)); + entry = GTK_BIN (proxy)->child; completion = gtk_entry_get_completion (GTK_ENTRY (entry)); for (l = la->priv->actions; l != NULL; l = l->next) @@ -195,7 +195,7 @@ add_completion_actions (GtkAction *action, GtkWidget *proxy) EphyLocationAction *la = EPHY_LOCATION_ACTION (action); GList *l; - entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy)); + entry = GTK_BIN (proxy)->child; completion = gtk_entry_get_completion (GTK_ENTRY (entry)); for (l = la->priv->actions; l != NULL; l = l->next) @@ -238,7 +238,7 @@ connect_proxy (GtkAction *action, GtkWidget *proxy) g_signal_connect_object (action, "notify::address", G_CALLBACK (sync_address), proxy, 0); - entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy)); + entry = GTK_BIN (proxy)->child; g_signal_connect_object (entry, "activate", G_CALLBACK (location_url_activate_cb), action, 0); @@ -478,22 +478,3 @@ ephy_location_action_set_address (EphyLocationAction *action, action->priv->address = g_strdup (address ? address : ""); g_object_notify (G_OBJECT (action), "address"); } - -static void -clear_history (GtkWidget *proxy, gpointer user_data) -{ - if (EPHY_IS_LOCATION_ENTRY (proxy)) - { - ephy_location_entry_clear_history (EPHY_LOCATION_ENTRY (proxy)); - } -} - -void -ephy_location_action_clear_history (EphyLocationAction *action) -{ - GSList *proxies; - - proxies = gtk_action_get_proxies (GTK_ACTION (action)); - - g_slist_foreach (proxies, (GFunc) clear_history, NULL); -} -- cgit v1.2.3