aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-location-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-03-27 21:02:24 +0800
committerChristian Persch <chpe@src.gnome.org>2004-03-27 21:02:24 +0800
commitbc08fad238bd6a29c6ef68d966c99949321a4341 (patch)
tree3b22cbfd3c44a4bce2c3d7d76084e3818ccba52f /src/ephy-location-action.c
parent9858006c017531ae84f709a346273a0cb5b4f968 (diff)
downloadgsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.tar
gsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.tar.gz
gsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.tar.bz2
gsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.tar.lz
gsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.tar.xz
gsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.tar.zst
gsoc2013-epiphany-bc08fad238bd6a29c6ef68d966c99949321a4341.zip
Correctly disconnect the handler not from the proxy but from the entry
2004-03-27 Christian Persch <chpe@cvs.gnome.org> * src/ephy-location-action.c: (location_url_activate_cb), (disconnect_proxy), (ephy_location_action_set_address): Correctly disconnect the handler not from the proxy but from the entry itself. Rationalise away one strdup.
Diffstat (limited to 'src/ephy-location-action.c')
-rw-r--r--src/ephy-location-action.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 92d5af64a..2d64cb09b 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -129,16 +129,15 @@ action_activated_cb (GtkEntryCompletion *completion,
}
static void
-location_url_activate_cb (EphyLocationEntry *entry,
+location_url_activate_cb (GtkEntry *entry,
EphyLocationAction *action)
{
- char *content;
+ const char *content;
- content = gtk_editable_get_chars (GTK_EDITABLE(entry), 0, -1);
+ content = gtk_entry_get_text (entry);
if (content)
{
g_signal_emit (action, signals[GO_LOCATION], 0, content);
- g_free (content);
}
}
@@ -291,11 +290,15 @@ disconnect_proxy (GtkAction *action, GtkWidget *proxy)
if (EPHY_IS_LOCATION_ENTRY (proxy))
{
+ GtkWidget *entry;
+
+ entry = GTK_BIN (proxy)->child;
+
g_signal_handlers_disconnect_by_func
(action, G_CALLBACK (sync_address), proxy);
g_signal_handlers_disconnect_by_func
- (proxy, G_CALLBACK (location_url_activate_cb), action);
+ (entry, G_CALLBACK (location_url_activate_cb), action);
g_signal_handlers_disconnect_by_func
(proxy, G_CALLBACK (user_changed_cb), action);
@@ -527,6 +530,6 @@ ephy_location_action_set_address (EphyLocationAction *action,
LOG ("set_address %s", address)
g_free (action->priv->address);
- action->priv->address = g_strdup (address ? address : "");
+ action->priv->address = g_strdup (address);
g_object_notify (G_OBJECT (action), "address");
}