[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Straw-devel] accelerator trouble with the optionmenu and scrolling
From: |
Juri Pakaste |
Subject: |
[Straw-devel] accelerator trouble with the optionmenu and scrolling |
Date: |
Sun, 07 Dec 2003 12:55:27 +0200 |
We talked about this a bit yesterday on IRC, but to summarize the
trouble:
The key to popup a gtkoptionmenu (the category selection widget is a
gtkoptionmenu) is space. We use space for scrolling. That prevents the
gtkoptionmenu from being popped up with keyboards.
Possible solutions:
1) Change scrolling key.
I don't like this. I selected space because for me it feels like
the natural choice for that thing, possibly because I've been
using unix software that behaves like that for the last ten
years or so. I suppose we could pick something else, but I want
to consider our other options first. If we change it, the new
key had better be good.
2) Popup the gtkoptionmenu manually
No idea how to accomplish this, and I've tried a fair bit.
gtkoptionmenu doesn't expose enough API to do this easily; I
tried to reproduce the internal gtk_option_menu_position
function in Python, but for whatever reason, it doesn't work
right. Or more properly, I don't see how the C version works
right: it uses the widget's allocation information (which is
relative to the window) to popup the menu (which is done with
screen position) and I can't see where it takes into account the
fact that the window isn't necessarily at the upper left corner
of the screen. Oh well.
Trying to popup the menu with the clicked, pressed or activate
functions doesn't seem to work.
3) Dynamically change the accelerator map when focused on the optionmenu
We could install an accelerator map without the space
accelerator when the option menu gets focus, and an accelerator
map with space when it loses focus. Annoyingly, we can't access
the accelerator map created by libglade, so we would have to
create the accelerators in code.
4) Make space to work only in some parts of the window
Evolution seems to do this. Space only works, as far as I can
tell, in the article list and article view. We could probably
add the feed list, feed info and source view to the list. But I
think we would have to define our own accelgroup with this
approach, too, same as with option 3.
Opinions?
--
[ Juri Pakaste / address@hidden / http://www.iki.fi/juri/ ]
- [Straw-devel] accelerator trouble with the optionmenu and scrolling,
Juri Pakaste <=