ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Automatically setting focus for display filter control no longer

From: "Martin Mathieson" <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Fri, 25 May 2007 11:00:30 +0100
Hi,
I think this regression is related to Gerald's change 21898, whose log
message was:

"Don't set the focus on the display filter entry when we're passed a
contorl- or alt-modified character.  Fixes bug 1610."

I notice that pressing down control or alt doesn't affect the value of
event->keyval (holding down shift while pressing another key switches
off the 6th l.s.b.   -  e.g. 'a' will be 0x61 whereas shift+'a' is
0x41...)

Using event->state (of type enum GdkModifierType) instead seems to be
the way to go.

Does anyone see problems with the attached patch?

Best regards,
Martin
Index: menu.c
===================================================================
--- menu.c	(revision 19392)
+++ menu.c	(working copy)
@@ -598,8 +598,10 @@
                        init_conversation_notebook_cb, 0, WIRESHARK_STOCK_CONVERSATIONS),
     ITEM_FACTORY_STOCK_ENTRY("/Statistics/Endpoints", NULL,
                        init_hostlist_notebook_cb, 0, WIRESHARK_STOCK_ENDPOINTS),
+#ifdef HAVE_LUA_5_1
     ITEM_FACTORY_ENTRY("/_Tools", NULL, NULL, 0, "<Branch>", NULL),
-   ITEM_FACTORY_ENTRY("/_Help", NULL, NULL, 0, "<Branch>", NULL),
+#endif
+    ITEM_FACTORY_ENTRY("/_Help", NULL, NULL, 0, "<Branch>", NULL),
     ITEM_FACTORY_STOCK_ENTRY("/Help/_Contents", "F1", topic_menu_cb, HELP_CONTENT, GTK_STOCK_HELP),
     ITEM_FACTORY_ENTRY("/Help/_Supported Protocols", NULL, supported_cb, 0, NULL, NULL),
 #if (GLIB_MAJOR_VERSION >= 2)