30 lines
730 B
Vala
30 lines
730 B
Vala
namespace StudySystemClient {
|
|
public class App : Gtk.Application {
|
|
public App() {
|
|
Object(application_id: "sh.wip.study-system-client");
|
|
}
|
|
|
|
protected override void activate() {
|
|
try {
|
|
var css_provider = new Gtk.CssProvider();
|
|
css_provider.load_from_resource(
|
|
"/sh/wip/studysystemclient/styles.css");
|
|
Gtk.StyleContext.add_provider_for_display(
|
|
Gdk.Display.get_default(),
|
|
css_provider,
|
|
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
|
|
new MainWindow(this, new Connection(Config.CERT_DIR));
|
|
} catch (Error e) {
|
|
stderr.printf("Failed to initialize: %s\n", e.message);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
int main(string[] args) {
|
|
var app = new StudySystemClient.App();
|
|
return app.run(args);
|
|
}
|