aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.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-window.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-window.c')
-rw-r--r--src/ephy-window.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index aa10f2ab1..0f2ceed43 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1547,12 +1547,15 @@ sync_tab_address (EphyWebView *view,
EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
+ const char *address;
+ const char *typed_address;
if (priv->closing) return;
- ephy_toolbar_set_location (priv->toolbar,
- ephy_web_view_get_address (view),
- ephy_web_view_get_typed_address (view));
+ address = ephy_web_view_get_address (view);
+ typed_address = ephy_web_view_get_typed_address (view);
+
+ ephy_toolbar_set_location (priv->toolbar, typed_address ? typed_address : address);
ephy_find_toolbar_request_close (priv->find_toolbar);
}
@@ -2922,7 +2925,7 @@ embed_modal_alert_cb (EphyEmbed *embed,
/* make sure the location entry shows the real URL of the tab's page */
address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
- ephy_toolbar_set_location (priv->toolbar, address, NULL);
+ ephy_toolbar_set_location (priv->toolbar, address);
/* don't suppress alert */
return FALSE;