anotherim-desktop/main/src/main.vala

30 lines
828 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));
2022-02-14 13:55:59 +00:00
Gtk.init();
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);
2021-03-19 22:09:56 +00:00
loader.load_all();
app.run(args);
loader.shutdown();
} catch (Error e) {
2019-03-15 19:56:19 +00:00
warning(@"Fatal error: $(e.message)");
2017-03-10 18:34:56 +00:00
}
}
}