ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] Patch: Hiding disabled protocols in GTK2

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Stas Grabois <sagig@xxxxxxxxxxx>
Date: Sun, 08 Aug 2004 07:04:09 +0200

About two months ago I've posted a patch to hide disabled protocols in "filter" and "decode" dialogs,
but I forgot to send the GTK 2 patch:

diff -Nru --exclude-from=exclude ethereal-0.10.4/gtk/dfilter_expr_dlg.c ethereal-0.10.4.dp/gtk/dfilter_expr_dlg.c
--- ethereal-0.10.4/gtk/dfilter_expr_dlg.c    2004-03-18 06:05:34.000000000 +0200
+++ ethereal-0.10.4.dp/gtk/dfilter_expr_dlg.c    2004-06-08 10:00:11.000000000 +0300
@@ -1382,6 +1393,10 @@
         i = proto_get_next_protocol(&cookie)) {
   char *strp, str[TAG_STRING_LEN+1];

+        if (!proto_is_protocol_enabled(find_protocol_by_id(i))) {
+            continue;
+        }
+
   hfinfo = proto_registrar_get_nth(i);
        protocol = find_protocol_by_id(i);
   name = proto_get_protocol_short_name(protocol); /* name, short_name or filter name