[Xfce4-commits] <midori:master> Show 'No plugins' if there are no plugins installed

Christian Dywan noreply at xfce.org
Thu Feb 24 23:30:01 CET 2011


Updating branch refs/heads/master
         to 66544898fac4c6ea8407c737eff24a77199ce260 (commit)
       from 667c94389a83e09a8014ac2b4d4b2b4fa637eb94 (commit)

commit 66544898fac4c6ea8407c737eff24a77199ce260
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Thu Feb 24 23:26:55 2011 +0100

    Show 'No plugins' if there are no plugins installed
    
    Also free the return values.

 midori/midori-view.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 6ede1e3..4e0167d 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3929,7 +3929,8 @@ midori_view_set_uri (MidoriView*  view,
                 gchar** items = g_strsplit (value, ",", 0);
                 guint i = 0;
                 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)
                 while (items[i] != NULL)
                 {
@@ -3949,6 +3950,10 @@ midori_view_set_uri (MidoriView*  view,
                     g_strfreev (parts);
                     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>");
                 katze_assign (view->uri, g_strdup (uri));
                 data = g_string_free (ns_plugins, FALSE);



More information about the Xfce4-commits mailing list