about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-01-24 01:04:21 +0000
committerJames Booth <boothj5@gmail.com>2016-01-24 01:04:21 +0000
commit6d8a3e2020067a9a322b27a311e83a892f79962e (patch)
tree74b39432e8257b1a5ee05352ae0ba327c17c40e2 /src/config
parent67abfaa21e02ae17baf212d65a5e6a999929633a (diff)
downloadprofani-tty-6d8a3e2020067a9a322b27a311e83a892f79962e.tar.gz
Added /roster private command
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, 7 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 51c72095..f42966da 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1051,6 +1051,7 @@ _get_group(preference_t pref)
         case PREF_ROSTER_ROOMS_POS:
         case PREF_ROSTER_ROOMS_ORDER:
         case PREF_ROSTER_ROOMS_UNREAD:
+        case PREF_ROSTER_PRIVATE:
         case PREF_RESOURCE_TITLE:
         case PREF_RESOURCE_MESSAGE:
         case PREF_ENC_WARN:
@@ -1257,6 +1258,8 @@ _get_key(preference_t pref)
             return "roster.rooms.order";
         case PREF_ROSTER_ROOMS_UNREAD:
             return "roster.rooms.unread";
+        case PREF_ROSTER_PRIVATE:
+            return "roster.private";
         case PREF_RESOURCE_TITLE:
             return "resource.title";
         case PREF_RESOURCE_MESSAGE:
@@ -1353,6 +1356,8 @@ _get_default_string(preference_t pref)
             return "name";
         case PREF_ROSTER_ROOMS_UNREAD:
             return "after";
+        case PREF_ROSTER_PRIVATE:
+            return "room";
         case PREF_TIME_CONSOLE:
             return "%H:%M:%S";
         case PREF_TIME_CHAT:
diff --git a/src/config/preferences.h b/src/config/preferences.h
index b8b77040..4d3a54c7 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -79,6 +79,7 @@ typedef enum {
     PREF_ROSTER_ROOMS_POS,
     PREF_ROSTER_ROOMS_ORDER,
     PREF_ROSTER_ROOMS_UNREAD,
+    PREF_ROSTER_PRIVATE,
     PREF_MUC_PRIVILEGES,
     PREF_PRESENCE,
     PREF_WRAP,
diff --git a/src/config/theme.c b/src/config/theme.c
index 14c165f6..37a449a6 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -414,6 +414,7 @@ _load_preferences(void)
     _set_string_preference("roster.rooms.order", PREF_ROSTER_ROOMS_ORDER);
     _set_string_preference("roster.rooms.unread", PREF_ROSTER_ROOMS_UNREAD);
     _set_string_preference("roster.rooms.pos", PREF_ROSTER_ROOMS_POS);
+    _set_string_preference("roster.private", PREF_ROSTER_PRIVATE);
     if (g_key_file_has_key(theme, "ui", "roster.size", NULL)) {
         gint roster_size = g_key_file_get_integer(theme, "ui", "roster.size", NULL);
         prefs_set_roster_size(roster_size);