summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-text/module-formats.c1
-rw-r--r--src/fe-text/module-formats.h1
-rw-r--r--src/fe-text/statusbar-config.c8
3 files changed, 8 insertions, 2 deletions
diff --git a/src/fe-text/module-formats.c b/src/fe-text/module-formats.c
index b234f46c..277872c6 100644
--- a/src/fe-text/module-formats.c
+++ b/src/fe-text/module-formats.c
@@ -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 } },
diff --git a/src/fe-text/module-formats.h b/src/fe-text/module-formats.h
index b753238b..a9f4c6ae 100644
--- a/src/fe-text/module-formats.h
+++ b/src/fe-text/module-formats.h
@@ -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,
diff --git a/src/fe-text/statusbar-config.c b/src/fe-text/statusbar-config.c
index 0c6070fa..7b5b6884 100644
--- a/src/fe-text/statusbar-config.c
+++ b/src/fe-text/statusbar-config.c
@@ -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]