aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-base-embed.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-11-06 07:01:23 +0800
committerXan Lopez <xan@src.gnome.org>2007-11-06 07:01:23 +0800
commita3c185e796190610eee690c103a927bf7cfcfa4d (patch)
tree5e9ca91b2acab00483b64152917b0590cdb0e222 /embed/ephy-base-embed.c
parentda8c41fefb8dbffb346842d7d516632cce3ab374 (diff)
downloadgsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.tar
gsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.tar.gz
gsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.tar.bz2
gsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.tar.lz
gsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.tar.xz
gsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.tar.zst
gsoc2013-epiphany-a3c185e796190610eee690c103a927bf7cfcfa4d.zip
Make ephy_base_embed_set_{title,address} dup their parameters internally.
svn path=/trunk/; revision=7636
Diffstat (limited to 'embed/ephy-base-embed.c')
-rw-r--r--embed/ephy-base-embed.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/embed/ephy-base-embed.c b/embed/ephy-base-embed.c
index 11b5ac345..aa82ed284 100644
--- a/embed/ephy-base-embed.c
+++ b/embed/ephy-base-embed.c
@@ -647,13 +647,14 @@ ephy_embed_iface_init (EphyEmbedIface *iface)
}
void
-ephy_base_embed_set_address (EphyBaseEmbed *embed, char *address)
+ephy_base_embed_set_address (EphyBaseEmbed *embed,
+ const char *address)
{
EphyBaseEmbedPrivate *priv = embed->priv;
GObject *object = G_OBJECT (embed);
g_free (priv->address);
- priv->address = address;
+ priv->address = g_strdup (address);
priv->is_blank = address == NULL ||
strcmp (address, "about:blank") == 0;
@@ -695,9 +696,10 @@ get_title_from_address (const char *address)
void
ephy_base_embed_set_title (EphyBaseEmbed *embed,
- char *title)
+ const char *embed_title)
{
EphyBaseEmbedPrivate *priv = embed->priv;
+ char *title = g_strdup (embed_title);
if (!priv->is_blank && (title == NULL || g_strstrip (title)[0] == '\0')) {
g_free (title);
@@ -727,7 +729,7 @@ ensure_page_info (EphyBaseEmbed *embed, const char *address)
if ((priv->address == NULL || priv->address[0] == '\0') &&
priv->address_expire == EPHY_EMBED_ADDRESS_EXPIRE_NOW) {
- ephy_base_embed_set_address (embed, g_strdup (address));
+ ephy_base_embed_set_address (embed, address);
}
/* FIXME huh?? */
@@ -1125,6 +1127,7 @@ ephy_base_embed_location_changed (EphyBaseEmbed *embed,
embed_address = ephy_embed_get_location (EPHY_EMBED (embed), TRUE);
ephy_base_embed_set_address (embed, embed_address);
ephy_base_embed_set_loading_title (embed, embed_address, TRUE);
+ g_free (embed_address);
}
ephy_base_embed_set_link_message (embed, NULL);