summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-08-14 11:44:08 +0200
committerSebastien Helleu <flashcode@flashtux.org>2010-08-14 11:44:08 +0200
commita6cd860b5ae679a1144f47b0aa8b3ece6968517a (patch)
tree3624a15774beb879d9101dbf488906658cae14a1 /src
parent776329b93ff18955d899cdc49ef99610459ab989 (diff)
downloadweechat-a6cd860b5ae679a1144f47b0aa8b3ece6968517a.zip
If null value is allowed for an option, display it in /help option
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-command.c6
-rw-r--r--src/core/wee-config-file.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index e9b8bd23b..7e11d4054 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -1806,6 +1806,12 @@ command_help (void *data, struct t_gui_buffer *buffer,
case CONFIG_NUM_OPTION_TYPES:
break;
}
+ if (ptr_option->null_value_allowed)
+ {
+ gui_chat_printf (NULL, " %s",
+ /* TRANSLATORS: please do not translate "(null)" */
+ _("undefined value allowed (null)"));
+ }
return WEECHAT_RC_OK;
}
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c
index 54e362f43..ad1551d8f 100644
--- a/src/core/wee-config-file.c
+++ b/src/core/wee-config-file.c
@@ -2641,6 +2641,13 @@ config_file_add_to_infolist (struct t_infolist *infolist,
return 0;
}
if (!infolist_new_var_integer (ptr_item,
+ "null_value_allowed",
+ ptr_option->null_value_allowed))
+ {
+ free (option_full_name);
+ return 0;
+ }
+ if (!infolist_new_var_integer (ptr_item,
"value_is_null",
(ptr_option->value) ?
0 : 1))