From b204b45400a8c75ed81693f93811ced8298a92e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Wed, 17 Aug 2011 14:19:25 +0000 Subject: [PATCH] Move #defines for MENU_BAR_PATH_* and PACKET_LIST_POPUP_PATH_* out of menus.h to main_filter_toolbar.c, that's the only place where they are used. The #defines for PACKET_LIST_POPUP_PATH_* seem to be unused, so #if 0 them. svn path=/trunk/; revision=38579 --- gtk/main_filter_toolbar.c | 52 ++++++++++++++++++++++++++++++++++++++ gtk/menus.h | 53 --------------------------------------- 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/gtk/main_filter_toolbar.c b/gtk/main_filter_toolbar.c index 52855c44b6..351a40adf0 100644 --- a/gtk/main_filter_toolbar.c +++ b/gtk/main_filter_toolbar.c @@ -51,6 +51,58 @@ #include "main_toolbar.h" #include "main_filter_toolbar.h" +#ifdef MAIN_MENU_USE_UIMANAGER +# define MENU_BAR_PATH_FILE_OPEN "/Menubar/FileMenu/Open" +# define MENU_BAR_PATH_EDIT_COPY_AS_FLT "/Menubar/EditMenu/Copy/AsFilter" +# define MENU_BAR_PATH_ANALYZE_DISPLAY_FLT "/Menubar/AnalyzeMenu/DisplayFilters" +# define MENU_BAR_PATH_ANALYZE_FOLLOW_TCP_STREAM "/Menubar/AnalyzeMenu/FollowTCPStream" +# define MENU_BAR_PATH_ANALYZE_FOLLOW_UDP_STREAM "/Menubar/AnalyzeMenu/FollowUDPStream" +# define MENU_BAR_PATH_ANALYZE_FOLLOW_SSL_STREAM "/Menubar/AnalyzeMenu/FollowSSLStream" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/Selected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_NOT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/NotSelected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/AndSelected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/OrSelected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_NOT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/AndNotSelected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_NOT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/OrNotSelected" + +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/Selected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_NOT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/NotSelected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/AndSelected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/OrSelected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_NOT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/AndNotSelected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_NOT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/OrNotSelected" +#else +# define MENU_BAR_PATH_FILE_OPEN "/File/Open..." +# define MENU_BAR_PATH_EDIT_COPY_AS_FLT "/Edit/Copy/As Filter" +# define MENU_BAR_PATH_ANALYZE_DISPLAY_FLT "/Analyze/Display Filters..." +# define MENU_BAR_PATH_ANALYZE_FOLLOW_TCP_STREAM "/Analyze/Follow TCP Stream" +# define MENU_BAR_PATH_ANALYZE_FOLLOW_UDP_STREAM "/Analyze/Follow UDP Stream" +# define MENU_BAR_PATH_ANALYZE_FOLLOW_SSL_STREAM "/Analyze/Follow SSL Stream" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_SEL "/Analyze/Apply as Filter/Selected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_NOT_SEL "/Analyze/Apply as Filter/Not Selected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_SEL "/Analyze/Apply as Filter/... and Selected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_SEL "/Analyze/Apply as Filter/... or Selected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_NOT_SEL "/Analyze/Apply as Filter/... and not Selected" +# define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_NOT_SEL "/Analyze/Apply as Filter/... or not Selected" + +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_SEL "/Analyze/Prepare a Filter/Selected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_NOT_SEL "/Analyze/Prepare a Filter/Not Selected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_SEL "/Analyze/Prepare a Filter/... and Selected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_SEL "/Analyze/Prepare a Filter/... or Selected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_NOT_SEL "/Analyze/Prepare a Filter/... and not Selected" +# define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_NOT_SEL "/Analyze/Prepare a Filter/... or not Selected" +# endif /* MAIN_MENU_USE_UIMANAGER */ + +#if 0 /* Unused? */ +# define PACKET_LIST_POPUP_PATH_ANALYZE_FOLLOW_TCP_STREAM "/PacketListMenuPopup/FollowTCPStream" +# define PACKET_LIST_POPUP_PATH_ANALYZE_FOLLOW_UDP_STREAM "/PacketListMenuPopup/FollowUDPStream" +# define PACKET_LIST_POPUP_PATH_ANALYZE_FOLLOW_SSL_STREAM "/PacketListMenuPopup/FollowSSLStream" +# define PACKET_LIST_POPUP_PATH_CONV_FLT_ETH "/PacketListMenuPopup/ConversationFilter/Ethernet" +# define PACKET_LIST_POPUP_PATH_CONV_FLT_IP "/PacketListMenuPopup/ConversationFilter/IP" +# define PACKET_LIST_POPUP_PATH_CONV_FLT_TCP "/PacketListMenuPopup/ConversationFilter/TCP" +# define PACKET_LIST_POPUP_PATH_CONV_FLT_UDP "/PacketListMenuPopup/ConversationFilter/UDP" +# define PACKET_LIST_POPUP_PATH_CONV_FLT_PN_CBA_SERV "/PacketListMenuPopup/ConversationFilter/PN-CBA" +#endif GtkWidget *main_display_filter_widget=NULL; diff --git a/gtk/menus.h b/gtk/menus.h index 32d2111419..788fe30985 100644 --- a/gtk/menus.h +++ b/gtk/menus.h @@ -161,59 +161,6 @@ void set_menus_for_selected_packet(capture_file *cf); /* Enable or disable menu items based on configuration profile */ void set_menus_for_profiles(gboolean default_profile); -#ifdef MAIN_MENU_USE_UIMANAGER -#define MENU_BAR_PATH_FILE_OPEN "/Menubar/FileMenu/Open" -#define MENU_BAR_PATH_EDIT_COPY_AS_FLT "/Menubar/EditMenu/Copy/AsFilter" -#define MENU_BAR_PATH_ANALYZE_DISPLAY_FLT "/Menubar/AnalyzeMenu/DisplayFilters" -#define MENU_BAR_PATH_ANALYZE_FOLLOW_TCP_STREAM "/Menubar/AnalyzeMenu/FollowTCPStream" -#define MENU_BAR_PATH_ANALYZE_FOLLOW_UDP_STREAM "/Menubar/AnalyzeMenu/FollowUDPStream" -#define MENU_BAR_PATH_ANALYZE_FOLLOW_SSL_STREAM "/Menubar/AnalyzeMenu/FollowSSLStream" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/Selected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_NOT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/NotSelected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/AndSelected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/OrSelected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_NOT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/AndNotSelected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_NOT_SEL "/Menubar/AnalyzeMenu/ApplyAsFilter/OrNotSelected" - -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/Selected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_NOT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/NotSelected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/AndSelected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/OrSelected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_NOT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/AndNotSelected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_NOT_SEL "/Menubar/AnalyzeMenu/PrepareaFilter/OrNotSelected" - -#else -#define MENU_BAR_PATH_FILE_OPEN "/File/Open..." -#define MENU_BAR_PATH_EDIT_COPY_AS_FLT "/Edit/Copy/As Filter" -#define MENU_BAR_PATH_ANALYZE_DISPLAY_FLT "/Analyze/Display Filters..." -#define MENU_BAR_PATH_ANALYZE_FOLLOW_TCP_STREAM "/Analyze/Follow TCP Stream" -#define MENU_BAR_PATH_ANALYZE_FOLLOW_UDP_STREAM "/Analyze/Follow UDP Stream" -#define MENU_BAR_PATH_ANALYZE_FOLLOW_SSL_STREAM "/Analyze/Follow SSL Stream" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_SEL "/Analyze/Apply as Filter/Selected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_NOT_SEL "/Analyze/Apply as Filter/Not Selected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_SEL "/Analyze/Apply as Filter/... and Selected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_SEL "/Analyze/Apply as Filter/... or Selected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_AND_NOT_SEL "/Analyze/Apply as Filter/... and not Selected" -#define MENU_BAR_PATH_ANALYZE_APL_AS_FLT_OR_NOT_SEL "/Analyze/Apply as Filter/... or not Selected" - -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_SEL "/Analyze/Prepare a Filter/Selected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_NOT_SEL "/Analyze/Prepare a Filter/Not Selected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_SEL "/Analyze/Prepare a Filter/... and Selected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_SEL "/Analyze/Prepare a Filter/... or Selected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_AND_NOT_SEL "/Analyze/Prepare a Filter/... and not Selected" -#define MENU_BAR_PATH_ANALYZE_PREP_A_FLT_OR_NOT_SEL "/Analyze/Prepare a Filter/... or not Selected" -#endif /* MAIN_MENU_USE_UIMANAGER */ - -#define PACKET_LIST_POPUP_PATH_ANALYZE_FOLLOW_TCP_STREAM "/PacketListMenuPopup/FollowTCPStream" -#define PACKET_LIST_POPUP_PATH_ANALYZE_FOLLOW_UDP_STREAM "/PacketListMenuPopup/FollowUDPStream" -#define PACKET_LIST_POPUP_PATH_ANALYZE_FOLLOW_SSL_STREAM "/PacketListMenuPopup/FollowSSLStream" -#define PACKET_LIST_POPUP_PATH_CONV_FLT_ETH "/PacketListMenuPopup/ConversationFilter/Ethernet" -#define PACKET_LIST_POPUP_PATH_CONV_FLT_IP "/PacketListMenuPopup/ConversationFilter/IP" -#define PACKET_LIST_POPUP_PATH_CONV_FLT_TCP "/PacketListMenuPopup/ConversationFilter/TCP" -#define PACKET_LIST_POPUP_PATH_CONV_FLT_UDP "/PacketListMenuPopup/ConversationFilter/UDP" -#define PACKET_LIST_POPUP_PATH_CONV_FLT_PN_CBA_SERV "/PacketListMenuPopup/ConversationFilter/PN-CBA" - - #ifdef __cplusplus } #endif /* __cplusplus */