|
21 | 21 | */ |
22 | 22 |
|
23 | 23 | public class Tomato : Gtk.Application { |
24 | | - public MainWindow main_window; |
| 24 | + public MainWindow main_window; |
25 | 25 |
|
26 | | - public Tomato () { |
27 | | - Object ( |
28 | | - application_id: "io.github.ellie_commons.tomato", |
29 | | - flags: ApplicationFlags.FLAGS_NONE |
30 | | - ); |
31 | | - } |
| 26 | + public Tomato () { |
| 27 | + Object ( |
| 28 | + application_id: "io.github.ellie_commons.tomato", |
| 29 | + flags: ApplicationFlags.FLAGS_NONE |
| 30 | + ); |
| 31 | + } |
32 | 32 |
|
33 | | - protected override void startup () { |
34 | | - base.startup (); |
| 33 | + protected override void startup () { |
| 34 | + base.startup (); |
35 | 35 |
|
36 | | - Granite.init (); |
| 36 | + Granite.init (); |
37 | 37 |
|
38 | | - Intl.setlocale (LocaleCategory.ALL, ""); |
39 | | - Intl.bindtextdomain (Build.GETTEXT_PACKAGE, Build.LOCALEDIR); |
40 | | - Intl.bind_textdomain_codeset (Build.GETTEXT_PACKAGE, "UTF-8"); |
41 | | - Intl.textdomain (Build.GETTEXT_PACKAGE); |
| 38 | + Intl.setlocale (LocaleCategory.ALL, ""); |
| 39 | + Intl.bindtextdomain (Build.GETTEXT_PACKAGE, Build.LOCALEDIR); |
| 40 | + Intl.bind_textdomain_codeset (Build.GETTEXT_PACKAGE, "UTF-8"); |
| 41 | + Intl.textdomain (Build.GETTEXT_PACKAGE); |
42 | 42 |
|
43 | | - var quit_action = new SimpleAction ("quit", null); |
| 43 | + var quit_action = new SimpleAction ("quit", null); |
44 | 44 |
|
45 | | - add_action (quit_action); |
46 | | - set_accels_for_action ("app.quit", {"<Control>q"}); |
| 45 | + add_action (quit_action); |
| 46 | + set_accels_for_action ("app.quit", {"<Control>q"}); |
47 | 47 |
|
48 | | - quit_action.activate.connect (quit); |
49 | | - } |
| 48 | + quit_action.activate.connect (quit); |
| 49 | + } |
50 | 50 |
|
51 | | - protected override void activate () { |
52 | | - if (main_window != null) { |
53 | | - main_window.present (); |
54 | | - return; |
55 | | - } |
| 51 | + protected override void activate () { |
| 52 | + if (main_window != null) { |
| 53 | + main_window.present (); |
| 54 | + return; |
| 55 | + } |
56 | 56 |
|
57 | | - var main_window = new MainWindow (this); |
| 57 | + var main_window = new MainWindow (this); |
58 | 58 |
|
59 | | - // Use Css |
60 | | - var provider = new Gtk.CssProvider (); |
61 | | - provider.load_from_resource ("/io/github/ellie_commons/tomato/Application.css"); |
| 59 | + // Use Css |
| 60 | + var provider = new Gtk.CssProvider (); |
| 61 | + provider.load_from_resource ("/io/github/ellie_commons/tomato/Application.css"); |
62 | 62 |
|
63 | | - Gtk.StyleContext.add_provider_for_display ( |
64 | | - Gdk.Display.get_default (), |
65 | | - provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION |
66 | | - ); |
| 63 | + Gtk.StyleContext.add_provider_for_display ( |
| 64 | + Gdk.Display.get_default (), |
| 65 | + provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION |
| 66 | + ); |
67 | 67 |
|
68 | | - main_window.present (); |
69 | | - } |
| 68 | + main_window.present (); |
| 69 | + } |
70 | 70 |
|
71 | | - public static int main (string[] args) { |
72 | | - return new Tomato ().run (args); |
73 | | - } |
| 71 | + public static int main (string[] args) { |
| 72 | + return new Tomato ().run (args); |
| 73 | + } |
74 | 74 | } |
0 commit comments