Add /occupants indent command

Roster has a `/roster contact indent` option.
Now we have the same for occupants. So contacts in roster and in MUC can
have configurable indentation.

Regards https://github.com/boothj5/profanity/issues/690
This commit is contained in:
Michael Vetter
2019-04-18 20:53:02 +02:00
parent 7e4e9e6688
commit 0c248a0b16
7 changed files with 80 additions and 3 deletions

View File

@@ -750,6 +750,28 @@ prefs_get_occupants_size(void)
}
}
gint
prefs_get_occupants_indent(void)
{
if (!g_key_file_has_key(prefs, PREF_GROUP_UI, "occupants.indent", NULL)) {
return 2;
}
gint result = g_key_file_get_integer(prefs, PREF_GROUP_UI, "occupants.indent", NULL);
if (result < 0) {
result = 0;
}
return result;
}
void
prefs_set_occupants_indent(gint value)
{
g_key_file_set_integer(prefs, PREF_GROUP_UI, "occupants.indent", value);
_save_prefs();
}
void
prefs_set_roster_size(gint value)
{