1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added rooms history to ProfAccount

This commit is contained in:
James Booth 2013-05-23 22:29:41 +01:00
parent 486cbd6245
commit 4d9148e734
2 changed files with 17 additions and 0 deletions

View File

@ -212,6 +212,22 @@ accounts_get_account(const char * const name)
account->priority_xa = g_key_file_get_integer(accounts, name, "priority.xa", NULL);
account->priority_dnd = g_key_file_get_integer(accounts, name, "priority.dnd", NULL);
// get room history
account->room_history = NULL;
gsize history_size = 0;
gchar **room_history_values = g_key_file_get_string_list(accounts, name,
"rooms.history", &history_size, NULL);
if (room_history_values != NULL) {
int i = 0;
for (i = 0; i < history_size; i++) {
account->room_history = g_slist_append(account->room_history,
strdup(room_history_values[i]));
}
g_strfreev(room_history_values);
}
return account;
}
}

View File

@ -38,6 +38,7 @@ typedef struct prof_account_t {
gint priority_xa;
gint priority_dnd;
gboolean enabled;
GSList *room_history;
} ProfAccount;
void accounts_load(void);