From 7558a32940e93e944d5f4a9a3b079e02a3ea3d25 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 21 Apr 2017 11:09:22 -0400 Subject: [PATCH] gui/ocarina: Load filepaths from the command line If multiple paths are passed, then only load the first one to keep things simple. Implements #102: Allow outside tracks Signed-off-by: Anna Schumaker --- gui/ocarina.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gui/ocarina.c b/gui/ocarina.c index 6b93ed57..9685cedd 100644 --- a/gui/ocarina.c +++ b/gui/ocarina.c @@ -70,9 +70,16 @@ static int __ocarina_command_line(GApplication *application, gpointer data) { GVariantDict *options; + gchar **args; g_application_activate(application); + args = g_application_command_line_get_arguments(command, NULL); + if (args && args[1]) { + audio_load_filepath(args[1]); + g_strfreev(args); + } + options = g_application_command_line_get_options_dict(command); if (g_variant_dict_contains(options, "next")) audio_next();