@@ -20,7 +20,7 @@ namespace jorts {
2020 public class Application : Gtk .Application {
2121 public Gee . ArrayList<MainWindow > open_notes = new Gee .ArrayList<MainWindow > ();
2222 private static bool create_new_window = false ;
23- // private static bool show_all = false;
23+
2424 public static GLib . Settings gsettings;
2525 public static Settings animation_settings;
2626 public Application () {
@@ -33,26 +33,31 @@ namespace jorts {
3333 public override void startup () {
3434 base . startup ();
3535
36+ // The localization thingamabob
3637 Intl . setlocale (LocaleCategory . ALL , " " );
3738 Intl . bindtextdomain (GETTEXT_PACKAGE , LOCALEDIR );
3839 Intl . bind_textdomain_codeset (GETTEXT_PACKAGE , " UTF-8" );
3940 Intl . textdomain (GETTEXT_PACKAGE );
4041
41- // FIXME: Dark breaks a few things: border, font of editablelabel, buttons in popover
42+
43+ // Force the eOS icon theme, and set the blueberry as fallback, if for some reason it fails for individual notes
4244 var granite_settings = Granite . Settings . get_default ();
4345 var gtk_settings = Gtk . Settings . get_default ();
46+ gtk_settings. gtk_icon_theme_name = " elementary" ;
47+ gtk_settings. gtk_theme_name = " io.elementary.stylesheet.blueberry" ;
48+
49+ // Also follow dark if system is dark lIke mY sOul.
4450 gtk_settings. gtk_application_prefer_dark_theme = (
4551 granite_settings. prefers_color_scheme == DARK
4652 );
4753
4854 granite_settings. notify[" prefers-color-scheme" ]. connect (() = > {
49- gtk_settings. gtk_application_prefer_dark_theme = (
50- granite_settings. prefers_color_scheme == DARK
51- );
55+ gtk_settings. gtk_application_prefer_dark_theme = (
56+ granite_settings. prefers_color_scheme == DARK
57+ );
5258 });
5359
5460
55-
5661 // build all the stylesheets
5762 jorts. Themer . init_all_themes();
5863 }
@@ -114,8 +119,9 @@ namespace jorts {
114119
115120 }
116121
117- // Either show all windows, or rebuild from storage
122+ // Clicked: Either show all windows, or rebuild from storage
118123 protected override void activate () {
124+
119125 // Test Lang
120126 // GLib.Environment.set_variable ("LANGUAGE", "pt_br", true);
121127
@@ -127,12 +133,11 @@ namespace jorts {
127133 }
128134 } else {
129135 this . init_all_notes ();
130- // this.follow_animations_settings();
131136 }
132137 }
133138
134139
135- // create new instances of MainWindow
140+ // Create new instances of MainWindow
136141 public void create_note (noteData ? data ) {
137142 MainWindow note;
138143 if (data != null ) {
@@ -149,10 +154,6 @@ namespace jorts {
149154 }
150155 this . open_notes. add(note);
151156 this . save_to_stash ();
152-
153-
154-
155- Granite . Services . Application . set_badge. begin ((open_notes. size));
156157 }
157158
158159 // Simply remove from the list of things to save, and close
0 commit comments