-
Notifications
You must be signed in to change notification settings - Fork 47
/
Settings.vala
76 lines (63 loc) · 2.5 KB
/
Settings.vala
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* Copyright (c) 2011-2016 Felipe Escoto (https://github.com/Philip-Scott/Notes-up)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authored by: Felipe Escoto <felescoto95@hotmail.com>
*/
public class ENotes.Services.Settings : Granite.Services.Settings {
private static Settings? instance = null;
public int pos_x { get; set; }
public int pos_y { get; set; }
public int window_width { get; set; }
public int window_height { get; set; }
public int panel_size { get; set; }
public int notebook_panel_size { get; set; }
public int mode { get; set; }
public int panes_visible { get; set; }
public int last_notebook { get; set; } // Deprecated
public int last_page { get; set; } // Deprecated
public bool auto_indent { get; set; }
public bool line_numbers { get; set; }
public bool import_files { get; set; } // Deprecated
public bool spellcheck { get; set; }
public bool show_page_info { get; set; }
public string notes_database { get; set; }
public string editor_font { get; set; }
public string editor_scheme { get; set; }
public string spellcheck_language { get; set; }
public string style_scheme { get; set; }
public string render_stylesheet { get; set; } // Deprecated
public string stylesheet { get; set; } // Deprecated
public string[] recent_files { get; set; }
public static Settings get_instance () {
if (instance == null) {
instance = new Settings ();
}
return instance;
}
private Settings () {
base ("org.notes");
var checked_files = new GLib.Array<string>();
foreach (var path in recent_files) {
var file = File.new_for_path (path);
if (file.query_exists ()) {
checked_files.append_val (path);
}
}
recent_files = checked_files.data;
}
}