Show 'No plugins' if there are no plugins installed
Also free the return values.
This commit is contained in:
parent
667c94389a
commit
66544898fa
1 changed files with 6 additions and 1 deletions
|
@ -3929,7 +3929,8 @@ midori_view_set_uri (MidoriView* view,
|
||||||
gchar** items = g_strsplit (value, ",", 0);
|
gchar** items = g_strsplit (value, ",", 0);
|
||||||
guint i = 0;
|
guint i = 0;
|
||||||
GString* ns_plugins = g_string_new (
|
GString* ns_plugins = g_string_new (
|
||||||
"<html><head><title>about:plugins</title><head><body>");
|
"<html><head><title>about:plugins</title><head>"
|
||||||
|
"<body><h1>about:plugins</h1>");
|
||||||
if (items != NULL)
|
if (items != NULL)
|
||||||
while (items[i] != NULL)
|
while (items[i] != NULL)
|
||||||
{
|
{
|
||||||
|
@ -3949,6 +3950,10 @@ midori_view_set_uri (MidoriView* view,
|
||||||
g_strfreev (parts);
|
g_strfreev (parts);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
if (g_str_has_prefix (value, "undefined"))
|
||||||
|
g_string_append (ns_plugins, "No plugins found");
|
||||||
|
g_strfreev (items);
|
||||||
|
g_free (value);
|
||||||
g_string_append (ns_plugins, "</body>");
|
g_string_append (ns_plugins, "</body>");
|
||||||
katze_assign (view->uri, g_strdup (uri));
|
katze_assign (view->uri, g_strdup (uri));
|
||||||
data = g_string_free (ns_plugins, FALSE);
|
data = g_string_free (ns_plugins, FALSE);
|
||||||
|
|
Loading…
Reference in a new issue