[openbox] keyboard shortcuts for the root menu

Jonas J Linde jonas at init.se
Mon Jul 2 19:19:50 EDT 2007


And Dana Jansens spoke unto the world. And said:
>On 6/29/07, Jonas J Linde <jonas at init.se> wrote:
>>So, I've made a patch against 3.4.2 that achieves those goals. It allows
>>underscore ('_') in addition to ampersand ('&') as the character to
>>specify the shortcut (as excessive use of ampersands gets kind of ugly
>
>If &'s are no good in an XML file, I'd rather just use _'s
>exclusively, instead of both.  Right now there is no use of &'s
>outside of the C code itself, so it wouldn't break anything to change.
>Just a search and replace of all the translation files.

OK, agreed. The reason I didn't do this in the first patch was to keep
the number of patched files down.

>>If the shortcuts boolean isn't true the root menu won't be parsed for
>>shortcut specifiers and if the shortcutColor string isn't set
>>underlining will be used when rendering the shortcuts.
>
>The coloring is a bit more problematic.  Specifying colors in your
>config file is a really ugly thing IMO because that option is only
>going to work with 1 theme.  It needs to be a part of the theme.  

Yes, I see. I actually started adding the color to the theme
specification (where it obviously belongs) but then realized how easy it
would be to add it in the config file instead.

>The problem here is that I don't see a way to derive a default color
>for this from older themes. So, essentially, it would not work well in
>any themes that didn't explicitly get made with support for it in the
>future. I don't want to add features to the 3.4 series that essentially
>break with any existing themes, and I don't want to make a hacky option
>that is theme-specific in the config file, so I don't see this one
>happening right now. Maybe in the future beyond 3.4 (which is currently
>being worked on a little and thought about).

Couldn't one just fall back to underline if the shortcut.color isn't set
in the theme?

>>It would be great to get this patch applied to an upcoming version, so
>>please let me know if there is something I should change to make it
>>acceptable.
>
>If you want to go ahead and make it do all the stuff I've talked about
>here (exclusively use _, without the option) against the 3.4-working
>branch in SVN that would be cool, or I can do it when I get to it as
>well.

OK, I'll start working on it.

>(In SVN there was a slight change in the menu code which would
>be relavant to this - where explicitly chosen highlights would be
>underlined, but default ones (ie first character) would not be.)

Ah, neat. That was actually an important reason for the option in the
config file - so as not to add a lot of highlighting for people who
didn't want it.

>What do you think?

As I actually agree with your suggestions I have no problem working on
them. Also, I planned to work on this feature as my pet project during
my summer vacation so it suits me really fine that I'm not done yet.

Cheers,
-- 
Jonas J Linde <jonas at init.se>  http://www.init.se/~jonas/ +46-707-492496
<---------------------------------------------------------------------->
GE/IT$ d-() s++: a C++(++++)$ UBVL++(++++)$ P+++ L+++$ E++ W++(-) N+ o--
K+ !w(+) O M@ V PS+ PE++(-) Y+ PGP+(++) t 5 X R-@ tv- b+>++ DI D++ G+(-)
e+++ h+(----) r@ y++++ UF+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://icculus.org/pipermail/openbox/attachments/20070703/e5564f9e/attachment.pgp>


More information about the openbox mailing list