1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

change the statusbar commands so that no accidenal status bars are created

This commit is contained in:
ailin-nemui 2018-03-19 09:18:42 +01:00
parent 3f217ae149
commit d845ee7361
2 changed files with 316 additions and 184 deletions

View File

@ -5,27 +5,35 @@
%9Parameters:%9 %9Parameters:%9
ENABLE: Adds a statusbar to the list of statusbars. ADD: Adds a statusbar to the list of statusbars.
DISABLE: Removes a statusbar from the list. Note that for MODIFY: Modifies the configuration of a statusbar.
built-in statusbars they can be enabled again should the
user wish to add back the default statusbars.
RESET: Restores the default statusbar configuration. RESET: Restores the default statusbar configuration.
TYPE: Sets the type of statusbar, for each split window or only ADDITEM: Adds an item to the specified statusbar. It can be set to
appear before/after another item and left/right aligned
to a specified position on the screen.
MODIFYITEM: Changes an item position inside a bar.
REMOVEITEM: Removes an item from the specified statusbar.
INFO: List the current details and items of the specified
statusbar.
-disable: Removes a statusbar from the list.
-type: Sets the type of statusbar, for each split window or only
for the current root screen. for the current root screen.
PLACEMENT: Sets the placement of the statusbar, either at the top or -placement: Sets the placement of the statusbar, either at the top or
the bottom of the screen. the bottom of the screen.
POSITION: Sets the position of the statusbar. Represented as a -position: Sets the position of the statusbar. Represented as a
number, with 0 implying the first position. number, with 0 implying the first position.
VISIBLE: Sets the visibility of the statusbar or item. If set to -visible: Sets the visibility of the statusbar or item. If set to
always it is visible on all screens, otherwise if set to always it is visible on all screens, otherwise if set to
inactive or active then it is only visible on inactive inactive or active then it is only visible on inactive
or active screens, respectively. or active screens, respectively.
ADD: Adds an item to the specified statusbar. It can be set to -before: This item is added before the other item.
appear before/after another item and left/right aligned -after: This item is added after the other item.
to a specified position on the screen. -priority: When the statusbar items overflow, the item with the
REMOVE: Removes an item from the specified statusbar. lowest priority is removed first
-alignment: Display the item on the right side.
Where name refers to the name of the statusbar; if no argument is Where statusbar refers to the name of the statusbar; if no argument is
given, the entire list of statusbars will be displayed. given, the entire list of statusbars will be displayed.
%9Description:%9 %9Description:%9
@ -36,12 +44,17 @@
%9Examples:%9 %9Examples:%9
/STATUSBAR /STATUSBAR
/STATUSBAR window /STATUSBAR INFO window
/STATUSBAR window REMOVE time /STATUSBAR REMOVEITEM time window
/STATUSBAR window ADD time /STATUSBAR ADDITEM time window
/STATUSBAR window RESET /STATUSBAR RESET window
/STATUSBAR topic DISABLE /STATUSBAR MODIFY -disable topic
/STATUSBAR topic ENABLE /STATUSBAR MODIFY -nodisable topic
%9Remarks:%9
Statusbar syntax was changed in Irssi 1.2. The old syntax is still
accepted for backward compatibility, but no longer documented.
%9See also:%9 WINDOW %9See also:%9 WINDOW

View File

@ -95,7 +95,9 @@ statusbar_config_find(STATUSBAR_GROUP_REC *group, const char *name)
for (tmp = group->config_bars; tmp != NULL; tmp = tmp->next) { for (tmp = group->config_bars; tmp != NULL; tmp = tmp->next) {
STATUSBAR_CONFIG_REC *config = tmp->data; STATUSBAR_CONFIG_REC *config = tmp->data;
if (g_strcmp0(config->name, name) == 0) if ((config->name == NULL || name == NULL) ?
config->name == name :
g_ascii_strcasecmp(config->name, name) == 0)
return config; return config;
} }
@ -273,6 +275,24 @@ static const char *sbar_get_visibility(STATUSBAR_CONFIG_REC *rec)
rec->visible == STATUSBAR_VISIBLE_INACTIVE ? "inactive" : "??"; rec->visible == STATUSBAR_VISIBLE_INACTIVE ? "inactive" : "??";
} }
static CONFIG_NODE *sbar_node(const char *name, gboolean create)
{
CONFIG_NODE *node;
STATUSBAR_CONFIG_REC *rec = statusbar_config_find(active_statusbar_group, name);
if (rec != NULL) {
name = rec->name;
} else if (!create) {
return NULL;
}
/* lookup/create the statusbar node */
node = iconfig_node_traverse("statusbar", TRUE);
node = iconfig_node_section(node, active_statusbar_group->name, NODE_TYPE_BLOCK);
node = iconfig_node_section(node, name, NODE_TYPE_BLOCK);
return node;
}
static void statusbar_list_items(STATUSBAR_CONFIG_REC *bar) static void statusbar_list_items(STATUSBAR_CONFIG_REC *bar)
{ {
GSList *tmp; GSList *tmp;
@ -334,100 +354,135 @@ static void cmd_statusbar_list(void)
static void cmd_statusbar_print_info(const char *name) static void cmd_statusbar_print_info(const char *name)
{ {
GSList *tmp; STATUSBAR_CONFIG_REC *rec = statusbar_config_find(active_statusbar_group, name);
tmp = active_statusbar_group->config_bars; if (rec != NULL) {
for (; tmp != NULL; tmp = tmp->next) {
STATUSBAR_CONFIG_REC *rec = tmp->data;
if (g_ascii_strcasecmp(rec->name, name) == 0) {
statusbar_print(rec); statusbar_print(rec);
return; return;
} }
}
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_NOT_FOUND, name); TXT_STATUSBAR_NOT_FOUND, name);
} }
/* SYNTAX: STATUSBAR <name> ENABLE */ /* SYNTAX: STATUSBAR ADD|MODIFY [-disable | -nodisable] [-type window|root]
static void cmd_statusbar_enable(const char *data, void *server, [-placement top|bottom] [-position #] [-visible always|active|inactive] <statusbar> */
void *item, CONFIG_NODE *node) static void cmd_statusbar_add_modify(const char *data, void *server, void *witem)
{ {
iconfig_node_set_str(node, "disabled", NULL); GHashTable *optlist;
CONFIG_NODE *node;
char *name, *type, *placement, *visible;
void *free_arg;
int error;
if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS | PARAM_FLAG_STRIP_TRAILING_WS,
"statusbar add", &optlist, &name))
return;
if (*name == '\0') {
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
} }
/* SYNTAX: STATUSBAR <name> DISABLE */ error = 0;
static void cmd_statusbar_disable(const char *data, void *server,
void *item, CONFIG_NODE *node)
{
iconfig_node_set_bool(node, "disabled", TRUE);
}
/* SYNTAX: STATUSBAR <name> RESET */ type = NULL;
static void cmd_statusbar_reset(const char *data, void *server, data = g_hash_table_lookup(optlist, "type");
void *item, CONFIG_NODE *node) if (data != NULL) {
{
CONFIG_NODE *parent;
parent = iconfig_node_traverse("statusbar", TRUE);
parent = iconfig_node_section(parent, active_statusbar_group->name,
NODE_TYPE_BLOCK);
iconfig_node_set_str(parent, node->key, NULL);
}
/* SYNTAX: STATUSBAR <name> TYPE window|root */
static void cmd_statusbar_type(const char *data, void *server,
void *item, CONFIG_NODE *node)
{
if (g_ascii_strcasecmp(data, "window") == 0) if (g_ascii_strcasecmp(data, "window") == 0)
iconfig_node_set_str(node, "type", "window"); type = "window";
else if (g_ascii_strcasecmp(data, "root") == 0) else if (g_ascii_strcasecmp(data, "root") == 0)
iconfig_node_set_str(node, "type", "root"); type = "root";
else { else {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_STATUSBAR_UNKNOWN_TYPE,
TXT_STATUSBAR_UNKNOWN_TYPE, data); data);
error++;
} }
} }
/* SYNTAX: STATUSBAR <name> PLACEMENT top|bottom */ placement = NULL;
static void cmd_statusbar_placement(const char *data, void *server, data = g_hash_table_lookup(optlist, "placement");
void *item, CONFIG_NODE *node) if (data != NULL) {
{
if (g_ascii_strcasecmp(data, "top") == 0) if (g_ascii_strcasecmp(data, "top") == 0)
iconfig_node_set_str(node, "placement", "top"); placement = "top";
else if (g_ascii_strcasecmp(data, "bottom") == 0) else if (g_ascii_strcasecmp(data, "bottom") == 0)
iconfig_node_set_str(node, "placement", "bottom"); placement = "bottom";
else { else {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_UNKNOWN_PLACEMENT, data); TXT_STATUSBAR_UNKNOWN_PLACEMENT, data);
error++;
} }
} }
/* SYNTAX: STATUSBAR <name> POSITION <num> */ visible = NULL;
static void cmd_statusbar_position(const char *data, void *server, data = g_hash_table_lookup(optlist, "visible");
void *item, CONFIG_NODE *node) if (data != NULL) {
{
iconfig_node_set_int(node, "position", atoi(data));
}
/* SYNTAX: STATUSBAR <name> VISIBLE always|active|inactive */
static void cmd_statusbar_visible(const char *data, void *server,
void *item, CONFIG_NODE *node)
{
if (g_ascii_strcasecmp(data, "always") == 0) if (g_ascii_strcasecmp(data, "always") == 0)
iconfig_node_set_str(node, "visible", "always"); visible = "always";
else if (g_ascii_strcasecmp(data, "active") == 0) else if (g_ascii_strcasecmp(data, "active") == 0)
iconfig_node_set_str(node, "visible", "active"); visible = "active";
else if (g_ascii_strcasecmp(data, "inactive") == 0) else if (g_ascii_strcasecmp(data, "inactive") == 0)
iconfig_node_set_str(node, "visible", "inactive"); visible = "inactive";
else { else {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_UNKNOWN_VISIBILITY, data); TXT_STATUSBAR_UNKNOWN_VISIBILITY, data);
error++;
} }
} }
if (error) {
cmd_params_free(free_arg);
return;
}
node = sbar_node(name, TRUE);
if (g_hash_table_lookup(optlist, "nodisable"))
iconfig_node_set_str(node, "disabled", NULL);
if (g_hash_table_lookup(optlist, "disable"))
iconfig_node_set_bool(node, "disabled", TRUE);
if (type != NULL)
iconfig_node_set_str(node, "type", type);
if (placement != NULL)
iconfig_node_set_str(node, "placement", placement);
data = g_hash_table_lookup(optlist, "position");
if (data != NULL)
iconfig_node_set_int(node, "position", atoi(data));
if (visible != NULL)
iconfig_node_set_str(node, "visible", visible);
read_statusbar_config();
cmd_params_free(free_arg);
}
/* SYNTAX: STATUSBAR RESET <statusbar> */
static void cmd_statusbar_reset(const char *data, void *server, void *witem)
{
CONFIG_NODE *node, *parent;
char *name;
void *free_arg;
if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_STRIP_TRAILING_WS, &name))
return;
if (*name == '\0') {
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
}
node = sbar_node(name, FALSE);
if (node == NULL) {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_STATUSBAR_NOT_FOUND, name);
cmd_params_free(free_arg);
return;
}
parent = iconfig_node_traverse("statusbar", TRUE);
parent = iconfig_node_section(parent, active_statusbar_group->name, NODE_TYPE_BLOCK);
iconfig_node_set_str(parent, node->key, NULL);
read_statusbar_config();
cmd_params_free(free_arg);
}
static CONFIG_NODE *statusbar_items_section(CONFIG_NODE *parent) static CONFIG_NODE *statusbar_items_section(CONFIG_NODE *parent)
{ {
STATUSBAR_CONFIG_REC *bar; STATUSBAR_CONFIG_REC *bar;
@ -463,23 +518,36 @@ static CONFIG_NODE *statusbar_items_section(CONFIG_NODE *parent)
return parent; return parent;
} }
/* SYNTAX: STATUSBAR <name> ADD [-before | -after <item>] /* SYNTAX: STATUSBAR ADDITEM|MODIFYITEM [-before | -after <item>]
[-priority #] [-alignment left|right] <item> */ [-priority #] [-alignment left|right] <item> <statusbar> */
static void cmd_statusbar_add(const char *data, void *server, static void cmd_statusbar_additem_modifyitem(const char *data, void *server, void *witem)
void *item, CONFIG_NODE *node)
{ {
CONFIG_NODE *node;
GHashTable *optlist; GHashTable *optlist;
char *name, *value; char *item, *statusbar, *value;
void *free_arg; void *free_arg;
int index; int index;
node = statusbar_items_section(node); if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | PARAM_FLAG_STRIP_TRAILING_WS,
if (node == NULL) "statusbar additem", &optlist, &item, &statusbar))
return; return;
if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS, if (*statusbar == '\0') {
"statusbar add", &optlist, &name)) cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
}
node = sbar_node(statusbar, FALSE);
if (node == NULL) {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_STATUSBAR_NOT_FOUND, statusbar);
cmd_params_free(free_arg);
return; return;
}
node = statusbar_items_section(node);
if (node == NULL) {
cmd_params_free(free_arg);
return;
}
/* get the index */ /* get the index */
index = -1; index = -1;
@ -489,7 +557,7 @@ static void cmd_statusbar_add(const char *data, void *server,
if (value != NULL) index = config_node_index(node, value)+1; if (value != NULL) index = config_node_index(node, value)+1;
/* create/move item */ /* create/move item */
node = iconfig_node_section_index(node, name, index, NODE_TYPE_BLOCK); node = iconfig_node_section_index(node, item, index, NODE_TYPE_BLOCK);
/* set the options */ /* set the options */
value = g_hash_table_lookup(optlist, "priority"); value = g_hash_table_lookup(optlist, "priority");
@ -502,67 +570,115 @@ static void cmd_statusbar_add(const char *data, void *server,
"right" : NULL); "right" : NULL);
} }
read_statusbar_config();
cmd_params_free(free_arg); cmd_params_free(free_arg);
} }
/* SYNTAX: STATUSBAR <name> REMOVE <item> */ /* SYNTAX: STATUSBAR REMOVEITEM <item> <statusbar> */
static void cmd_statusbar_remove(const char *data, void *server, static void cmd_statusbar_removeitem(const char *data, void *server, void *witem)
void *item, CONFIG_NODE *node)
{
node = statusbar_items_section(node);
if (node == NULL)
return;
if (iconfig_node_section(node, data, -1) != NULL)
iconfig_node_set_str(node, data, NULL);
else {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_STATUSBAR_ITEM_NOT_FOUND, data);
}
}
static void cmd_statusbar(const char *data)
{ {
CONFIG_NODE *node; CONFIG_NODE *node;
char *name, *cmd, *params, *signal; char *item, *statusbar;
void *free_arg; void *free_arg;
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_STRIP_TRAILING_WS, &item, &statusbar))
return;
if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST, if (*statusbar == '\0') {
&name, &cmd, &params)) cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
}
node = sbar_node(statusbar, FALSE);
if (node == NULL) {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_STATUSBAR_NOT_FOUND, statusbar);
cmd_params_free(free_arg);
return;
}
node = statusbar_items_section(node);
if (node == NULL) {
cmd_params_free(free_arg);
return;
}
if (iconfig_node_section(node, item, -1) != NULL)
iconfig_node_set_str(node, item, NULL);
else {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_STATUSBAR_ITEM_NOT_FOUND, item);
}
read_statusbar_config();
cmd_params_free(free_arg);
}
/* SYNTAX: STATUSBAR INFO <statusbar> */
static void cmd_statusbar_info(const char *data)
{
void *free_arg;
char *name;
if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_STRIP_TRAILING_WS, &name))
return; return;
if (*name == '\0') { if (*name == '\0') {
/* list all statusbars */ cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
cmd_statusbar_list();
cmd_params_free(free_arg);
return;
} }
if (*cmd == '\0') {
/* print statusbar info */ /* print statusbar info */
cmd_statusbar_print_info(name); cmd_statusbar_print_info(name);
cmd_params_free(free_arg); cmd_params_free(free_arg);
return; return;
} }
/* lookup/create the statusbar node */ static void cmd_statusbar(const char *data)
node = iconfig_node_traverse("statusbar", TRUE); {
node = iconfig_node_section(node, active_statusbar_group->name, char *arg1, *arg2, *params, *oldcmd;
NODE_TYPE_BLOCK); void *free_arg;
node = iconfig_node_section(node, name, NODE_TYPE_BLOCK);
/* call the subcommand */ if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST | PARAM_FLAG_STRIP_TRAILING_WS,
signal = g_strconcat("command statusbar ", cmd, NULL); &arg1, &arg2, &params))
ascii_strdown(signal); return;
if (!signal_emit(signal, 4, params, NULL, NULL, node)) {
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, /* backward compatibility layer */
TXT_STATUSBAR_UNKNOWN_COMMAND, cmd); oldcmd = NULL;
if (*arg1 == '\0') {
oldcmd = g_strdup("list");
} else if (g_ascii_strcasecmp(arg2, "enable") == 0) {
oldcmd = g_strdup_printf("add -nodisable %s %s", arg1, params);
} else if (g_ascii_strcasecmp(arg2, "disable") == 0) {
oldcmd = g_strdup_printf("add -disable %s %s", arg1, params);
} else if (g_ascii_strcasecmp(arg2, "reset") == 0) {
oldcmd = g_strdup_printf("reset %s", arg1);
} else if (g_ascii_strcasecmp(arg2, "type") == 0) {
oldcmd = g_strdup_printf("add -type %s %s", params, arg1);
} else if (g_ascii_strcasecmp(arg2, "placement") == 0) {
oldcmd = g_strdup_printf("add -placement %s %s", params, arg1);
} else if (g_ascii_strcasecmp(arg2, "position") == 0) {
oldcmd = g_strdup_printf("add -position %s %s", params, arg1);
} else if (g_ascii_strcasecmp(arg2, "visible") == 0) {
oldcmd = g_strdup_printf("add -visible %s %s", params, arg1);
} else if (g_ascii_strcasecmp(arg2, "add") == 0) {
oldcmd = g_strdup_printf("additem %s %s", params, arg1);
} else if (g_ascii_strcasecmp(arg2, "remove") == 0) {
oldcmd = g_strdup_printf("removeitem %s %s", params, arg1);
} else if (*arg2 == '\0') {
oldcmd = g_strdup_printf("statusbar %s", arg1);
if (command_find(oldcmd) == NULL) {
g_free(oldcmd);
oldcmd = g_strdup_printf("info %s", arg1);
} else { } else {
read_statusbar_config(); g_free(oldcmd);
oldcmd = NULL;
}
} }
g_free(signal);
cmd_params_free(free_arg); cmd_params_free(free_arg);
if (oldcmd) {
command_runsub("statusbar", oldcmd, NULL, NULL);
g_free(oldcmd);
} else {
command_runsub("statusbar", data, NULL, NULL);
}
return;
} }
void statusbar_config_init(void) void statusbar_config_init(void)
@ -572,17 +688,21 @@ void statusbar_config_init(void)
signal_add("theme changed", (SIGNAL_FUNC) read_statusbar_config); signal_add("theme changed", (SIGNAL_FUNC) read_statusbar_config);
command_bind("statusbar", NULL, (SIGNAL_FUNC) cmd_statusbar); command_bind("statusbar", NULL, (SIGNAL_FUNC) cmd_statusbar);
command_bind("statusbar enable", NULL, (SIGNAL_FUNC) cmd_statusbar_enable); command_bind("statusbar list", NULL, (SIGNAL_FUNC) cmd_statusbar_list);
command_bind("statusbar disable", NULL, (SIGNAL_FUNC) cmd_statusbar_disable); command_bind("statusbar add", NULL, (SIGNAL_FUNC) cmd_statusbar_add_modify);
command_bind("statusbar modify", NULL, (SIGNAL_FUNC) cmd_statusbar_add_modify);
command_bind("statusbar reset", NULL, (SIGNAL_FUNC) cmd_statusbar_reset); command_bind("statusbar reset", NULL, (SIGNAL_FUNC) cmd_statusbar_reset);
command_bind("statusbar add", NULL, (SIGNAL_FUNC) cmd_statusbar_add); command_bind("statusbar info", NULL, (SIGNAL_FUNC) cmd_statusbar_info);
command_bind("statusbar remove", NULL, (SIGNAL_FUNC) cmd_statusbar_remove); command_bind("statusbar additem", NULL, (SIGNAL_FUNC) cmd_statusbar_additem_modifyitem);
command_bind("statusbar type", NULL, (SIGNAL_FUNC) cmd_statusbar_type); command_bind("statusbar modifyitem", NULL, (SIGNAL_FUNC) cmd_statusbar_additem_modifyitem);
command_bind("statusbar placement", NULL, (SIGNAL_FUNC) cmd_statusbar_placement); command_bind("statusbar removeitem", NULL, (SIGNAL_FUNC) cmd_statusbar_removeitem);
command_bind("statusbar position", NULL, (SIGNAL_FUNC) cmd_statusbar_position);
command_bind("statusbar visible", NULL, (SIGNAL_FUNC) cmd_statusbar_visible);
command_set_options("statusbar add", "+before +after +priority +alignment"); command_set_options("statusbar additem", "+before +after +priority +alignment");
command_set_options("statusbar modifyitem", "+before +after +priority +alignment");
command_set_options("statusbar add",
"disable nodisable +type +placement +position +visible");
command_set_options("statusbar modify",
"disable nodisable +type +placement +position +visible");
} }
void statusbar_config_deinit(void) void statusbar_config_deinit(void)
@ -591,13 +711,12 @@ void statusbar_config_deinit(void)
signal_remove("theme changed", (SIGNAL_FUNC) read_statusbar_config); signal_remove("theme changed", (SIGNAL_FUNC) read_statusbar_config);
command_unbind("statusbar", (SIGNAL_FUNC) cmd_statusbar); command_unbind("statusbar", (SIGNAL_FUNC) cmd_statusbar);
command_unbind("statusbar enable", (SIGNAL_FUNC) cmd_statusbar_enable); command_unbind("statusbar list", (SIGNAL_FUNC) cmd_statusbar_list);
command_unbind("statusbar disable", (SIGNAL_FUNC) cmd_statusbar_disable); command_unbind("statusbar add", (SIGNAL_FUNC) cmd_statusbar_add_modify);
command_unbind("statusbar modify", (SIGNAL_FUNC) cmd_statusbar_add_modify);
command_unbind("statusbar reset", (SIGNAL_FUNC) cmd_statusbar_reset); command_unbind("statusbar reset", (SIGNAL_FUNC) cmd_statusbar_reset);
command_unbind("statusbar add", (SIGNAL_FUNC) cmd_statusbar_add); command_unbind("statusbar info", (SIGNAL_FUNC) cmd_statusbar_info);
command_unbind("statusbar remove", (SIGNAL_FUNC) cmd_statusbar_remove); command_unbind("statusbar additem", (SIGNAL_FUNC) cmd_statusbar_additem_modifyitem);
command_unbind("statusbar type", (SIGNAL_FUNC) cmd_statusbar_type); command_unbind("statusbar modifyitem", (SIGNAL_FUNC) cmd_statusbar_additem_modifyitem);
command_unbind("statusbar placement", (SIGNAL_FUNC) cmd_statusbar_placement); command_unbind("statusbar removeitem", (SIGNAL_FUNC) cmd_statusbar_removeitem);
command_unbind("statusbar position", (SIGNAL_FUNC) cmd_statusbar_position);
command_unbind("statusbar visible", (SIGNAL_FUNC) cmd_statusbar_visible);
} }