Support executing multiple passed commands one after another

This commit is contained in:
Christian Dywan 2009-12-07 20:52:32 +01:00
parent 23a2d8e491
commit 9adf9458b0
2 changed files with 15 additions and 2 deletions

View file

@ -1769,7 +1769,14 @@ main (int argc,
gtk_widget_show (GTK_WIDGET (browser)); gtk_widget_show (GTK_WIDGET (browser));
midori_browser_activate_action (browser, "Location"); midori_browser_activate_action (browser, "Location");
if (execute) if (execute)
midori_browser_activate_action (browser, *uris); {
i = 0;
while (uris[i] != NULL)
{
midori_browser_activate_action (browser, uris[i]);
i++;
}
}
gtk_main (); gtk_main ();
return 0; return 0;
} }

View file

@ -489,9 +489,15 @@ midori_app_command_received (MidoriApp* app,
} }
else if (g_str_equal (command, "command")) else if (g_str_equal (command, "command"))
{ {
guint i = 0;
if (!uris || !app->browser) if (!uris || !app->browser)
return FALSE; return FALSE;
midori_browser_activate_action (app->browser, *uris); while (uris[i] != NULL)
{
midori_browser_activate_action (app->browser, uris[i]);
i++;
}
return TRUE; return TRUE;
} }