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 <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2017-04-21 11:09:22 -04:00
parent a8f94e9443
commit 7558a32940
1 changed files with 7 additions and 0 deletions

View File

@ -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();