[Xfce4-commits] <midori:master> Handle readonly in midori_extension_add_to_list

Christian Dywan noreply at xfce.org
Sat Mar 30 01:02:01 CET 2013


Updating branch refs/heads/master
         to 4d6250359b950aa5267bc903d98bf28c499c0831 (commit)
       from 5cf16071354cb12791afd6c6e9db860ae14fe76d (commit)

commit 4d6250359b950aa5267bc903d98bf28c499c0831
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Mar 30 01:00:25 2013 +0100

    Handle readonly in midori_extension_add_to_list

 midori/midori-browser.c   |    2 +-
 midori/midori-extension.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 877ca3a..1bea1de 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -637,7 +637,7 @@ _midori_browser_activate_action (MidoriBrowser* browser,
             midori_app_set_browsers (app, browsers, browser);
             g_free (extension_path);
             if (extension && !strcmp (parts[1], "true"))
-                midori_extension_activate (extension, NULL, TRUE, app);
+                midori_extension_activate (extension, parts[0], TRUE, app);
             else if (extension && !strcmp (parts[1], "false"))
                 midori_extension_deactivate (MIDORI_EXTENSION (extension));
             else
diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index 63688f2..5ecda51 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -661,13 +661,17 @@ midori_extension_add_to_list (MidoriApp*       app,
     if (g_object_get_data (G_OBJECT (extension), "filename"))
         return;
 
+    katze_array_add_item (extensions, extension);
+    g_object_unref (extensions);
+
+    if (midori_paths_is_readonly ())
+        return;
+
     /* Signal that we want the extension to load and save */
     g_object_set_data_full (G_OBJECT (extension), "filename",
                             g_strdup (filename), g_free);
     if (midori_extension_is_prepared (extension))
         midori_extension_get_config_dir (extension);
-    katze_array_add_item (extensions, extension);
-    g_object_unref (extensions);
 }
 
 void


More information about the Xfce4-commits mailing list