Humble Bundle support
[GameHub.git] / src / app.vala
blobd1c24d3a0273840c71bc5b01d22d06b9d90f730e
1 using Gtk;
2 using Gdk;
3 using Granite;
5 using GameHub.Data;
6 using GameHub.Data.Sources.Steam;
7 using GameHub.Data.Sources.GOG;
8 using GameHub.Data.Sources.Humble;
9 using GameHub.Utils;
11 namespace GameHub
13 public class Application: Granite.Application
15 construct
17 application_id = ProjectConfig.PROJECT_NAME;
18 flags = ApplicationFlags.FLAGS_NONE;
19 program_name = "GameHub";
20 build_version = ProjectConfig.VERSION;
23 protected override void activate()
25 weak IconTheme default_theme = IconTheme.get_default();
26 default_theme.add_resource_path("/com/github/tkashkin/gamehub/icons");
28 var provider = new CssProvider();
29 provider.load_from_resource("/com/github/tkashkin/gamehub/GameHub.css");
30 StyleContext.add_provider_for_screen(Screen.get_default(), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
32 new GameHub.UI.Windows.MainWindow(this).show_all();
35 public static int main(string[] args)
37 //Ivy.Stacktrace.register_handlers();
39 Intl.setlocale(LocaleCategory.ALL, "");
40 Intl.textdomain(ProjectConfig.GETTEXT_PACKAGE);
42 FSUtils.make_dirs();
44 GamesDB.init();
46 GameSources = { new Steam(), new GOG(), new Humble() };
48 var app = new Application();
49 return app.run(args);