[Xfce4-commits] <midori:master> Read 'config' in app mode, if -c switch was specfified

Christian Dywan noreply at xfce.org
Mon Jul 12 01:56:01 CEST 2010


Updating branch refs/heads/master
         to f6be9c4972e22bc5886f23f208fac84c007891e0 (commit)
       from 5a082100c80af824bd5b8880b86e7d82e74b50be (commit)

commit f6be9c4972e22bc5886f23f208fac84c007891e0
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jul 11 23:54:52 2010 +0200

    Read 'config' in app mode, if -c switch was specfified

 midori/main.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 9da5df2..a29cc3a 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1701,10 +1701,28 @@ main (int    argc,
         gchar* tmp_uri = midori_prepare_uri (webapp);
         katze_assign (webapp, tmp_uri);
         midori_startup_timer ("Browser: \t%f");
-        settings = katze_object_get_object (browser, "settings");
+        if (config)
+        {
+            gchar* random_name;
+            gchar* app_name;
+
+            random_name = g_strdup_printf ("app%u", g_random_int ());
+            app_name = g_strconcat ("midori", "_", random_name, NULL);
+            app = g_object_new (MIDORI_TYPE_APP, "name", app_name, NULL);
+            g_free (random_name);
+            g_free (app_name);
+
+            config_file = build_config_filename ("config");
+            settings = settings_new_from_file (config_file, &extensions);
+            g_free (config_file);
+            g_strfreev (extensions);
+        }
+        else
+            settings = katze_object_get_object (browser, "settings");
         g_object_set (settings,
                       "show-menubar", FALSE,
                       "show-navigationbar", TRUE,
+                      "show-panel", FALSE,
                       "toolbar-items", "Back,Forward,ReloadStop,Location",
                       "homepage", NULL,
                       "show-statusbar", TRUE,



More information about the Xfce4-commits mailing list