From 9a58017385f89e70ae820927cd2b2d8479b57cf4 Mon Sep 17 00:00:00 2001 From: Backalor Date: Tue, 22 Jan 2013 09:54:59 +0900 Subject: [PATCH] Add function prototype and make the default for the /statuses command be ON --- src/command.c | 1 + src/preferences.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index 2543e2ca..f372bd3f 100644 --- a/src/command.c +++ b/src/command.c @@ -118,6 +118,7 @@ static gboolean _cmd_set_gone(gchar **args, struct cmd_help_t help); static gboolean _cmd_set_autoping(gchar **args, struct cmd_help_t help); static gboolean _cmd_set_titlebar(gchar **args, struct cmd_help_t help); static gboolean _cmd_set_autoaway(gchar **args, struct cmd_help_t help); +static gboolean _cmd_set_statuses(gchar **args, struct cmd_help_t help); static gboolean _cmd_vercheck(gchar **args, struct cmd_help_t help); static gboolean _cmd_away(gchar **args, struct cmd_help_t help); static gboolean _cmd_online(gchar **args, struct cmd_help_t help); diff --git a/src/preferences.c b/src/preferences.c index c4283269..97a2041e 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -413,7 +413,11 @@ prefs_set_splash(gboolean value) gboolean prefs_get_statuses(void) { - return g_key_file_get_boolean(prefs, "ui", "statuses", NULL); + if (g_key_file_has_key(prefs, "ui", "statuses", NULL)) { + return g_key_file_get_boolean(prefs, "ui", "statuses", NULL); + } else { + return TRUE; + } } void