[libepc] gtk4: Replace call to gtk_init_width_args().



commit e72ec40f2bea4a704d473b3150cca9e306ca65c0
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 17 21:26:36 2017 +0100

    gtk4: Replace call to gtk_init_width_args().

 examples/consumer-ui.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/examples/consumer-ui.c b/examples/consumer-ui.c
index 2b0925d..7a19a60 100644
--- a/examples/consumer-ui.c
+++ b/examples/consumer-ui.c
@@ -197,6 +197,11 @@ main (int   argc,
   const gchar *application = "test-publisher";
   gboolean browse_all = FALSE;
 
+
+  /* Initialize the toolkit */
+
+  gtk_init ();
+
   GOptionEntry entries[] =
     {
       { "application", 'n', 0, G_OPTION_ARG_STRING, &application,
@@ -205,10 +210,9 @@ main (int   argc,
         N_("Browse all easy publishers"), NULL },
       { NULL, 0, 0, 0, NULL, NULL, NULL }
     };
-
-  /* Initialize the toolkit */
-
-  if (!gtk_init_with_args (&argc, &argv, NULL, entries, NULL, &error))
+  GOptionContext *context = g_option_context_new ("test-publisher");
+  g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+  if (!g_option_context_parse (context, &argc, &argv, &error))
     {
       g_print ("Usage error: %s\n", error->message);
       g_clear_error (&error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]