aboutsummaryrefslogtreecommitdiff
path: root/main/src/main.vala
blob: bec2d752e1b8dce64ad2ca8b847112cb8adffc7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Dino.Entities;
using Dino.Ui;

namespace Dino {

void main(string[] args) {
    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");
    }
}

}