File tree Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public class Application : Gtk.Application {
9494
9595 // Conveniently, if there is no unsaved document, we just get NULL
9696 // Which AppWindow will process as a new unsaved doc
97- foreach (unsaved_document in pile_unsaved_documents. read_name() ) {
97+ foreach (unsaved_document in pile_unsaved_documents. read_name () ) {
9898
9999 debug (
100100 " Document is unsaved, creating an save location at: %s " ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace Slate.Utils {
88
99 public string get_new_document_name () {
1010 var name = _" New Document" ;
11-
11+
1212 if (created_documents > 1 ) {
1313 name = name + " " + created_documents. to_string ();
1414 }
@@ -26,14 +26,12 @@ namespace Slate.Utils {
2626 public void check_if_datadir () {
2727 debug (" do we have a data directory?" );
2828 var data_directory = File . new_for_path (Environment . get_user_data_dir ());
29- try {
30- if (! data_directory. query_exists ()) {
31- data_directory. make_directory ();
32- print(" Prepared target data directory" );
33- }
34- } catch (Error e) {
35- warning (" Failed to prepare target data directory %s\n " , e. message);
36- }
37- }
38-
29+ try {
30+ if (! data_directory. query_exists ()) {
31+ data_directory. make_directory ();
32+ }
33+ } catch (Error e) {
34+ warning (" Failed to prepare target data directory %s\n " , e. message);
35+ }
36+ }
3937}
Original file line number Diff line number Diff line change @@ -90,15 +90,9 @@ public class AppWindow : Gtk.Window {
9090
9191 debug ("Success !");
9292
93-
94- if (document == null ) {
95- new_empty_doc ();
96- }
97-
9893 open_file (document );
9994 }
10095
101-
10296 /* ---------------- FILE OPERATIONS ---------------- */
10397 public void open_file (File ? file = this .file ) {
10498 debug (" Attempting to open file %s " , file. get_basename ());
@@ -134,7 +128,7 @@ public class AppWindow : Gtk.Window {
134128 // We have to always check if nothing happened to datadir
135129 // This way if the user deleted in the meantime everything, we still can save unsaved docs
136130 if (is_new) {
137- Slate . Utils . check_if_datadir;
131+ Slate . Utils . check_if_datadir () ;
138132 }
139133
140134 try {
You can’t perform that action at this time.
0 commit comments