From 9adf9458b01115cbb046eb46306a1c0d3801d46e Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 7 Dec 2009 20:52:32 +0100 Subject: [PATCH] Support executing multiple passed commands one after another --- midori/main.c | 9 ++++++++- midori/midori-app.c | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/midori/main.c b/midori/main.c index 66df49d4..9d45f382 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1769,7 +1769,14 @@ main (int argc, gtk_widget_show (GTK_WIDGET (browser)); midori_browser_activate_action (browser, "Location"); if (execute) - midori_browser_activate_action (browser, *uris); + { + i = 0; + while (uris[i] != NULL) + { + midori_browser_activate_action (browser, uris[i]); + i++; + } + } gtk_main (); return 0; } diff --git a/midori/midori-app.c b/midori/midori-app.c index cb756e1e..b981c251 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -489,9 +489,15 @@ midori_app_command_received (MidoriApp* app, } else if (g_str_equal (command, "command")) { + guint i = 0; + if (!uris || !app->browser) return FALSE; - midori_browser_activate_action (app->browser, *uris); + while (uris[i] != NULL) + { + midori_browser_activate_action (app->browser, uris[i]); + i++; + } return TRUE; } -- 2.39.5