aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/decode_as_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-06-10 09:47:25 +0000
committerGuy Harris <guy@alum.mit.edu>2004-06-10 09:47:25 +0000
commitf2cf0c1e0f1f055e2f07a547f7c00f12ded123c6 (patch)
treebf97dd87e3516701ed17009c9b1f2421bffbe886 /gtk/decode_as_dlg.c
parentd16eb303f51593d3080ba964bde0214db14ffba8 (diff)
From Stas Grabois: don't show disabled protocols in the "Add Expression"
and "Decode As" dialogs (so that you can cut down the size of the protocol lists in those dialogs by disabling "uninteresting" protocols). svn path=/trunk/; revision=11132
Diffstat (limited to 'gtk/decode_as_dlg.c')
-rw-r--r--gtk/decode_as_dlg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c
index dae3e02669..4c9729196d 100644
--- a/gtk/decode_as_dlg.c
+++ b/gtk/decode_as_dlg.c
@@ -1,6 +1,6 @@
/* decode_as_dlg.c
*
- * $Id: decode_as_dlg.c,v 1.40 2004/05/26 03:49:22 ulfl Exp $
+ * $Id: decode_as_dlg.c,v 1.41 2004/06/10 09:46:26 guy Exp $
*
* Routines to modify dissector tables on the fly.
*
@@ -1078,6 +1078,7 @@ decode_add_to_list (gchar *table_name, gpointer value, gpointer user_data)
GtkTreeIter iter;
struct handle_lookup_info hli;
#endif
+ gint i;
g_assert(user_data);
g_assert(value);
@@ -1086,6 +1087,10 @@ decode_add_to_list (gchar *table_name, gpointer value, gpointer user_data)
handle = value;
proto_name = dissector_handle_get_short_name(handle);
+ i = dissector_handle_get_protocol_index(handle);
+ if (i >= 0 && !proto_is_protocol_enabled(find_protocol_by_id(i)))
+ return;
+
#if GTK_MAJOR_VERSION < 2
row = gtk_clist_find_row_from_data(list, handle);
/* We already have an entry for this handle.