From: Christian Dywan Date: Mon, 7 Jun 2010 19:48:23 +0000 (+0200) Subject: Implement MIDORI_UNARMED variable for 'dry run' X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd2e0b7aedf8d5e0c8ae8db7e9b3bf01d7b875bb;p=midori Implement MIDORI_UNARMED variable for 'dry run' --- diff --git a/INSTALL b/INSTALL index 5df8a1a4..af519fb0 100644 --- a/INSTALL +++ b/INSTALL @@ -61,6 +61,10 @@ If you are interested in (non-) touchscreen behaviour, try this: 'MIDORI_TOUCHSCREEN=0 _build_/default/midori/midori' +If you want to "dry run" without WebKitGTK+ rendering, try this: + +'MIDORI_UNARMED=1 _build_/default/midori/midori' + For further information a tutorial for gdb and reading up on how you can install debugging symbols for libraries used by Midori are recommended. diff --git a/midori/main.c b/midori/main.c index 759dc81f..91e5c5be 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1200,7 +1200,8 @@ midori_load_extensions (gpointer data) } g_strfreev (active_extensions); - g_idle_add (midori_load_netscape_plugins, app); + if (g_getenv ("MIDORI_UNARMED") == NULL) + g_idle_add (midori_load_netscape_plugins, app); #ifdef G_ENABLE_DEBUG if (startup_timer) diff --git a/midori/midori-view.c b/midori/midori-view.c index 684b3bc4..20d1ad68 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -3455,7 +3455,7 @@ midori_view_set_uri (MidoriView* view, /* Treat "about:blank" and "" equally, see midori_view_is_blank(). */ if (!uri || !strcmp (uri, "about:blank")) uri = ""; - if (1) + if (g_getenv ("MIDORI_UNARMED") == NULL) { if (!view->web_view) midori_view_construct_web_view (view); @@ -4674,6 +4674,9 @@ midori_view_get_previous_page (MidoriView* view) g_return_val_if_fail (MIDORI_IS_VIEW (view), NULL); + if (!view->web_view) + return NULL; + web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view->web_view)); js_context = webkit_web_frame_get_global_context (web_frame); katze_assign (uri, sokoke_js_script_eval (js_context, @@ -4731,6 +4734,9 @@ midori_view_get_next_page (MidoriView* view) g_return_val_if_fail (MIDORI_IS_VIEW (view), NULL); + if (!view->web_view) + return NULL; + web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view->web_view)); js_context = webkit_web_frame_get_global_context (web_frame); katze_assign (uri, sokoke_js_script_eval (js_context,