On Mon, Apr 21, 2003 at 07:42:16PM +1000, Brad Hards wrote:
> 1. The Display->Match and Display->Prepare sub-menu items are disabled when
> you don't have any of the field selected in the middle pane. However the menu
> items themselves are not disabled.
> 2. Tools->TCP Stream Analysis is enabled even when you don't have a capture.
> 3. When you enter a broken capture filter, the dialog box refers to an "Add
> expression button", which doesn't appear to exist - it is only applicable to
> display filters.
>
> I can't seem to fix 1 and 2, although I did play around with it, and there is
> a comment in gtk/menu.c around line 461 that looks like the problem is
> possibly intentional.
If the comment you're referring to is
/* XXX - is this really supposed to ignore all but the */
/* last component of the menu path? */
then, in answer to the question in the comment, it was supposed to do
that, but that was a quick-and-dirty hack, introduced when pop-up menu
support was added, to allow both main-menu and pop-up-menu versions of a
menu item to be controlled by a single call, *and* it has nothing to do
with the problem you saw, which is *not* intentional on the part of the
Ethereal developers - but might be intentional on the part of the GTK+
developers; see below.
I've checked in a change to:
have "set_menu_sensitivity()" take, as an argument, a pointer to
the GtkItemFactory for the item it's modifying, with NULL
meaning "all pop-up menus";
use the full path for the menu item in all such calls, and have
separate calls for the main menu item and pop-up menu items as
necessary;
but that didn't make any difference.
Both of the first two problems are, as far as I know, a result of a GTK+
deficiency - disabling a menu item with a submenu doesn't gray out the
menu item, it merely means that attempting to pop up the submenu doesn't
do anything. I don't know whether that's considered, by the GTK+
people, a bug or a feature, but if they consider it a feature I'd
*really* like to hear their justification - I find it odd and confusing,
and you're not the only other person to be surprised by it.
> 3 should be addressed in the attached patch.
Checked in.