aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-location-action.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@gnome.org>2009-12-03 06:01:24 +0800
committerDiego Escalante Urrelo <diegoe@gnome.org>2009-12-05 02:03:23 +0800
commit5aee0deca12e14554ce0fa0d4b02613e99ba77a9 (patch)
treee5d390c9e4630010212dc8ca8c78ce5dd7a95dde /src/ephy-location-action.c
parent0fdd13a976543bf83ed360d42eabf085294195f1 (diff)
downloadgsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.tar
gsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.tar.gz
gsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.tar.bz2
gsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.tar.lz
gsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.tar.xz
gsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.tar.zst
gsoc2013-epiphany-5aee0deca12e14554ce0fa0d4b02613e99ba77a9.zip
Remove redundant parameters in location-set API
EphyLocationEntry, EphyLocationAction and EphyToolbar take an @adress and @typed_address parameter, while both are useful we only end up using one so we can easily decide which one to use in ephy-window.c instead of carrying both around until ephy-location-entry.c Bonus: make ephy_location_entry_set_location accept NULL as @address safely. Bug #603651
Diffstat (limited to 'src/ephy-location-action.c')
-rw-r--r--src/ephy-location-action.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 580aa905b..598f9ff8c 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -50,7 +50,6 @@ struct _EphyLocationActionPrivate
GtkWidget *proxy;
GList *actions;
char *address;
- char *typed_address;
EphyNode *smart_bmks;
EphyBookmarks *bookmarks;
GdkPixbuf *icon;
@@ -224,7 +223,7 @@ user_changed_cb (GtkWidget *proxy, EphyLocationAction *action)
LOG ("user_changed_cb, new address %s", address);
g_signal_handlers_block_by_func (action, G_CALLBACK (sync_address), proxy);
- ephy_location_action_set_address (action, address, NULL);
+ ephy_location_action_set_address (action, address);
g_signal_handlers_unblock_by_func (action, G_CALLBACK (sync_address), proxy);
}
@@ -247,8 +246,7 @@ sync_address (GtkAction *gaction,
LOG ("sync_address %s", action->priv->address);
g_signal_handlers_block_by_func (proxy, G_CALLBACK (user_changed_cb), action);
- ephy_location_entry_set_location (lentry, priv->address,
- priv->typed_address);
+ ephy_location_entry_set_location (lentry, priv->address);
g_signal_handlers_unblock_by_func (proxy, G_CALLBACK (user_changed_cb), action);
}
@@ -579,7 +577,7 @@ ephy_location_action_set_property (GObject *object,
switch (prop_id)
{
case PROP_ADDRESS:
- ephy_location_action_set_address (action, g_value_get_string (value), NULL);
+ ephy_location_action_set_address (action, g_value_get_string (value));
break;
case PROP_EDITABLE:
priv->editable = g_value_get_boolean (value);
@@ -935,7 +933,6 @@ ephy_location_action_finalize (GObject *object)
g_list_free (priv->actions);
g_free (priv->address);
- g_free (priv->typed_address);
g_free (priv->lock_stock_id);
g_free (priv->lock_tooltip);
@@ -961,15 +958,13 @@ ephy_location_action_get_address (EphyLocationAction *action)
/**
* ephy_location_action_set_address:
* @action: an #EphyLocationAction
- * @address: the current address
- * @typed_address: address typed by the user
+ * @address: new address
*
- * Sets the @address and @typed_address in @action.
+ * Sets @address as the address of @action.
**/
void
ephy_location_action_set_address (EphyLocationAction *action,
- const char *address,
- const char *typed_address)
+ const char *address)
{
EphyLocationActionPrivate *priv;
@@ -982,8 +977,5 @@ ephy_location_action_set_address (EphyLocationAction *action,
g_free (priv->address);
priv->address = g_strdup (address);
- g_free (priv->typed_address);
- priv->typed_address = g_strdup (typed_address);
-
g_object_notify (G_OBJECT (action), "address");
}