aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmark-action.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2007-11-25 21:47:48 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-11-25 21:47:48 +0800
commitdcf754740e427c738db36f07f9f870fde51dfa85 (patch)
treead882a30c8b7d71f2dedf698b5071562ab6eaa69 /src/bookmarks/ephy-bookmark-action.c
parent3fe2c03487ea3931f78c25dd4c090ffe89ed8d28 (diff)
downloadgsoc2013-epiphany-dcf754740e427c738db36f07f9f870fde51dfa85.tar.gz
gsoc2013-epiphany-dcf754740e427c738db36f07f9f870fde51dfa85.tar.zst
gsoc2013-epiphany-dcf754740e427c738db36f07f9f870fde51dfa85.zip
Fix empty line on bookmark tooltip when bookmark has no title.
Close bug #499226. svn path=/trunk/; revision=7730
Diffstat (limited to 'src/bookmarks/ephy-bookmark-action.c')
-rw-r--r--src/bookmarks/ephy-bookmark-action.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index 011277548..7e0531582 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -445,16 +445,32 @@ query_tooltip_cb (GtkWidget *proxy,
GnomeVFSURI *uri = gnome_vfs_uri_new (location);
if (uri != NULL)
{
- text = g_markup_printf_escaped ("%s\n%s://%s",
- title,
- gnome_vfs_uri_get_scheme (uri),
- gnome_vfs_uri_get_host_name (uri));
+ if (title[0] == '\0')
+ {
+ text = g_markup_printf_escaped ("%s://%s",
+ gnome_vfs_uri_get_scheme (uri),
+ gnome_vfs_uri_get_host_name (uri));
+ }
+ else
+ {
+ text = g_markup_printf_escaped ("%s\n%s://%s",
+ title,
+ gnome_vfs_uri_get_scheme (uri),
+ gnome_vfs_uri_get_host_name (uri));
+ }
gnome_vfs_uri_unref (uri);
}
}
if (text == NULL)
{
- text = g_markup_printf_escaped ("%s\n%s", title, location);
+ if (title[0] == '\0')
+ {
+ text = g_markup_printf_escaped ("%s", location);
+ }
+ else
+ {
+ text = g_markup_printf_escaped ("%s\n%s", title, location);
+ }
}
}
gtk_tooltip_set_markup (tooltip, text);