diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-16 15:02:42 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-16 15:21:06 (EDT) |
commit | 062b7e6d238f8d4fa3580087a4e2962ae322625f (patch) | |
tree | 21973ffb569c1beec89223035533cbd233f9bc26 /src | |
parent | aacdf776c6f59a4e24520480693348fcbff2abcd (diff) | |
download | marquee-062b7e6d238f8d4fa3580087a4e2962ae322625f.zip marquee-062b7e6d238f8d4fa3580087a4e2962ae322625f.tar.gz marquee-062b7e6d238f8d4fa3580087a4e2962ae322625f.tar.bz2 |
mq_window_new(): Accept NULL-terminated uris array
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/window.c | 3 | ||||
-rw-r--r-- | src/window.h | 2 |
3 files changed, 9 insertions, 4 deletions
@@ -32,6 +32,7 @@ static gchar *opt_profile; static gboolean opt_private; static gboolean opt_version; +static gchar **opt_uris; static GOptionEntry entries[] = { {"profile", 'P', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, @@ -46,6 +47,11 @@ static GOptionEntry entries[] = { &opt_version, "Show application version", NULL}, + {G_OPTION_REMAINING, '\0', + G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING_ARRAY, + &opt_uris, + "URIs", + NULL}, {NULL} }; @@ -73,7 +79,7 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } - mq_window_new(argc, argv); + mq_window_new(opt_uris); gtk_main(); diff --git a/src/window.c b/src/window.c index 416acf5..1158b38 100644 --- a/src/window.c +++ b/src/window.c @@ -26,8 +26,7 @@ #include "window.h" MqWindow * -mq_window_new(gint __attribute__((unused)) uri_c, - gchar __attribute__((unused)) *uri_v[]) +mq_window_new(gchar __attribute__((unused)) **uris) { MqWindow *window; diff --git a/src/window.h b/src/window.h index 1b39dbe..f14e5fc 100644 --- a/src/window.h +++ b/src/window.h @@ -23,4 +23,4 @@ typedef struct { GtkWidget *gtk_window; } MqWindow; -MqWindow *mq_window_new(gint uri_c, gchar *uri_v[]); +MqWindow *mq_window_new(gchar **uris); |