Allow hiding of empty presence groups: /roster {show,hide} empty (default is show)

This commit is contained in:
Daniel
2015-07-08 13:11:56 +02:00
parent 5e324e407f
commit 806afcc014
7 changed files with 36 additions and 4 deletions

View File

@@ -522,6 +522,7 @@ _get_group(preference_t pref)
case PREF_ROSTER:
case PREF_ROSTER_OFFLINE:
case PREF_ROSTER_RESOURCE:
case PREF_ROSTER_EMPTY:
case PREF_ROSTER_BY:
case PREF_RESOURCE_TITLE:
case PREF_RESOURCE_MESSAGE:
@@ -676,6 +677,8 @@ _get_key(preference_t pref)
return "roster.offline";
case PREF_ROSTER_RESOURCE:
return "roster.resource";
case PREF_ROSTER_EMPTY:
return "roster.empty";
case PREF_ROSTER_BY:
return "roster.by";
case PREF_RESOURCE_TITLE:
@@ -723,6 +726,7 @@ _get_default_boolean(preference_t pref)
case PREF_ROSTER:
case PREF_ROSTER_OFFLINE:
case PREF_ROSTER_RESOURCE:
case PREF_ROSTER_EMPTY:
return TRUE;
default:
return FALSE;

View File

@@ -65,6 +65,7 @@ typedef enum {
PREF_ROSTER_SIZE,
PREF_ROSTER_OFFLINE,
PREF_ROSTER_RESOURCE,
PREF_ROSTER_EMPTY,
PREF_ROSTER_BY,
PREF_MUC_PRIVILEGES,
PREF_PRESENCE,

View File

@@ -452,6 +452,7 @@ _load_preferences(void)
_set_boolean_preference("roster", PREF_ROSTER);
_set_boolean_preference("roster.offline", PREF_ROSTER_OFFLINE);
_set_boolean_preference("roster.resource", PREF_ROSTER_RESOURCE);
_set_boolean_preference("roster.empty", PREF_ROSTER_EMPTY);
_set_string_preference("roster.by", PREF_ROSTER_BY);
if (g_key_file_has_key(theme, "ui", "roster.size", NULL)) {
gint roster_size = g_key_file_get_integer(theme, "ui", "roster.size", NULL);