aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-tab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r--src/ephy-tab.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 236e946ac..d07152a53 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -2212,15 +2212,18 @@ ephy_tab_set_title (EphyTab *tab,
}
/**
- * ephy_tab_get_title:
+ * ephy_tab_get_title_composite:
* @tab: an #EphyTab
*
* Returns the title of the web page loaded in @tab.
+ *
+ * This differs from #ephy_tab_get_title in that this function
+ * will return a special title while the page is still loading.
*
- * Return value: @tab's loaded web page's title. Will never be %NULL.
+ * Return value: @tab's web page's title. Will never be %NULL.
**/
const char *
-ephy_tab_get_title (EphyTab *tab)
+ephy_tab_get_title_composite (EphyTab *tab)
{
EphyTabPrivate *priv;
const char *title = "";
@@ -2247,6 +2250,36 @@ ephy_tab_get_title (EphyTab *tab)
}
/**
+ * ephy_tab_get_title:
+ * @tab: an #EphyTab
+ *
+ * Returns the title of the web page loaded in @tab.
+ *
+ * Return value: @tab's loaded web page's title. Will never be %NULL.
+ **/
+const char *
+ephy_tab_get_title (EphyTab *tab)
+{
+ EphyTabPrivate *priv;
+ const char *title = "";
+
+ g_return_val_if_fail (EPHY_IS_TAB (tab), NULL);
+
+ priv = tab->priv;
+
+ if (priv->is_blank)
+ {
+ title = _("Blank page");
+ }
+ else
+ {
+ title = priv->title;
+ }
+
+ return title != NULL ? title : "";
+}
+
+/**
* ephy_tab_get_address:
* @tab: an #EphyTab
*