Move init functions into main where they should be

It seems that libadwaita does not like being initialized too early. Move the init function into the beggining of main() to make it happy.
This commit is contained in:
Rafał Dzięgiel
2021-08-27 12:56:58 +02:00
parent 12ce95b664
commit ad563d16d0
2 changed files with 7 additions and 9 deletions

View File

@@ -5,14 +5,13 @@ imports.gi.versions.Soup = '2.4';
pkg.initGettext();
const { GstClapper, Gtk, Adw } = imports.gi;
GstClapper.Clapper.gst_init(null);
Gtk.init();
Adw.init();
const { App } = imports.src.app;
function main(argv)
{
GstClapper.Clapper.gst_init(null);
Gtk.init();
Adw.init();
new App().run(argv);
}

View File

@@ -5,10 +5,6 @@ imports.gi.versions.Soup = '2.4';
pkg.initGettext();
const { Gtk, Adw } = imports.gi;
Gtk.init();
Adw.init();
const { AppRemote } = imports.src.appRemote;
const Misc = imports.src.misc;
@@ -19,5 +15,8 @@ Misc.appId += '.' + ID_POSTFIX;
function main(argv)
{
Gtk.init();
Adw.init();
new AppRemote().run(argv);
}