diff options
author | James Booth <boothj5@gmail.com> | 2016-01-27 23:02:28 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-01-27 23:02:28 +0000 |
commit | d4f1384b85b42dcb483d154a4fc170956d67801a (patch) | |
tree | c4125b5b6d455adffc6ba79f93f514a5cce56833 /src/config | |
parent | dbc52de0433de7ec441896832b2ec35fc4fb2fc4 (diff) | |
download | profani-tty-d4f1384b85b42dcb483d154a4fc170956d67801a.tar.gz |
Store /roster count setting
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/preferences.c | 7 | ||||
-rw-r--r-- | src/config/preferences.h | 1 | ||||
-rw-r--r-- | src/config/theme.c | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index bb85c682..8a15cccd 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -1112,6 +1112,7 @@ _get_group(preference_t pref) case PREF_ROSTER_ORDER: case PREF_ROSTER_UNREAD: case PREF_ROSTER_COUNT: + case PREF_ROSTER_COUNT_ZERO: case PREF_ROSTER_PRIORITY: case PREF_ROSTER_WRAP: case PREF_ROSTER_RESOURCE_JOIN: @@ -1311,6 +1312,8 @@ _get_key(preference_t pref) return "roster.unread"; case PREF_ROSTER_COUNT: return "roster.count"; + case PREF_ROSTER_COUNT_ZERO: + return "roster.count.zero"; case PREF_ROSTER_PRIORITY: return "roster.priority"; case PREF_ROSTER_WRAP: @@ -1383,7 +1386,7 @@ _get_default_boolean(preference_t pref) case PREF_ROSTER: case PREF_ROSTER_OFFLINE: case PREF_ROSTER_EMPTY: - case PREF_ROSTER_COUNT: + case PREF_ROSTER_COUNT_ZERO: case PREF_ROSTER_PRIORITY: case PREF_ROSTER_RESOURCE_JOIN: case PREF_ROSTER_CONTACTS: @@ -1415,6 +1418,8 @@ _get_default_string(preference_t pref) return "all"; case PREF_ROSTER_BY: return "presence"; + case PREF_ROSTER_COUNT: + return "unread"; case PREF_ROSTER_ORDER: return "presence"; case PREF_ROSTER_UNREAD: diff --git a/src/config/preferences.h b/src/config/preferences.h index 61ccbb11..32a924ba 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -71,6 +71,7 @@ typedef enum { PREF_ROSTER_ORDER, PREF_ROSTER_UNREAD, PREF_ROSTER_COUNT, + PREF_ROSTER_COUNT_ZERO, PREF_ROSTER_PRIORITY, PREF_ROSTER_WRAP, PREF_ROSTER_RESOURCE_JOIN, diff --git a/src/config/theme.c b/src/config/theme.c index e04a5d4a..b886f9e2 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -388,7 +388,7 @@ _load_preferences(void) _set_boolean_preference("roster.status", PREF_ROSTER_STATUS); _set_boolean_preference("roster.empty", PREF_ROSTER_EMPTY); _set_boolean_preference("roster.wrap", PREF_ROSTER_WRAP); - _set_boolean_preference("roster.count", PREF_ROSTER_COUNT); + _set_boolean_preference("roster.count.zero", PREF_ROSTER_COUNT_ZERO); _set_boolean_preference("roster.priority", PREF_ROSTER_PRIORITY); _set_boolean_preference("roster.contacts", PREF_ROSTER_CONTACTS); _set_boolean_preference("roster.rooms", PREF_ROSTER_ROOMS); @@ -417,6 +417,8 @@ _load_preferences(void) _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); + _set_string_preference("roster.count", PREF_ROSTER_COUNT); + if (g_key_file_has_key(theme, "ui", "occupants.size", NULL)) { gint occupants_size = g_key_file_get_integer(theme, "ui", "occupants.size", NULL); |