Added autoping timeout preference

This commit is contained in:
James Booth
2016-01-01 19:50:13 +00:00
parent 94b0d2c6da
commit f27cae68c5
8 changed files with 84 additions and 23 deletions

View File

@@ -513,6 +513,23 @@ prefs_set_autoping(gint value)
_save_prefs();
}
gint
prefs_get_autoping_timeout(void)
{
if (!g_key_file_has_key(prefs, PREF_GROUP_CONNECTION, "autoping.timeout", NULL)) {
return 5;
} else {
return g_key_file_get_integer(prefs, PREF_GROUP_CONNECTION, "autoping.timeout", NULL);
}
}
void
prefs_set_autoping_timeout(gint value)
{
g_key_file_set_integer(prefs, PREF_GROUP_CONNECTION, "autoping.timeout", value);
_save_prefs();
}
gint
prefs_get_autoaway_time(void)
{

View File

@@ -156,6 +156,8 @@ void prefs_set_reconnect(gint value);
gint prefs_get_reconnect(void);
void prefs_set_autoping(gint value);
gint prefs_get_autoping(void);
void prefs_set_autoping_timeout(gint value);
gint prefs_get_autoping_timeout(void);
gint prefs_get_inpblock(void);
void prefs_set_inpblock(gint value);