[libadwaita/wip/exalm/init] main: Make adw_init() call gtk_init()




commit 56fac87f0679a3e262499df5a91be2e7f17e8418
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Nov 2 16:59:59 2021 +0500

    main: Make adw_init() call gtk_init()
    
    Make it easier to use, so that there's no need to call gtk_init() manually
    or to put it into the startup() handler with GApplication.
    
    See https://gitlab.gnome.org/GNOME/libadwaita/-/issues/30

 src/adw-main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/adw-main.c b/src/adw-main.c
index e2d01919..f2147f84 100644
--- a/src/adw-main.c
+++ b/src/adw-main.c
@@ -18,9 +18,8 @@ static int adw_initialized = FALSE;
  *
  * Initializes Libadwaita.
  *
- * Call this function just after initializing GTK, if you are using
- * [class@Gtk.Application] it means it must be called when the
- * [signal@Gio.Application::startup] signal is emitted.
+ * This function can be used instead of [func Gtk init] as it initializes GTK
+ * implicitly.
  *
  * There's no need to call this function if you're using [class@Adw.Application].
  *
@@ -37,6 +36,8 @@ adw_init (void)
   if (adw_initialized)
     return;
 
+  gtk_init ();
+
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   adw_init_public_types ();


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