about summary refs log tree commit diff stats
path: root/src/config/preferences.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/preferences.c')
-rw-r--r--src/config/preferences.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 4fd96381..d93854cc 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -750,6 +750,40 @@ prefs_get_occupants_size(void)
     }
 }
 
+char
+prefs_get_occupants_char(void)
+{
+    char result = 0;
+
+    char *resultstr = g_key_file_get_string(prefs, PREF_GROUP_UI, "occupants.char", NULL);
+    if (!resultstr) {
+        result =  0;
+    } else {
+        result = resultstr[0];
+    }
+    free(resultstr);
+
+    return result;
+}
+
+void
+prefs_set_occupants_char(char ch)
+{
+    char str[2];
+    str[0] = ch;
+    str[1] = '\0';
+
+    g_key_file_set_string(prefs, PREF_GROUP_UI, "occupants.char", str);
+    _save_prefs();
+}
+
+void
+prefs_clear_occupants_char(void)
+{
+    g_key_file_remove_key(prefs, PREF_GROUP_UI, "occupants.char", NULL);
+    _save_prefs();
+}
+
 gint
 prefs_get_occupants_indent(void)
 {
6 13:58:26 +0200 Add Travis CI tests for Arch, Debian and OSX/macOS' href='/danisanti/profani-tty/commit/Dockerfile.arch?id=3700c80ad1258885256fa963dd8a13ab84853170'>3700c80a ^
9ecd37a4 ^

3700c80a ^











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


























                                                               

        






                                                                 



                                                                                           

                                                                                    
 

                                         
 




                                                 

                                                                                 











                                                           
>