diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-09-28 21:36:49 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-09-28 21:36:49 +0800 |
commit | 6f7fc09fe96eaad7a5d2c3563bdc45000cb88573 (patch) | |
tree | f51f28a8563be3d2481e905a0123788000dc6452 /src/ephy-tab.c | |
parent | 135b0e0d1f8dc462f7e5d9450609685352667186 (diff) | |
download | gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.tar gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.tar.gz gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.tar.bz2 gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.tar.lz gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.tar.xz gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.tar.zst gsoc2013-epiphany-6f7fc09fe96eaad7a5d2c3563bdc45000cb88573.zip |
Add a function to get the tab's real title, and use it where appropriate.
2005-09-28 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-notebook.c: (sync_label):
* src/ephy-tab.c: (ephy_tab_get_title_composite),
(ephy_tab_get_title):
* src/ephy-tab.h:
* src/ephy-tabs-menu.c: (sync_tab_title):
* src/ephy-window.c: (sync_tab_title):
* src/window-commands.c: (window_cmd_file_send_to),
(window_cmd_file_bookmark_page):
Add a function to get the tab's real title, and use it
where appropriate. Fixes bug #317418.
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r-- | src/ephy-tab.c | 39 |
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 * |