I tried to follow the official tutorial to learn Gnome application development with modern Adwaita widgets. I managed to get to the last step without any problem, but my app fails to compile when I try to run adw_style_manager_get_default in the text_viewer_application_init function.
Did I get something wrong or is the tutorial to blame?
(process:2): Gdk-ERROR **: 00:31:06.667: gdk_display_manager_get() was called before gtk_init()
I managed to get the application to compile by adding a gtk_init(); at the beginning of the function, but I somehow know that’s not the right way to solve this problem.
Thanks in advance to those who can help me understand the issue at hand.
Thanks a lot @ebassi for your answer. I did manage to find, by myself, the exact same solution to this problem by replicating what I previously learned in Gtk’s official tutorials. You confirmed I made the correct technical choice (and I have to admit I’m quite proud of myself…)
Who could I contact to help update Gnome’s tutorial ? There are several other minor differences between what is taught and Gnome Builder’s default application code.