anotherim-desktop/main/src/main.vala

30 lines
835 B
Vala
Raw Normal View History

2017-03-10 18:34:56 +00:00
using Dino.Entities;
using Dino.Ui;
2017-04-07 09:09:47 +00:00
extern const string GETTEXT_PACKAGE;
extern const string LOCALE_INSTALL_DIR;
2017-03-10 18:34:56 +00:00
namespace Dino {
void main(string[] args) {
2017-04-07 09:09:47 +00:00
try{
string? exec_path = args.length > 0 ? args[0] : null;
2017-04-07 09:09:47 +00:00
SearchPathGenerator search_path_generator = new SearchPathGenerator(exec_path);
Intl.textdomain(GETTEXT_PACKAGE);
internationalize(GETTEXT_PACKAGE, search_path_generator.get_locale_path(GETTEXT_PACKAGE, LOCALE_INSTALL_DIR));
Gtk.init(ref args);
2017-04-07 09:09:47 +00:00
Dino.Ui.Application app = new Dino.Ui.Application() { search_path_generator=search_path_generator };
Plugins.Loader loader = new Plugins.Loader(app);
loader.loadAll();
app.run(args);
loader.shutdown();
} catch (Error e) {
print(@"Fatal error: $(e.message)\n");
2017-03-10 18:34:56 +00:00
}
}
}