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:
parent
a8f94e9443
commit
7558a32940
|
@ -70,9 +70,16 @@ static int __ocarina_command_line(GApplication *application,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GVariantDict *options;
|
GVariantDict *options;
|
||||||
|
gchar **args;
|
||||||
|
|
||||||
g_application_activate(application);
|
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);
|
options = g_application_command_line_get_options_dict(command);
|
||||||
if (g_variant_dict_contains(options, "next"))
|
if (g_variant_dict_contains(options, "next"))
|
||||||
audio_next();
|
audio_next();
|
||||||
|
|
Loading…
Reference in New Issue