1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-13 05:03:45 -04:00

add disabled txt

This commit is contained in:
ailin-nemui 2018-03-20 17:59:11 +01:00
parent 977c2c0a0d
commit ee04cd503f
3 changed files with 8 additions and 2 deletions

View File

@ -67,6 +67,7 @@ FORMAT_REC gui_text_formats[] =
{ "statusbar_info_item_footer", "", 0 },
{ "statusbar_info_item_name", "%# : $[35]0 $[9]1 $2", 3, { 0, 1, 0 } },
{ "statusbar_not_found", "Statusbar doesn't exist: $0", 1, { 0 } },
{ "statusbar_not_found", "Statusbar is disabled: $0", 1, { 0 } },
{ "statusbar_item_not_found", "Statusbar item doesn't exist: $0", 1, { 0 } },
{ "statusbar_unknown_command", "Unknown statusbar command: $0", 1, { 0 } },
{ "statusbar_unknown_type", "Statusbar type must be 'window' or 'root'", 1, { 0 } },

View File

@ -42,6 +42,7 @@ enum {
TXT_STATUSBAR_INFO_ITEM_FOOTER,
TXT_STATUSBAR_INFO_ITEM_NAME,
TXT_STATUSBAR_NOT_FOUND,
TXT_STATUSBAR_NOT_ENABLED,
TXT_STATUSBAR_ITEM_NOT_FOUND,
TXT_STATUSBAR_UNKNOWN_COMMAND,
TXT_STATUSBAR_UNKNOWN_TYPE,

View File

@ -388,8 +388,12 @@ static void cmd_statusbar_print_info(const char *name)
return;
}
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_NOT_FOUND, name);
if (sbar_node(name, FALSE) != NULL || sbar_node_isdefault(name))
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_NOT_ENABLED, name);
else
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_NOT_FOUND, name);
}
/* SYNTAX: STATUSBAR ADD|MODIFY [-disable | -nodisable] [-type window|root]