aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmark-action.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index aa6de32e0..4b6e1f038 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -434,23 +434,29 @@ query_tooltip_cb (GtkWidget *proxy,
title = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_TITLE);
location = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_LOCATION);
- if (strstr (location, "%s") != NULL)
+ if (g_str_has_prefix (location, "javascript:"))
{
- 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));
- gnome_vfs_uri_unref (uri);
- }
+ text = g_strdup (_("Javascript scriptlet"));
}
- if (text == NULL)
+ else
{
- text = g_markup_printf_escaped ("%s\n%s", title, location);
+ if (strstr (location, "%s") != NULL)
+ {
+ 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));
+ gnome_vfs_uri_unref (uri);
+ }
+ }
+ if (text == NULL)
+ {
+ text = g_markup_printf_escaped ("%s\n%s", title, location);
+ }
}
-
gtk_tooltip_set_markup (tooltip, text);
g_free (text);