Re: Accelerator problems



    >> Platform: Solaris 2.[678]/gtk+ 1.2.7/gcc 2.95.1
    >> 
    >> 1. In an application I have submenus attached to some menu items.  The
    >> keystroke accelerators (the underlined letters) in the submenus work as
    >> long as there is not an accelerator that uses the same key in the
    >> parent menu.

    Owen> I can't reproduce this with testgtk. (gtk/testgtk, item factory
    Owen> test).  Does that work on your setup?

Works in my testgtk.

    >> 2. One of my submenus contains some radio menu items with the toggle
    >> indicator always visible.  When I activate one of these items using the
    >> keystroke accelerators (underlined letters), the toggle buttons do not
    >> change state.
 
    Owen> Again, I can't reproduce this with testgtk.

Also works in my testgtk.

Wierd.  I'll recompile the libraries and see if that clears things up.

    >> 3. When creating menus using item factories, the accelerators are not
    >> actually locked, even though the gtkitemfactory.c code appears to be
    >> locking them.  When I do the menu construction manually, using
    >> essentially the same code as is found in gtkitemfactory.c (minus using
    >> the Mod1 key as a modifier), it all appears to work correctly.

    Owen> I think you might be confusing the code that adds the underline
    Owen> accelerators (which locks them) with the code that adds global
    Owen> accelerators, which doesn't lock them.

Sorry.  I didn't pay enough attention as to which was being locked and which
wasn't.

    Owen> Global accelerators should probably never be locked unless there is
    Owen> a good reason. (There is some argument that they should never be
    Owen> unlocked unless the user specifically turns that on in some config
    Owen> file. But given that they are typically unlocked, the user should
    Owen> not suddenly have that capability taken away in some app.)

I am in agreement with those that think global accelerators should be locked.
Having global accelerators change unexpectedly while navigating a menu caused
a lot of confusion amongst our less experienced users here.

For those of you wondering, you can reproduce the effect by moving the focus
to a menu item and typing some key sequence different than the accelerator for
that item.  The accelerator for that menu item changes to the key sequence you
just typed.

I stumbled on this after complaints that "shortcuts are being changed at
random by the program."  It wasn't the program, just naive users and
unexpected behavior.
-----------------------------------------------------------------------------
Mark Leisher
Computing Research Lab            Once you fully apprehend the vacuity of a
New Mexico State University       life without struggle, you are equipped
Box 30001, Dept. 3CRL             with the basic means of salvation.
Las Cruces, NM  88003                            -- Tennessee Williams




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