summaryrefslogtreecommitdiff
path: root/tests/testfilechooser.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-12-28 08:53:22 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-01-19 13:50:17 -0500
commit2c7e567f05eb31aa3b78ed83fd92a09153525210 (patch)
treea37b930ca56af69554ef2f8c49e3efbb56fcab00 /tests/testfilechooser.c
parent4d7fa52fe9e41f7d3f1b54b6f82bd28f99b7ec92 (diff)
downloadgtk+-2c7e567f05eb31aa3b78ed83fd92a09153525210.tar.gz
Update callers
Adapt all our tests and examples to the new initialization api.
Diffstat (limited to 'tests/testfilechooser.c')
-rw-r--r--tests/testfilechooser.c8
1 files changed, 7 insertions, 1 deletions
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)
{