diff options
author | James Booth <boothj5@gmail.com> | 2014-12-21 18:15:29 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-12-21 18:15:29 +0000 |
commit | 13f73a30e73f0349968f827e4003b3b4c84ebbf3 (patch) | |
tree | 9e764dba0765c15a814855bf52f69147d3405ecd /src/config | |
parent | 79d4cbe967a4e27b291695778a928a5cdd59388c (diff) | |
download | profani-tty-13f73a30e73f0349968f827e4003b3b4c84ebbf3.tar.gz |
Added /inpblock command
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/preferences.c | 18 | ||||
-rw-r--r-- | src/config/preferences.h | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index baf3e853..7bc56999 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -61,6 +61,8 @@ #define PREF_GROUP_ALIAS "alias" #define PREF_GROUP_OTR "otr" +#define INPBLOCK_DEFAULT 20 + static gchar *prefs_loc; static GKeyFile *prefs; gint log_maxsize = 0; @@ -261,6 +263,22 @@ prefs_set_max_log_size(gint value) _save_prefs(); } +gint prefs_get_inpblock(void) +{ + int val = g_key_file_get_integer(prefs, PREF_GROUP_UI, "inpblock", NULL); + if (val == 0) { + return INPBLOCK_DEFAULT; + } else { + return val; + } +} + +void prefs_set_inpblock(gint value) +{ + g_key_file_set_integer(prefs, PREF_GROUP_UI, "inpblock", value); + _save_prefs(); +} + gint prefs_get_priority(void) { diff --git a/src/config/preferences.h b/src/config/preferences.h index d2a3fafd..cc95c6e9 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -123,6 +123,8 @@ void prefs_set_reconnect(gint value); gint prefs_get_reconnect(void); void prefs_set_autoping(gint value); gint prefs_get_autoping(void); +gint prefs_get_inpblock(void); +void prefs_set_inpblock(gint value); void prefs_set_occupants_size(gint value); gint prefs_get_occupants_size(void); |