Don't offer the ability to edit capture filters if Ethereal wasn't
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 27 Jun 2001 10:00:14 +0000 (10:00 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 27 Jun 2001 10:00:14 +0000 (10:00 +0000)
linked with libpcap.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3613 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/filter_prefs.c
gtk/menu.c

index 2078e9dd3edfe78a5a0ed9142a7ca7dd914a8e1e..3f23d9103b2a1fe924f17bbdf59d16dcb0b3259a 100644 (file)
@@ -3,7 +3,7 @@
  * (This used to be a notebook page under "Preferences", hence the
  * "prefs" in the file name.)
  *
- * $Id: filter_prefs.c,v 1.29 2001/02/23 05:54:27 guy Exp $
+ * $Id: filter_prefs.c,v 1.30 2001/06/27 10:00:14 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -87,6 +87,7 @@ static void       filter_expr_cb(GtkWidget *, gpointer);
 static void       filter_name_te_destroy_cb(GtkWidget *, gpointer);
 static void       filter_filter_te_destroy_cb(GtkWidget *, gpointer);
 
+#ifdef HAVE_LIBPCAP
 /* XXX - we can have one global dialog box for editing, and a bunch
    of dialog boxes associated with browse buttons; we want the dialog
    boxes associated with browse buttons to at least let you save the
@@ -148,6 +149,7 @@ capture_filter_construct_cb(GtkWidget *w, gpointer user_data)
        gtk_object_set_data(GTK_OBJECT(caller), E_FILT_DIALOG_PTR_KEY,
            filter_browse_w);
 }
+#endif
 
 /* Create a filter dialog for constructing a display filter.
 
@@ -202,6 +204,7 @@ display_filter_construct_cb(GtkWidget *w, gpointer construct_args_ptr)
            filter_browse_w);
 }
 
+#ifdef HAVE_LIBPCAP
 static GtkWidget *global_cfilter_w;
 
 /* Create a filter dialog for editing capture filters; this is to be used
@@ -232,6 +235,7 @@ cfilter_dialog_cb(GtkWidget *w)
         */
        global_cfilter_w = filter_dialog_new(NULL, NULL, CFILTER_LIST, &args);
 }
+#endif
 
 static GtkWidget *global_dfilter_w;
 
@@ -760,10 +764,12 @@ filter_dlg_destroy(GtkWidget *win, gpointer data)
                   a menu item; note that we no longer have one. */
                switch (list) {
 
+#ifdef HAVE_LIBPCAP
                case CFILTER_LIST:
                        g_assert(win == global_cfilter_w);
                        global_cfilter_w = NULL;
                        break;
+#endif
 
                case DFILTER_LIST:
                        g_assert(win == global_dfilter_w);
index 793abf184eacfc8d299f9dd157d8c45606e3ce2e..8a370560d98f3e3baa4be7bde0e4aee0a94363a5 100644 (file)
@@ -1,7 +1,7 @@
 /* menu.c
  * Menu routines
  *
- * $Id: menu.c,v 1.53 2001/06/05 07:38:37 guy Exp $
+ * $Id: menu.c,v 1.54 2001/06/27 10:00:14 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -121,7 +121,9 @@ static GtkItemFactoryEntry menu_items[] =
   {"/Edit/_Unmark All Frames", NULL, GTK_MENU_FUNC(unmark_all_frames_cb), 0, NULL},
   {"/Edit/<separator>", NULL, NULL, 0, "<Separator>"},
   {"/Edit/_Preferences...", NULL, GTK_MENU_FUNC(prefs_cb), 0, NULL},
+#ifdef HAVE_LIBPCAP
   {"/Edit/_Capture Filters...", NULL, GTK_MENU_FUNC(cfilter_dialog_cb), 0, NULL},
+#endif
   {"/Edit/_Display Filters...", NULL, GTK_MENU_FUNC(dfilter_dialog_cb), 0, NULL},
   {"/Edit/P_rotocols...", NULL, GTK_MENU_FUNC(proto_cb), 0, NULL},
 #ifdef HAVE_LIBPCAP