aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-10-26 04:00:34 +0800
committerXan Lopez <xan@src.gnome.org>2007-10-26 04:00:34 +0800
commit929c43cd4cadadb2d1ddc26fd2d0500867d9ea75 (patch)
tree29f40b4ed449ca09cc3fff1639562fabc9e76212 /embed/ephy-embed.c
parent51a7dc7dd4e0871d0da50228a163a1b124aeda1c (diff)
downloadgsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.tar
gsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.tar.gz
gsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.tar.bz2
gsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.tar.lz
gsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.tar.xz
gsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.tar.zst
gsoc2013-epiphany-929c43cd4cadadb2d1ddc26fd2d0500867d9ea75.zip
Move status-message and logic of link-message to EphyEmbed.
Create a property for link-message in EphyEmbed too. svn path=/trunk/; revision=7560
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r--embed/ephy-embed.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index ae6ea6d74..882c9bfd6 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -485,7 +485,18 @@ ephy_embed_base_init (gpointer g_class)
"The embed's title",
_("Blank page"),
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 ("status message",
+ "Status Message",
+ "The embed's statusbar message",
+ NULL,
+ 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 ("link-message",
+ "Link Message",
+ "The embed's link message",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
initialized = TRUE;
}
@@ -685,7 +696,7 @@ ephy_embed_get_location (EphyEmbed *embed,
*
* Return value: the URL of the link over which the mouse is hovering
**/
-char *
+const char *
ephy_embed_get_link_message (EphyEmbed *embed)
{
EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
@@ -1196,3 +1207,25 @@ ephy_embed_get_address (EphyEmbed *embed)
return iface->get_address (embed);
}
+/**
+ * ephy_embed_get_status_message:
+ * @embed: an #EphyEmbed
+ *
+ * Returns the message displayed in @embed's #EphyWindow's
+ * #EphyStatusbar. If the user is hovering the mouse over a hyperlink,
+ * this function will return the same value as
+ * ephy_embed_get_link_message(). Otherwise, it will return a network
+ * status message, or NULL.
+ *
+ * The message returned has a limited lifetime, and so should be copied with
+ * g_strdup() if it must be stored.
+ *
+ * Return value: The current statusbar message
+ **/
+const char *
+ephy_embed_get_status_message (EphyEmbed *embed)
+{
+ EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
+ return iface->get_status_message (embed);
+}
+