summaryrefslogtreecommitdiff
path: root/tests/rendernode.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-12-28 08:53:22 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-12-28 18:57:55 -0500
commit1ae7240932cd1be164c5dc94f8767afa541f1e83 (patch)
tree322700689717e8ed5ddd2423111c88c6aef77743 /tests/rendernode.c
parenta3e2fc2df6ed9e896aa553a3acc1a5c363914d09 (diff)
downloadgtk+-no-init-args.tar.gz
Update callersno-init-args
Adapt all our tests and examples to the new initialization api.
Diffstat (limited to 'tests/rendernode.c')
-rw-r--r--tests/rendernode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/rendernode.c b/tests/rendernode.c
index 42781a11f5..8efdebc02b 100644
--- a/tests/rendernode.c
+++ b/tests/rendernode.c
@@ -24,14 +24,18 @@ main(int argc, char **argv)
char *contents;
gsize len;
int run;
+ GOptionContext *context;
- if (!gtk_init_with_args (&argc, &argv, "NODE-FILE PNG-FILE",
- options, NULL, &error))
+ context = g_option_context_new ("NODE-FILE PNG-FILE");
+ g_option_context_add_main_entries (context, options, NULL);
+ if (!g_option_context_parse (context, &argc, &argv, &error))
{
g_printerr ("Option parsing failed: %s\n", error->message);
return 1;
}
+ gtk_init ();
+
if (runs < 1)
{
g_printerr ("Number of runs given with -r/--runs must be at least 1 and not %d.\n", runs);