diff options
Diffstat (limited to 'main/src/main.vala')
-rw-r--r-- | main/src/main.vala | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/main/src/main.vala b/main/src/main.vala index dfaa661e..bec2d752 100644 --- a/main/src/main.vala +++ b/main/src/main.vala @@ -4,18 +4,22 @@ using Dino.Ui; namespace Dino { void main(string[] args) { - Gtk.init(ref args); - Dino.Ui.Application app = new Dino.Ui.Application(); - Plugins.Loader loader = new Plugins.Loader(); - foreach(string plugin in new string[]{"omemo", "openpgp"}) { - try { - loader.load(plugin, app); - } catch (Error e) { - print(@"Error loading plugin $plugin: $(e.message)\n"); + try{ + Plugins.Loader loader = new Plugins.Loader(args.length > 0 ? args[0] : null); + Gtk.init(ref args); + Dino.Ui.Application app = new Dino.Ui.Application(); + foreach (string plugin in new string[]{"omemo", "openpgp"}) { + try { + loader.load(plugin, app); + } catch (Error e) { + print(@"Error loading plugin $plugin: $(e.message)\n"); + } } + app.run(args); + loader.shutdown(); + } catch (Error e) { + print(@"Fatal error: $(e.message)\n"); } - app.run(args); - loader.shutdown(); } }
\ No newline at end of file |