aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_gtk2.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-08-21 05:00:54 +0000
committerDavid Robillard <d@drobilla.net>2011-08-21 05:00:54 +0000
commitbdfc77e8cd8a586e535f5eab109dd0411e0554a0 (patch)
treedbd5aca9ff69682c4a67e5441f024e47f0f07604 /src/jalv_gtk2.c
parent6084d3995a42001b1169cc3e8d50c4b7acf0deb6 (diff)
downloadjalv-bdfc77e8cd8a586e535f5eab109dd0411e0554a0.tar.gz
jalv-bdfc77e8cd8a586e535f5eab109dd0411e0554a0.tar.bz2
jalv-bdfc77e8cd8a586e535f5eab109dd0411e0554a0.zip
Preliminary support for Jack Session and LV2 Persist.
Real command line argument support. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3441 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv_gtk2.c')
-rw-r--r--src/jalv_gtk2.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/jalv_gtk2.c b/src/jalv_gtk2.c
index 59e9772..7d5bd5a 100644
--- a/src/jalv_gtk2.c
+++ b/src/jalv_gtk2.c
@@ -24,14 +24,26 @@ static void destroy(GtkWidget* widget,
gtk_main_quit();
}
-void
-jalv_init(int* argc, char*** argv)
+int
+jalv_init(int* argc, char*** argv, JalvOptions* opts)
{
+ GOptionEntry entries[] = {
+ { "uuid", 'u', 0, G_OPTION_ARG_STRING, &opts->uuid,
+ "UUID for Jack session restoration", "UUID" },
+ { "load", 'l', 0, G_OPTION_ARG_STRING, &opts->load,
+ "Load state from save directory", "DIR" },
+ { 0,0,0,0,0,0,0 } };
GError* error = NULL;
- gtk_init_with_args(
+ const int err = gtk_init_with_args(
argc, argv,
- "PLUGIN_URI [JACK_UUID] - Run an LV2 plugin as a Jack application",
- NULL, NULL, &error);
+ "PLUGIN_URI - Run an LV2 plugin as a Jack application",
+ entries, NULL, &error);
+
+ if (!err) {
+ fprintf(stderr, "%s\n", error->message);
+ }
+
+ return !err;
}
LilvNode*