blob: 42349d918d2933aa11b3cb638e7beeb19c3f913b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
[CCode(cname="LOCALEDIR")] extern const string LOCALEDIR;
const string PROGRAM_NAME = "weltschmerz";
void warning(string message) {
stderr.printf("%s: %s\n", PROGRAM_NAME, message);
}
static int main(string[] args) {
Intl.bindtextdomain(PROGRAM_NAME, LOCALEDIR);
Intl.bind_textdomain_codeset(PROGRAM_NAME, "UTF-8");
Intl.textdomain(PROGRAM_NAME);
unowned string[]? nullargs = null;
Gtk.init(ref nullargs);
var window = new Gtk.Window();
window.destroy.connect(Gtk.main_quit);
window.set_icon_name("utilities-terminal");
var visual = window.screen.get_rgba_visual();
if (visual != null) {
window.set_visual(visual);
}
var css_provider = new Gtk.CssProvider();
css_provider.load_from_resource("/weltschmerz/css/terminal.css");
Gtk.StyleContext.add_provider_for_screen(window.screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER);
var terminal = new Terminal(args, window, window);
Unix.signal_add(Posix.Signal.USR1, () => {
terminal.load_config(true);
return Source.CONTINUE;
});
window.show_all();
Gtk.main();
return 0;
}
|