diff options
author | Xan Lopez <xan@src.gnome.org> | 2007-10-26 03:59:36 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-10-26 03:59:36 +0800 |
commit | fdacbe229e0defe6ef64068066a13369cce2ec27 (patch) | |
tree | 5525e0fd8d01f1629b43e619b5e5bd763c42bf08 /embed/ephy-embed.c | |
parent | 461af43a1c1f2e0506fb49d15b01b7a76e43579e (diff) | |
download | gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.tar gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.tar.gz gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.tar.bz2 gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.tar.lz gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.tar.xz gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.tar.zst gsoc2013-epiphany-fdacbe229e0defe6ef64068066a13369cce2ec27.zip |
Move address and typed-address from EphyTab to EphyEmbed
ephy-tab.c is totally broken now, will fix in next patches.
svn path=/trunk/; revision=7557
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r-- | embed/ephy-embed.c | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 99e194ecb..3f052e413 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -467,7 +467,18 @@ ephy_embed_base_init (gpointer g_class) EPHY_TYPE_EMBED_NAVIGATION_FLAGS, 0, G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); - + g_object_interface_install_property (g_class, + g_param_spec_string ("address", + "Address", + "The embed's address", + "", + G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + g_object_interface_install_property (g_class, + g_param_spec_string ("typed-address", + "Typed Address", + "The typed address", + "", + G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); initialized = TRUE; } @@ -1152,3 +1163,65 @@ ephy_embed_update_navigation_flags (EphyEmbed *embed) return iface->update_navigation_flags (embed); } +/** + * ephy_embed_get_typed_address: + * @embed: an #EphyEmbed + * + * Returns the text that @embed's #EphyWindow will display in its location toolbar + * entry when @embed is selected. + * + * This is not guaranteed to be the same as @embed's location, + * available through ephy_embed_get_location(). As the user types a new address + * into the location entry, ephy_embed_get_location()'s returned string will + * change. + * + * Return value: @embed's #EphyWindow's location entry when @embed is selected + **/ +const char * +ephy_embed_get_typed_address (EphyEmbed *embed) +{ + EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); + return iface->get_typed_address (embed); +} + +/** + * ephy_embed_set_typed_address: + * @embed: an #EphyEmbed + * @address: the new typed address, or %NULL to clear it + * @expire: when to expire this address_expire + * + * Sets the text that @embed's #EphyWindow will display in its location toolbar + * entry when @embed is selected. + **/ +void +ephy_embed_set_typed_address (EphyEmbed *embed, + const char *address, + EphyEmbedAddressExpire expire) +{ + EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); + return iface->set_typed_address (embed, address, expire); +} + +/** + * ephy_embed_get_address: + * @embed: an #EphyEmbed + * + * Returns the address of the currently loaded page. + * + * Return value: @embed's address. Will never be %NULL. + **/ +const char * +ephy_embed_get_address (EphyEmbed *embed) +{ + EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); + return iface->get_address (embed); +} + +void +ephy_embed_set_address (EphyEmbed *embed, + char *address) +{ + EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed); + return iface->set_address (embed, address); +} + |