login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
openbsd-tech
»
2010
»
February
»
9
Re: cwm no blank labels
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Owain Ainsworth
Subject:
Re: cwm no blank labels
Date: Tuesday, February 9, 2010 - 10:24 am
On Tue, Feb 02, 2010 at 09:10:56AM -0500, Okan Demirmen wrote:
quoted text
> On Sun 2010.01.17 at 16:05 +0100, Thomas Pfaff wrote: > > This diff disallows setting blank labels and pressing Esc while editing > > the current one will leave it unchanged. I don't see the point in allowing > > empty labels as the windows will just show up as blank entries in the menu. > > > > Also remove `current' variable and just use `cc->label'. > > hi, > > i believe due to the nature of menu_filter(), you'll still run into > losing your label using just strlen(). below the least intrusive way > until we potentially look back at the menu code. > > i don't use labels at all, so can you verify this fixes all your cases? > > cheers, > okan > > Index: calmwm.h > =================================================================== > RCS file: /home/open/anoncvs/cvs/xenocara/app/cwm/calmwm.h,v > retrieving revision 1.115 > diff -u -p -r1.115 calmwm.h > --- calmwm.h 27 Jan 2010 03:04:50 -0000 1.115 > +++ calmwm.h 30 Jan 2010 20:14:49 -0000 > @@ -320,6 +320,7 @@ struct menu { > char print[MENU_MAXENTRY + 1]; > void *ctx; > short dummy; > + short abort; > }; > > TAILQ_HEAD(menu_q, menu); > Index: kbfunc.c > =================================================================== > RCS file: /home/open/anoncvs/cvs/xenocara/app/cwm/kbfunc.c,v > retrieving revision 1.50 > diff -u -p -r1.50 kbfunc.c > --- kbfunc.c 15 Dec 2009 04:10:42 -0000 1.50 > +++ kbfunc.c 30 Jan 2010 20:36:18 -0000 > @@ -400,19 +400,19 @@ kbfunc_client_label(struct client_ctx *c > { > struct menu *mi; > struct menu_q menuq; > - char *current; > > TAILQ_INIT(&menuq); > > - current = cc->label; > + /* dummy is set, so this will always return */ > + mi = menu_filter(cc->sc, &menuq, "label", cc->label, 1, > + search_match_text, NULL); > > - if ((mi = menu_filter(cc->sc, &menuq, "label", current, 1, > - search_match_text, NULL)) != NULL) { > + if (!mi->abort) { > if (cc->label != NULL) > xfree(cc->label); > cc->label = xstrdup(mi->text); > - xfree(mi); > } > + xfree(mi); > } > > void > Index: menu.c > =================================================================== > RCS file: /home/open/anoncvs/cvs/xenocara/app/cwm/menu.c,v > retrieving revision 1.19 > diff -u -p -r1.19 menu.c > --- menu.c 15 Dec 2009 04:10:42 -0000 1.19 > +++ menu.c 30 Jan 2010 20:35:01 -0000 > @@ -223,6 +223,7 @@ menu_handle_key(XEvent *e, struct menu_c > mc->searchstr, sizeof(mi->text)); > mi->dummy = 1; > } > + mi->abort = 0; > return (mi); > case CTL_WIPE: > mc->searchstr[0] = '__PLACEHOLDER__0_'; > @@ -235,6 +236,7 @@ menu_handle_key(XEvent *e, struct menu_c > mi = xmalloc(sizeof *mi); > mi->text[0] = '__PLACEHOLDER__0_'; > mi->dummy = 1; > + mi->abort = 1; > return (mi); > default: > break; >
ok. -0- -- Get Revenge! Live long enough to be a problem for your children!
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
cwm no blank labels
, Thomas Pfaff
, (Sun Jan 17, 8:05 am)
Re: cwm no blank labels
, Okan Demirmen
, (Tue Feb 2, 7:10 am)
Re: cwm no blank labels
, Thomas Pfaff
, (Sat Feb 6, 4:42 am)
Re: cwm no blank labels
, Owain Ainsworth
, (Tue Feb 9, 10:24 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso
Re: Cannot change MTU of carp interface?
Richard Daemon
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate