Re: popup menu keybinding



On 19 Mar 2001, Havoc Pennington wrote:

> 
> Hi,
> 
> I went ahead and added Shift+F10 and the Menu key as keybindings for
> popping up widget menus. Implies a popup_menu RUN_ACTION signal on
> GtkWidget, and implementations of said signal on GtkEntry and
> GtkTextView.
> 
> Patch appended, pretty straightforward. Includes a couple random fixes
> too.

hm this looks like a pretty bad hack to me actually, i have a bunch of issues
with that:


i just now see that you added *popup_menu fields to textview and gtkentry.
user-provided popupmenus on entries may not be so common but for textviews
surely are, but users can't provide or extend those builtin popup menus.
and what should apps do that mean to have icons for menu items in every menu?

creating a new menu for every entry that button3 is clicked in is an
extreme memory waste btw, users that actually do use those popupmenus,
and do so in a bunch of entries supplied by an application will create
a big stack of unused widgets. at most you should have one such menu per
widget class (e.g. GtkEntry and GtkTextView).

the popupmenu behaviour of not letting one select the first item
with drag selections is also quite irritating.

you need to disable accelerator settings for those menus, currently the
users can set accelerators on them that aren't negotiated or saved which is
highly confusing.

to finally come to your <Shft>+F10 key binding, beast for instance is an
application that makes use of F* and <Shft>+F*, with most window managers
taking <Ctrl>+F* and <Alt>+F* away, there's not much left for an application
if gtk now starts to clutter <Shft>+F* as well.
why i could have understood (not apprechiated though) an F10 binding that
activates the menu bar in a window which is quite common in *some* GUIs,
<Shft>+F10 certainly isn't.

also i think it's a pretty bad idea to introduce any keybinding on GtkWidget
class, since this will affect *all* widgets out there, including third party
ones.
dictating <Shft>+F10 for them for menu popups and further dictating the
signature those widgets may use to popup menus is too much policy for
gtk+ and is prone to lead to extreme confusion.

if at all, you should add those bindings only to those widgets that actually
have popupmenus, that curently being gtktextview and gtkentry.

> 
> Havoc
> 

---
ciaoTJ






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]