about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-03 23:39:20 +0000
committerJames Booth <boothj5@gmail.com>2016-02-03 23:39:20 +0000
commitbab75cae155b9a6b55afe404f674b7edc3eb8fa1 (patch)
tree735b07e1922efb6254312cd7e56b82467185d1d5 /src/config
parent19a3066e28166fddfdcad7177034d8e111aa5712 (diff)
downloadprofani-tty-bab75cae155b9a6b55afe404f674b7edc3eb8fa1.tar.gz
Implemented /console private setting
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c5
-rw-r--r--src/config/preferences.h1
-rw-r--r--src/config/theme.c1
3 files changed, 6 insertions, 1 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 932fe364..36f3df38 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1157,6 +1157,7 @@ _get_group(preference_t pref)
         case PREF_INPBLOCK_DYNAMIC:
         case PREF_TLS_SHOW:
         case PREF_CONSOLE_MUC:
+        case PREF_CONSOLE_PRIVATE:
         case PREF_CONSOLE_CHAT:
             return PREF_GROUP_UI;
         case PREF_STATES:
@@ -1382,6 +1383,8 @@ _get_key(preference_t pref)
             return "lastactivity";
         case PREF_CONSOLE_MUC:
             return "console.muc";
+        case PREF_CONSOLE_PRIVATE:
+            return "console.private";
         case PREF_CONSOLE_CHAT:
             return "console.chat";
         default:
@@ -1487,7 +1490,7 @@ _get_default_string(preference_t pref)
         case PREF_PGP_LOG:
             return "redact";
         case PREF_CONSOLE_MUC:
-            return "all";
+        case PREF_CONSOLE_PRIVATE:
         case PREF_CONSOLE_CHAT:
             return "all";
         default:
diff --git a/src/config/preferences.h b/src/config/preferences.h
index 4ca48df4..5bb219b1 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -133,6 +133,7 @@ typedef enum {
     PREF_TLS_SHOW,
     PREF_LASTACTIVITY,
     PREF_CONSOLE_MUC,
+    PREF_CONSOLE_PRIVATE,
     PREF_CONSOLE_CHAT,
 } preference_t;
 
diff --git a/src/config/theme.c b/src/config/theme.c
index fe6b9f63..1c4a3698 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -410,6 +410,7 @@ _load_preferences(void)
     _set_string_preference("statuses.chat", PREF_STATUSES_CHAT);
     _set_string_preference("statuses.muc", PREF_STATUSES_MUC);
     _set_string_preference("console.muc", PREF_CONSOLE_MUC);
+    _set_string_preference("console.private", PREF_CONSOLE_PRIVATE);
     _set_string_preference("console.chat", PREF_CONSOLE_CHAT);
     _set_string_preference("roster.by", PREF_ROSTER_BY);
     _set_string_preference("roster.order", PREF_ROSTER_ORDER);