mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Instead of special casing the 'term' and 'lock' commands, go back to
keeping them hidden; showing them has apparently caused confusion/angst.
This commit is contained in:
parent
a79253abdc
commit
c96fd247dd
8
kbfunc.c
8
kbfunc.c
@ -177,8 +177,12 @@ kbfunc_menu_cmd(struct client_ctx *cc, union arg *arg)
|
||||
struct menu_q menuq;
|
||||
|
||||
TAILQ_INIT(&menuq);
|
||||
TAILQ_FOREACH(cmd, &Conf.cmdq, entry)
|
||||
menuq_add(&menuq, cmd, "%s", cmd->name);
|
||||
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
|
||||
if ((strcmp(cmd->name, "lock") == 0) ||
|
||||
(strcmp(cmd->name, "term") == 0))
|
||||
continue;
|
||||
menuq_add(&menuq, cmd, NULL);
|
||||
}
|
||||
|
||||
if ((mi = menu_filter(sc, &menuq, "application", NULL, 0,
|
||||
search_match_text, search_print_cmd)) != NULL)
|
||||
|
@ -233,8 +233,12 @@ mousefunc_menu_cmd(struct client_ctx *cc, union arg *arg)
|
||||
struct menu_q menuq;
|
||||
|
||||
TAILQ_INIT(&menuq);
|
||||
TAILQ_FOREACH(cmd, &Conf.cmdq, entry)
|
||||
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
|
||||
if ((strcmp(cmd->name, "lock") == 0) ||
|
||||
(strcmp(cmd->name, "term") == 0))
|
||||
continue;
|
||||
menuq_add(&menuq, cmd, NULL);
|
||||
}
|
||||
|
||||
if ((mi = menu_filter(sc, &menuq, NULL, NULL, CWM_MENU_LIST,
|
||||
NULL, search_print_cmd)) != NULL)
|
||||
|
8
search.c
8
search.c
@ -127,14 +127,8 @@ void
|
||||
search_print_cmd(struct menu *mi, int i)
|
||||
{
|
||||
struct cmd *cmd = (struct cmd *)mi->ctx;
|
||||
int special = 0;
|
||||
|
||||
if ((strcmp(cmd->name, "lock") == 0) ||
|
||||
(strcmp(cmd->name, "term") == 0))
|
||||
special = 1;
|
||||
|
||||
(void)snprintf(mi->print, sizeof(mi->print),
|
||||
(special) ? "[%s]" : "%s", cmd->name);
|
||||
(void)snprintf(mi->print, sizeof(mi->print), "%s", cmd->name);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user