Re: Strange behaviour of GtkCheckMenuItem with submenus



From what I understand you have a strange expectation of menu items.

Items are either parents of groups, or are controls for some actions
in the program, but not simultaneously.

Menu items can be insensitive but usually those are because
the context of the program doesnt allow them to be valid (i.e.
you cannot 'Save' when there is no document loaded, you
cannot 'Copy' when there is no selection in context).

It would be annoying if say, you had to toggle a check menu item
for other items to suddenly become sensitive in the same menu
(because that implies anyway the user needs to popup the menu
twice, once to change some configuration, and another time to
select the items which have magically became active).

On Thu, Oct 11, 2012 at 5:52 AM, Bruce Karsh <brucekarsh gmail com> wrote:
I need a UI for letting the user limit a view of their data based on tags.
The user needs to be able to choose to a) show all items, b) show items
with certain tags, c) show items without certain tags.  So I made a menu
with 3 GtkRadioMenuItems and put submenus with GtkCheckMenuItems in them
for the two cases where the user has to select the tags.  It worked, but
the behaviour of the menus is odd.

When I activate the menu and move the cursor over the GtkRadioMenuItems and
the item under the cursor has a submenu, then the item under the cursor
becomes selected without any clicks. But if the
item under the cursor does not have a submenu, it does not become selected.

I think that's a problem because it's going to violate user expectations. A
user won't expect that scrolling through the menus without clicking
anything might cause a persistent state change.

What could be done about it?

1. disallow submenus on GtkRadioMenuItems
    I think this would be a bit extreme. I've presented one use case for
GtkCheckMenuItems with submenus and there are probably lots of others.

Not all use cases are natural for the average user to understand,
and I don't believe I've seen any application do this with menu items.

Perhaps these specific configurations can be better expressed
in a preferences dialog, found under the Edit menu.

Cheers,
                -Tristan



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