diff options
author | okan | 2015-07-12 14:31:47 +0000 |
---|---|---|
committer | okan | 2015-07-12 14:31:47 +0000 |
commit | b05f7a824f98fee35cc1fd31eae62460a743075c (patch) | |
tree | ee572128d6bb3c2f96ba7393cd25d10e2064b68d /search.c | |
parent | 1c42563c9b3c1a385b355c4ddc189364d05b4257 (diff) | |
download | cwm-b05f7a824f98fee35cc1fd31eae62460a743075c.tar.gz |
introduce 'groupsearch' for group menu search; matches on either group
number/shortcut and/or name.
Diffstat (limited to 'search.c')
-rw-r--r-- | search.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: search.c,v 1.48 2015/07/01 14:36:42 okan Exp $ + * $OpenBSD: search.c,v 1.49 2015/07/12 14:31:47 okan Exp $ */ #include <sys/types.h> @@ -138,6 +138,16 @@ search_print_cmd(struct menu *mi, int i) } void +search_print_group(struct menu *mi, int i) +{ + struct group_ctx *gc = (struct group_ctx *)mi->ctx; + + (void)snprintf(mi->print, sizeof(mi->print), + (group_holds_only_hidden(gc)) ? "%d: [%s]" : "%d: %s", + gc->num, gc->name); +} + +void search_print_client(struct menu *mi, int list) { struct client_ctx *cc = (struct client_ctx *)mi->ctx; |