From 2c7e567f05eb31aa3b78ed83fd92a09153525210 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 28 Dec 2016 08:53:22 -0500 Subject: Update callers Adapt all our tests and examples to the new initialization api. --- tests/testfilechooser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/testfilechooser.c') diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 6d31224226..5cb628a1e2 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -540,13 +540,19 @@ main (int argc, char **argv) { "initial-folder", 'F', 0, G_OPTION_ARG_FILENAME, &initial_folder, "Initial folder to show", "FILENAME" }, { NULL } }; + GOptionContext *context; - if (!gtk_init_with_args (&argc, &argv, "", options, NULL, &error)) + context = g_option_context_new (""); + g_option_context_add_main_entries (context, options, NULL); + if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("Failed to parse args: %s\n", error->message); g_error_free (error); return 1; } + g_option_context_free (context); + + gtk_init (); if (initial_filename && initial_folder) { -- cgit v1.2.1