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/window-commands.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/window-commands.c')
-rw-r--r-- | src/window-commands.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index e48b698d8..29eca66a7 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -129,7 +129,6 @@ window_cmd_file_send_to (GtkAction *action, { EphyTab *tab; EphyEmbed *embed; - const char *address; char *url, *location, *title; tab = ephy_window_get_active_tab (window); @@ -138,20 +137,8 @@ window_cmd_file_send_to (GtkAction *action, embed = ephy_window_get_active_embed (window); g_return_if_fail (embed != NULL); - address = ephy_tab_get_address (tab); - location = gnome_vfs_escape_string (address); - - title = ephy_embed_get_title (embed); - if (title != NULL) - { - char *tmp = gnome_vfs_escape_string (title); - g_free (title); - title = tmp; - } - else - { - title = gnome_vfs_escape_string (_("Check this out!")); - } + location = gnome_vfs_escape_string (ephy_tab_get_address (tab)); + title = gnome_vfs_escape_string (ephy_tab_get_title (tab)); url = g_strconcat ("mailto:", "?Subject=", title, @@ -288,8 +275,7 @@ window_cmd_file_bookmark_page (GtkAction *action, EphyEmbed *embed; EphyBookmarks *bookmarks; GtkWidget *new_bookmark; - const char *location, *icon; - char *title; + const char *location, *icon, *title; tab = ephy_window_get_active_tab (window); g_return_if_fail (tab != NULL); @@ -298,13 +284,7 @@ window_cmd_file_bookmark_page (GtkAction *action, g_return_if_fail (embed != NULL); location = ephy_tab_get_address (tab); - - title = ephy_embed_get_title (embed); - if (title == NULL) - { - title = g_strdup (_("Untitled")); - } - + title = ephy_tab_get_title (tab); icon = ephy_tab_get_icon_address (tab); bookmarks = ephy_shell_get_bookmarks (ephy_shell); |