reclaim/src/Application.vala

42 lines
1.1 KiB
Vala
Raw Normal View History

2021-12-30 13:48:27 -05:00
public class Reclaim.Application : Gtk.Application {
public static GLib.Settings settings;
private MainWindow? main_window = null;
construct {
flags |= ApplicationFlags.HANDLES_COMMAND_LINE;
application_id = "org.bonerbonerboner.reclaim";
Intl.setlocale (LocaleCategory.ALL, "");
Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
Intl.textdomain (Config.GETTEXT_PACKAGE);
}
static construct {
// settings = new GLib.Settings ("org.bonerbonerboner.reclaim");
}
public override void activate () {
if (main_window == null) {
main_window = new MainWindow (this);
main_window.show_all ();
}
main_window.present ();
}
public override int command_line (ApplicationCommandLine command_line) {
activate ();
return 0;
}
public static int main (string[] args) {
var app = new Reclaim.Application ();
return app.run (args);
}
}