isprint.h \
keys.h \
layout_prefs.h \
+ macros_dlg.h \
main.h \
menu.h \
mtp3_stat.h \
help_dlg.c \
hostlist_table.c \
layout_prefs.c \
+ macros_dlg.c \
main.c \
menu.c \
nameres_prefs.c \
--- /dev/null
+/* macros_dlg.c
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 2001 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gtk/gtk.h>
+
+#include <epan/dfilter/dfilter-macro.h>
+#include <stdlib.h>
+#include <epan/uat.h>
+#include "uat_gui.h"
+#include "macros_dlg.h"
+
+void macros_dialog_cb(GtkWidget *w _U_, gpointer data _U_) {
+ void* dfmuat;
+ dfilter_macro_get_uat(&dfmuat);
+ uat_window_cb(NULL,dfmuat);
+}
+
--- /dev/null
+/* macros_dlg.h
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 2001 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#ifndef __MACROS_DLG_H_
+#define __MACROS_DLG_H_
+ void macros_dialog_cb(GtkWidget*, gpointer);
+#endif
epan_init(register_all_protocols,register_all_protocol_handoffs,
failure_alert_box,open_failure_alert_box,read_failure_alert_box);
-
- uat_init_menus();
-
-
splash_update(splash_win, "Init tap listeners ...");
/* Register all tap listeners; we do this before we parse the arguments,
#include "sctp_stat.h"
#include "firewall_dlg.h"
#include "u3.h"
-
+#include "macros_dlg.h"
GtkWidget *popup_menu_object;
ITEM_FACTORY_STOCK_ENTRY("/View/_Coloring Rules...", NULL, color_display_cb,
0, GTK_STOCK_SELECT_COLOR),
ITEM_FACTORY_ENTRY("/View/<separator>", NULL, NULL, 0, "<Separator>", NULL),
- ITEM_FACTORY_ENTRY("/View/User Tables", NULL, NULL, 0, "<Branch>", NULL),
+ ITEM_FACTORY_ENTRY("/View/Display Filter _Macros...", NULL, macros_dialog_cb, 0, NULL, NULL),
ITEM_FACTORY_ENTRY("/View/<separator>", NULL, NULL, 0, "<Separator>", NULL),
have_items_in_tools_menu = TRUE;
break;
#endif
- case(REGISTER_USER_TABLES): toolspath = "/View/User Tables/"; break;
default:
g_assert(!"no such menu group");
toolspath = NULL;
case(REGISTER_TOOLS_GROUP_NONE):
break;
#endif
- case(REGISTER_USER_TABLES):
- break;
default:
g_assert_not_reached();
}
if (merge_tap_menus_layered(node, REGISTER_TOOLS_GROUP_NONE)) {
/*gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);*/
}
-#endif
- if (merge_tap_menus_layered(node, REGISTER_USER_TABLES)) {
- entry->path = "/View/";
- /*gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);*/
- }
-
+#endif
}
}
-/*
- Add an UAT to the menu
- */
-static void add_uat_to_menu(void* u, void* user_data _U_) {
- uat_t* uat = u;
- register_stat_menu_item( uat->category ?
- ep_strdup_printf("%s/%s",uat->category,uat->name) :
- ep_strdup_printf(" %s",uat->name),
- REGISTER_USER_TABLES,
- uat_window_cb,
- NULL,
- NULL,
- uat);
-}
-
-
-void uat_init_menus(void) {
- uat_foreach_table(add_uat_to_menu,NULL);
-}
-
#define _UAT_GUI_H_
void uat_window_cb(GtkWidget* unused, void* uat);
-void uat_init_menus(void);
#endif
REGISTER_STAT_GROUP_RESPONSE_TIME,
REGISTER_STAT_GROUP_TELEPHONY,
/* XXX - split into telephony and VoIP? */
- REGISTER_ANALYZE_GROUP_NONE,
- REGISTER_USER_TABLES
+ REGISTER_ANALYZE_GROUP_NONE
#ifdef HAVE_LUA_5_1
,REGISTER_TOOLS_GROUP_NONE
#endif