[Xfce4-commits] <midori:master> Generate addon style in addons_activate_cb

Christian Dywan noreply at xfce.org
Thu Oct 27 19:48:01 CEST 2011


Updating branch refs/heads/master
         to dc103bf017262d98921176549b4c4d6c3533f708 (commit)
       from 9f37c58013a520f428d7364393ba68e074de5b12 (commit)

commit dc103bf017262d98921176549b4c4d6c3533f708
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Oct 27 19:44:15 2011 +0200

    Generate addon style in addons_activate_cb

 extensions/addons.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index e08f45d..4324e88 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -1851,18 +1851,21 @@ addons_activate_cb (MidoriExtension* extension,
     MidoriWebSettings* settings = katze_object_get_object (app, "settings");
     KatzeArray* browsers;
     MidoriBrowser* browser;
+    gchar* data;
 
     browsers = katze_object_get_object (app, "browsers");
     addons_update_elements (extension, ADDONS_USER_STYLES);
     addons_monitor_directories (extension, ADDONS_USER_STYLES);
     addons_update_elements (extension, ADDONS_USER_SCRIPTS);
     addons_monitor_directories (extension, ADDONS_USER_SCRIPTS);
-    midori_web_settings_remove_style (settings, "addons");
+    data = addons_generate_global_stylesheet (extension);
+    midori_web_settings_add_style (settings, "addons", data);
 
     KATZE_ARRAY_FOREACH_ITEM (browser, browsers)
         addons_app_add_browser_cb (app, browser, extension);
     g_object_unref (browsers);
     g_object_unref (settings);
+    g_free (data);
 
     g_signal_connect (app, "add-browser",
         G_CALLBACK (addons_app_add_browser_cb), extension);


More information about the Xfce4-commits mailing list