From f6be9c4972e22bc5886f23f208fac84c007891e0 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 11 Jul 2010 23:54:52 +0200 Subject: [PATCH] Read 'config' in app mode, if -c switch was specfified --- midori/main.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/midori/main.c b/midori/main.c index 9da5df2d..a29cc3ae 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, -- 2.39.5