On Windows enable threads everywhere instead of just in dumpcap. If
[obnox/wireshark/wip.git] / gtk / menus.c
1 /* menus.c
2  * Menu routines
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifdef HAVE_CONFIG_H
26 # include "config.h"
27 #endif
28
29 #include <gtk/gtk.h>
30
31 #include <stdio.h>
32 #include <string.h>
33
34 #include <epan/packet.h>
35 #include <epan/addr_resolv.h>
36 #include <epan/prefs.h>
37 #include <epan/prefs-int.h>
38 #include <epan/tap.h>
39 #include <epan/timestamp.h>
40 #include <epan/etypes.h>
41 #include <epan/ipproto.h>
42 #include <epan/dissector_filters.h>
43 #include <epan/strutil.h>
44 #include <epan/plugins.h>
45 #include <epan/epan_dissect.h>
46 #include <epan/column.h>
47
48 #include "../print.h"
49 #include "../ui_util.h"
50 #include "../simple_dialog.h"
51 #include "../main_statusbar.h"
52 #include "../color_filters.h"
53 #include "../stat_menu.h"
54 #include "../u3.h"
55
56 #include "gtk/about_dlg.h"
57 #include "gtk/capture_dlg.h"
58 #include "gtk/capture_if_dlg.h"
59 #include "gtk/color_dlg.h"
60 #include "gtk/filter_dlg.h"
61 #include "gtk/profile_dlg.h"
62 #include "gtk/dlg_utils.h"
63 #include "gtk/capture_file_dlg.h"
64 #include "gtk/fileset_dlg.h"
65 #include "gtk/file_import_dlg.h"
66 #include "gtk/find_dlg.h"
67 #include "gtk/goto_dlg.h"
68 #include "gtk/summary_dlg.h"
69 #include "gtk/prefs_dlg.h"
70 #include "gtk/packet_win.h"
71 #include "gtk/follow_tcp.h"
72 #include "gtk/follow_udp.h"
73 #include "gtk/follow_ssl.h"
74 #include "gtk/decode_as_dlg.h"
75 #include "gtk/help_dlg.h"
76 #include "gtk/supported_protos_dlg.h"
77 #include "gtk/proto_dlg.h"
78 #include "gtk/proto_hier_stats_dlg.h"
79 #include "gtk/keys.h"
80 #include "gtk/stock_icons.h"
81 #include "gtk/gtkglobals.h"
82 #include "gtk/recent.h"
83 #include "gtk/main_proto_draw.h"
84 #include "gtk/conversations_table.h"
85 #include "gtk/hostlist_table.h"
86 #include "gtk/packet_history.h"
87 #include "gtk/sctp_stat.h"
88 #include "gtk/firewall_dlg.h"
89 #include "gtk/macros_dlg.h"
90 #include "gtk/export_object.h"
91 #include "epan/dissectors/packet-ssl-utils.h"
92 #include "gtk/export_sslkeys.h"
93 #include "gtk/gui_stat_menu.h"
94 #include "gtk/main.h"
95 #include "gtk/menus.h"
96 #include "gtk/main_toolbar.h"
97 #include "gtk/main_welcome.h"
98 #include "gtk/uat_gui.h"
99 #include "gtk/gui_utils.h"
100 #include "gtk/manual_addr_resolv.h"
101 #include "gtk/proto_help.h"
102 #include "gtk/dissector_tables_dlg.h"
103 #include "gtk/utf8_entities.h"
104 #include "gtk/expert_comp_dlg.h"
105
106 #include "gtk/new_packet_list.h"
107
108 #ifdef HAVE_IGE_MAC_INTEGRATION
109 #include <ige-mac-menu.h>
110 #endif
111
112 #ifdef HAVE_GTKOSXAPPLICATION
113 #include <igemacintegration/gtkosxapplication.h>
114 #endif
115
116 static int initialize = TRUE;
117 #ifdef MAIN_MENU_USE_UIMANAGER
118     GtkActionGroup    *main_menu_bar_action_group;
119 #else
120 static GtkItemFactory *main_menu_factory = NULL;
121 #endif /* MAIN_MENU_USE_UIMANAGER */
122 static GtkUIManager *ui_manager_main_menubar = NULL;
123 static GtkUIManager *ui_manager_packet_list_heading = NULL;
124 static GtkUIManager *ui_manager_packet_list_menu = NULL;
125 static GtkUIManager *ui_manager_tree_view_menu = NULL;
126 static GtkUIManager *ui_manager_bytes_menu = NULL;
127 static GtkUIManager *ui_manager_statusbar_profiles_menu = NULL;
128 static GSList *popup_menu_list = NULL;
129
130 static GtkAccelGroup *grp;
131
132 typedef struct _menu_item {
133     gint          group;
134     const char   *gui_path;
135     const char   *name;
136     const char   *stock_id;
137     const char   *label;
138     const char   *accelerator;
139     const gchar  *tooltip;
140 #ifdef MAIN_MENU_USE_UIMANAGER
141     GCallback    callback;
142 #else
143     GtkItemFactoryCallback callback;
144 #endif
145     gboolean enabled;
146     gpointer callback_data;
147     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data);
148     gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data);
149     GList *children;
150 } menu_item_t;
151
152 static GList *tap_menu_tree_root = NULL;
153
154 GtkWidget *popup_menu_object;
155
156
157 #define GTK_MENU_FUNC(a) ((GtkItemFactoryCallback)(a))
158
159 static void merge_all_tap_menus(GList *node);
160 #ifdef MAIN_MENU_USE_UIMANAGER
161 static void menu_open_recent_file_cmd_cb(GtkAction *action, gpointer data _U_ );
162 static void add_recent_items (guint merge_id, GtkUIManager *ui_manager);
163 #endif /* MAIN_MENU_USE_UIMANAGER */
164
165 static void menus_init(void);
166 static void set_menu_sensitivity (GtkUIManager *ui_manager, const gchar *, gint);
167 #ifndef MAIN_MENU_USE_UIMANAGER
168 static void clear_menu_recent_capture_file_cmd_cb(GtkWidget *w, gpointer unused _U_);
169 static void set_menu_sensitivity_old (const gchar *, gint);
170 #endif /* MAIN_MENU_USE_UIMANAGER */
171 static void show_hide_cb(GtkWidget *w, gpointer data, gint action);
172 #ifndef MAIN_MENU_USE_UIMANAGER
173 static void timestamp_format_cb(GtkWidget *w, gpointer d, gint action);
174 static void timestamp_precision_cb(GtkWidget *w, gpointer d, gint action);
175 #endif
176 static void timestamp_seconds_time_cb(GtkWidget *w, gpointer d, gint action);
177 static void name_resolution_cb(GtkWidget *w, gpointer d, gint action);
178 #ifdef HAVE_LIBPCAP
179 #ifndef MAIN_MENU_USE_UIMANAGER
180 static void auto_scroll_live_cb(GtkWidget *w, gpointer d);
181 #endif
182 #endif
183 static void colorize_cb(GtkWidget *w, gpointer d);
184
185
186 /*  As a general GUI guideline, we try to follow the Gnome Human Interface Guidelines, which can be found at:
187     http://developer.gnome.org/projects/gup/hig/1.0/index.html
188
189 Please note: there are some differences between the Gnome HIG menu suggestions and our implementation:
190
191 File/Open Recent:   the Gnome HIG suggests putting the list of recently used files as elements into the File menuitem.
192                     As this is ok for only a few items, this will become unhandy for 10 or even more list entries.
193                     For this reason, we use a submenu for this.
194
195 File/Close:         the Gnome HIG suggests putting this item just above the Quit item.
196                     This results in unintuitive behaviour as both Close and Quit items are very near together.
197                     By putting the Close item near the open item(s), it better suggests that it will close the
198                     currently opened/captured file only.
199 */
200
201 typedef enum {
202     SHOW_HIDE_MAIN_TOOLBAR = 1,
203     SHOW_HIDE_FILTER_TOOLBAR,
204     SHOW_HIDE_AIRPCAP_TOOLBAR,
205     SHOW_HIDE_STATUSBAR,
206     SHOW_HIDE_PACKET_LIST,
207     SHOW_HIDE_TREE_VIEW,
208     SHOW_HIDE_BYTE_VIEW
209 } show_hide_values_e;
210
211 typedef enum {
212     CONV_ETHER = 1,
213     CONV_IP,
214     CONV_TCP,
215     CONV_UDP,
216     CONV_CBA
217 } conv_values_e;
218
219 static char *
220 build_conversation_filter(int action, gboolean show_dialog)
221 {
222     packet_info *pi = &cfile.edt->pi;
223     char        *buf;
224
225
226     switch(action) {
227     case(CONV_CBA):
228         if (pi->profinet_type == 0) {
229             if (show_dialog) {
230                 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
231                     "Error filtering conversation.  Please make\n"
232                     "sure you have a PROFINET CBA packet selected.");
233             }
234             return NULL;
235         }
236
237         if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4
238         && pi->ipproto == IP_PROTO_TCP ) {
239             /* IPv4 */
240             switch(pi->profinet_type) {
241             case(1):
242                 buf = g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 0)",
243                     ip_to_str( pi->net_dst.data),
244                     ip_to_str( pi->net_src.data),
245                     ip_to_str( pi->net_src.data),
246                     ip_to_str( pi->net_dst.data));
247                 break;
248             case(2):
249                 buf = g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 0)",
250                     ip_to_str( pi->net_src.data),
251                     ip_to_str( pi->net_dst.data),
252                     ip_to_str( pi->net_dst.data),
253                     ip_to_str( pi->net_src.data));
254                 break;
255             case(3):
256                 buf = g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.srt == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.srt == 0)",
257                     ip_to_str( pi->net_dst.data),
258                     ip_to_str( pi->net_src.data),
259                     ip_to_str( pi->net_src.data),
260                     ip_to_str( pi->net_dst.data));
261                 break;
262             case(4):
263                 buf = g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.srt == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.srt == 0)",
264                     ip_to_str( pi->net_src.data),
265                     ip_to_str( pi->net_dst.data),
266                     ip_to_str( pi->net_dst.data),
267                     ip_to_str( pi->net_src.data));
268                 break;
269             default:
270                 return NULL;
271             }
272         } else {
273             return NULL;
274         }
275         break;
276     case(CONV_TCP):
277         if (pi->ipproto != IP_PROTO_TCP) {
278             if (show_dialog) {
279                 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
280                     "Error filtering conversation.  Please make\n"
281                     "sure you have a TCP packet selected.");
282             }
283             return NULL;
284         }
285
286         if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4 ) {
287             /* TCP over IPv4 */
288             buf = g_strdup_printf("(ip.addr eq %s and ip.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)",
289                 ip_to_str( pi->net_src.data),
290                 ip_to_str( pi->net_dst.data),
291                 pi->srcport, pi->destport );
292         } else if( pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6 ) {
293             /* TCP over IPv6 */
294             buf = g_strdup_printf("(ipv6.addr eq %s and ipv6.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)",
295                 ip6_to_str((const struct e_in6_addr *)pi->net_src.data),
296                 ip6_to_str((const struct e_in6_addr *)pi->net_dst.data),
297                 pi->srcport, pi->destport );
298         } else {
299             return NULL;
300         }
301         break;
302     case(CONV_UDP):
303         if (pi->ipproto != IP_PROTO_UDP) {
304             if (show_dialog) {
305                 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
306                     "Error filtering conversation.  Please make\n"
307                     "sure you have a UDP packet selected.");
308             }
309             return NULL;
310         }
311
312         if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4 ) {
313             /* UDP over IPv4 */
314             buf = g_strdup_printf("(ip.addr eq %s and ip.addr eq %s) and (udp.port eq %d and udp.port eq %d)",
315                 ip_to_str( pi->net_src.data),
316                 ip_to_str( pi->net_dst.data),
317                 pi->srcport, pi->destport );
318         } else if( pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6 ) {
319             /* UDP over IPv6 */
320             buf = g_strdup_printf("(ipv6.addr eq %s and ipv6.addr eq %s) and (udp.port eq %d and udp.port eq %d)",
321                 ip6_to_str((const struct e_in6_addr *)pi->net_src.data),
322                 ip6_to_str((const struct e_in6_addr *)pi->net_dst.data),
323                 pi->srcport, pi->destport );
324         } else {
325             return NULL;
326         }
327         break;
328     case(CONV_IP):
329         if ((pi->ethertype != ETHERTYPE_IP) && (pi->ethertype != ETHERTYPE_IPv6)) {
330             if (show_dialog) {
331                 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
332                     "Error filtering conversation.  Please make\n"
333                     "sure you have a IP packet selected.");
334             }
335             return NULL;
336         }
337
338         if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4 ) {
339             /* IPv4 */
340             buf = g_strdup_printf("ip.addr eq %s and ip.addr eq %s",
341                 ip_to_str( pi->net_src.data),
342                 ip_to_str( pi->net_dst.data));
343         } else if( pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6 ) {
344             /* IPv6 */
345             buf = g_strdup_printf("ipv6.addr eq %s and ipv6.addr eq %s",
346                 ip6_to_str((const struct e_in6_addr *)pi->net_src.data),
347                 ip6_to_str((const struct e_in6_addr *)pi->net_dst.data));
348         } else {
349             return NULL;
350         }
351         break;
352     case(CONV_ETHER):
353         /* XXX - is this the right way to check for Ethernet? */
354         /* check for the data link address type */
355         /* (ethertype will be 0 when used as length field) */
356         if (pi->dl_src.type != AT_ETHER) {
357             if (show_dialog) {
358                 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
359                     "Error filtering conversation.  Please make\n"
360                     "sure you have a Ethernet packet selected.");
361             }
362             return NULL;
363         }
364
365         if( pi->dl_src.type == AT_ETHER && pi->dl_dst.type == AT_ETHER ) {
366             /* Ethernet */
367             buf = g_strdup_printf("eth.addr eq %s and eth.addr eq %s",
368                 ether_to_str( pi->dl_src.data),
369                 ether_to_str( pi->dl_dst.data));
370         } else {
371             return NULL;
372         }
373         break;
374     default:
375         return NULL;
376     }
377
378     return buf;
379 }
380
381 static void
382 new_window_cb(GtkWidget *widget)
383 {
384         new_packet_window(widget, FALSE);
385 }
386
387 #ifdef WANT_PACKET_EDITOR
388 static void
389 edit_window_cb(GtkWidget *widget)
390 {
391         new_packet_window(widget, TRUE);
392 }
393 #endif
394
395 static void
396 conversation_cb(GtkAction *a _U_, gpointer data _U_, int action)
397 {
398     gchar       *filter;
399     GtkWidget   *filter_te;
400
401     if (cfile.current_frame) {
402         /* create a filter-string based on the selected packet and action */
403         filter = build_conversation_filter(action, TRUE);
404
405         /* Run the display filter so it goes in effect - even if it's the
406         same as the previous display filter. */
407         filter_te = gtk_bin_get_child(GTK_BIN(g_object_get_data(G_OBJECT(top_level), E_DFILTER_CM_KEY)));
408
409         gtk_entry_set_text(GTK_ENTRY(filter_te), filter);
410         main_filter_packets(&cfile, filter, TRUE);
411
412         g_free(filter);
413     }
414 }
415
416 static void
417 colorize_conversation_cb(GtkWidget * w _U_, gpointer data _U_, int action)
418 {
419     gchar        *filter = NULL;
420
421     if( (action>>8) == 255 ) {
422         color_filters_reset_tmp();
423         new_packet_list_colorize_packets();
424     } else if (cfile.current_frame) {
425         if( (action&0xff) == 0 ) {
426             /* colorize_conversation_cb was called from the window-menu
427              * or through an accelerator key. Try to build a conversation
428              * filter in the order TCP, UDP, IP, Ethernet and apply the
429              * coloring */
430             filter = build_conversation_filter(CONV_TCP,FALSE);
431             if( filter == NULL )
432                 filter = build_conversation_filter(CONV_UDP,FALSE);
433             if( filter == NULL )
434                 filter = build_conversation_filter(CONV_IP,FALSE);
435             if( filter == NULL )
436                 filter = build_conversation_filter(CONV_ETHER,FALSE);
437             if( filter == NULL ) {
438                 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Unable to build conversation filter.");
439                 return;
440             }
441         } else {
442             /* create a filter-string based on the selected packet and action */
443             filter = build_conversation_filter(action&0xff, TRUE);
444         }
445
446         if( (action>>8) == 0) {
447             /* Open the "new coloring filter" dialog with the filter */
448             color_display_with_filter(filter);
449         } else {
450             /* Set one of the temporary coloring filters */
451             color_filters_set_tmp((guint8)(action>>8),filter,FALSE);
452             new_packet_list_colorize_packets();
453         }
454
455         g_free(filter);
456     }
457 }
458
459 static void
460 goto_conversation_frame(gboolean dir)
461 {
462         gchar *filter;
463         dfilter_t *dfcode = NULL;
464         gboolean found_packet=FALSE;
465
466         filter = build_conversation_filter(CONV_TCP,FALSE);
467         if( filter == NULL )
468             filter = build_conversation_filter(CONV_UDP,FALSE);
469         if( filter == NULL )
470             filter = build_conversation_filter(CONV_IP,FALSE);
471         if( filter == NULL ) {
472             statusbar_push_temporary_msg("Unable to build conversation filter.");
473             g_free(filter);
474             return;
475         }
476
477         if (!dfilter_compile(filter, &dfcode)) {
478             /* The attempt failed; report an error. */
479             statusbar_push_temporary_msg("Error compiling filter for this conversation.");
480             g_free(filter);
481             return;
482         }
483
484         found_packet = cf_find_packet_dfilter(&cfile, dfcode, dir);
485
486         if (!found_packet) {
487             /* We didn't find a packet */
488             statusbar_push_temporary_msg("No previous/next packet in conversation.");
489         }
490
491         dfilter_free(dfcode);
492         g_free(filter);
493 }
494
495 #ifdef MAIN_MENU_USE_UIMANAGER
496 static void
497 goto_next_frame_conversation_cb(GtkAction *action _U_, gpointer user_data _U_)
498 {
499     goto_conversation_frame(FALSE);
500 }
501
502 static void
503 goto_previous_frame_conversation_cb(GtkAction *action _U_, gpointer user_data _U_)
504 {
505     goto_conversation_frame(TRUE);
506 }
507 #else
508 static void
509 goto_next_frame_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
510 {
511     goto_conversation_frame(FALSE);
512 }
513
514 static void
515 goto_previous_frame_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
516 {
517     goto_conversation_frame(TRUE);
518 }
519 #endif /* MAIN_MENU_USE_UIMANAGER */
520
521
522
523 /*Apply a filter */
524
525 static void
526 tree_view_menu_apply_selected_cb(GtkAction *action _U_, gpointer user_data)
527 {
528         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter/Selected");
529         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_REPLACE|MATCH_SELECTED_APPLY_NOW);
530 }
531
532 static void
533 tree_view_menu_apply_not_selected_cb(GtkAction *action _U_, gpointer user_data)
534 {
535         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter/NotSelected");
536         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_NOT|MATCH_SELECTED_APPLY_NOW);
537 }
538
539 static void
540 tree_view_menu_apply_and_selected_cb(GtkAction *action _U_, gpointer user_data)
541 {
542         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter/AndSelected");
543         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_AND|MATCH_SELECTED_APPLY_NOW);
544 }
545
546 static void
547 tree_view_menu_apply_or_selected_cb(GtkAction *action _U_, gpointer user_data)
548 {
549         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter/OrSelected");
550         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_OR|MATCH_SELECTED_APPLY_NOW);
551 }
552
553 static void
554 tree_view_menu_apply_and_not_selected_cb(GtkAction *action _U_, gpointer user_data)
555 {
556         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter/AndNotSelected");
557         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_AND_NOT|MATCH_SELECTED_APPLY_NOW);
558 }
559
560 static void
561 tree_view_menu_apply_or_not_selected_cb(GtkAction *action _U_, gpointer user_data)
562 {
563         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter/OrNotSelected");
564         match_selected_ptree_cb( widget , user_data,MATCH_SELECTED_OR_NOT|MATCH_SELECTED_APPLY_NOW);
565 }
566 /* Prepare a filter */
567 static void
568 tree_view_menu_prepare_selected_cb(GtkAction *action _U_, gpointer user_data)
569 {
570         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter/Selected");
571         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_REPLACE);
572 }
573
574 static void
575 tree_view_menu_prepare_not_selected_cb(GtkAction *action _U_, gpointer user_data)
576 {
577         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter/NotSelected");
578         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_NOT);
579 }
580
581 static void
582 tree_view_menu_prepare_and_selected_cb(GtkAction *action _U_, gpointer user_data)
583 {
584         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter/AndSelected");
585         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_AND);
586 }
587
588 static void
589 tree_view_menu_prepare_or_selected_cb(GtkAction *action _U_, gpointer user_data)
590 {
591         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter/OrSelected");
592         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_OR);
593 }
594
595 static void
596 tree_view_menu_prepare_and_not_selected_cb(GtkAction *action _U_, gpointer user_data)
597 {
598         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter/AndNotSelected");
599         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_AND_NOT);
600 }
601
602 static void
603 tree_view_menu_prepare_or_not_selected_cb(GtkAction *action _U_, gpointer user_data)
604 {
605         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter/OrNotSelected");
606         match_selected_ptree_cb( widget , user_data, MATCH_SELECTED_OR_NOT);
607 }
608
609 /* Prepare for use of GTKUImanager */
610 #ifdef MAIN_MENU_USE_UIMANAGER
611
612 static void
613 copy_description_cb(GtkAction *action _U_, gpointer user_data)
614 {
615         copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_DESCRIPTION);
616 }
617
618 static void
619 copy_fieldname_cb(GtkAction *action _U_, gpointer user_data)
620 {
621         copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_FIELDNAME);
622 }
623
624 static void
625 copy_value_cb(GtkAction *action _U_, gpointer user_data)
626 {
627         copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_VALUE);
628 }
629
630 static void
631 copy_as_filter_cb(GtkAction *action _U_, gpointer user_data)
632 {
633         match_selected_ptree_cb( NULL /* widget _U_ */ , user_data, MATCH_SELECTED_REPLACE|MATCH_SELECTED_COPY_ONLY);
634 }
635
636 static void
637 set_reftime_cb(GtkAction *action _U_, gpointer user_data)
638 {
639         reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_TOGGLE);
640 }
641
642 static void
643 find_next_ref_time_cb(GtkAction *action _U_, gpointer user_data)
644 {
645         reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_FIND_NEXT);
646 }
647
648 static void
649 find_previous_ref_time_cb(GtkAction *action _U_, gpointer user_data)
650 {
651         reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_FIND_PREV);
652 }
653
654 static void
655 menus_prefs_cb(GtkAction *action _U_, gpointer user_data)
656 {
657         prefs_page_cb( NULL /* widget _U_ */ , user_data, PREFS_PAGE_USER_INTERFACE);
658 }
659
660 static void
661 main_toolbar_show_hide_cb(GtkAction *action _U_, gpointer user_data)
662 {
663         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/MainToolbar");
664
665         if (!widget){
666                 g_warning("main_toolbar_show_hide_cb: No widget found");
667         }else{
668                 show_hide_cb( widget, user_data, SHOW_HIDE_MAIN_TOOLBAR);
669         }
670 }
671
672 static void
673 filter_toolbar_show_hide_cb(GtkAction * action _U_, gpointer user_data)
674 {
675         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/FilterToolbar");
676         if (!widget){
677                 g_warning("filter_toolbar_show_hide_cb: No widget found");
678         }else{
679                 show_hide_cb( widget, user_data, SHOW_HIDE_FILTER_TOOLBAR);
680         }
681 }
682
683 #ifdef HAVE_AIRPCAP
684 static void
685 wireless_toolbar_show_hide_cb(GtkAction *action _U_, gpointer user_data)
686 {
687         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/WirelessToolbar");
688         if (!widget){
689                 g_warning("wireless_toolbar_show_hide_cb: No widget found");
690         }else{
691                 show_hide_cb( widget, user_data, SHOW_HIDE_AIRPCAP_TOOLBAR);
692         }
693 }
694 #endif /* HAVE_AIRPCAP */
695
696 static void
697 status_bar_show_hide_cb(GtkAction *action _U_, gpointer user_data)
698 {
699         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/Statusbar");
700         if (!widget){
701                 g_warning("status_bar_show_hide_cb: No widget found");
702         }else{
703                 show_hide_cb( widget, user_data, SHOW_HIDE_STATUSBAR);
704         }
705 }
706 static void
707 packet_list_show_hide_cb(GtkAction *action _U_, gpointer user_data)
708 {
709         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketList");
710         if (!widget){
711                 g_warning("packet_list_show_hide_cb: No widget found");
712         }else{
713                 show_hide_cb( widget, user_data, SHOW_HIDE_PACKET_LIST);
714         }
715 }
716 static void
717 packet_details_show_hide_cb(GtkAction *action _U_, gpointer user_data)
718 {
719         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketDetails");
720         if (!widget){
721                 g_warning("packet_details_show_hide_cb: No widget found");
722         }else{
723                 show_hide_cb( widget, user_data, SHOW_HIDE_TREE_VIEW);
724         }
725 }
726 static void
727 packet_bytes_show_hide_cb(GtkAction *action _U_, gpointer user_data)
728 {
729         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketBytes");
730         if (!widget){
731                 g_warning("packet_bytes_show_hide_cb: No widget found");
732         }else{
733                 show_hide_cb( widget, user_data, SHOW_HIDE_BYTE_VIEW);
734         }
735 }
736
737 static void
738 timestamp_format_new_cb (GtkRadioAction *action, GtkRadioAction *current _U_, gpointer user_data  _U_)
739 {
740     gint value;
741
742     value = gtk_radio_action_get_current_value (action);
743     g_warning("timestamp_format_new_cb, value %u, recent.gui_time_format %u",value, recent.gui_time_format);
744     if (recent.gui_time_format != value) {
745         timestamp_set_type(value);
746         recent.gui_time_format = value;
747         /* This call adjusts column width */
748         cf_timestamp_auto_precision(&cfile);
749         new_packet_list_queue_draw();
750     }
751
752 }
753
754 static void
755 timestamp_precision_new_cb (GtkRadioAction *action, GtkRadioAction *current _U_, gpointer user_data _U_)
756 {
757     gint value;
758
759     value = gtk_radio_action_get_current_value (action);
760     g_warning("timestamp_precision_new_cb, value %u, recent.gui_time_precision %u",value, recent.gui_time_precision);
761     if (recent.gui_time_precision != value) {
762         /* the actual precision will be set in new_packet_list_queue_draw() below */
763         if (value == TS_PREC_AUTO) {
764             timestamp_set_precision(TS_PREC_AUTO_SEC);
765         } else {
766             timestamp_set_precision(value);
767         }
768         recent.gui_time_precision  = value;
769         /* This call adjusts column width */
770         cf_timestamp_auto_precision(&cfile);
771         new_packet_list_queue_draw();
772     }
773 }
774
775
776 static void
777 view_menu_seconds_time_cb(GtkAction *action _U_, gpointer user_data)
778 {
779         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes");
780         if (!widget){
781                 g_warning("view_menu_seconds_time_cb: No widget found");
782         }else{
783                 timestamp_seconds_time_cb(widget, user_data, 0);
784         }
785 }
786
787 static void
788 view_menu_en_for_MAC_cb(GtkAction *action _U_, gpointer user_data)
789 {
790         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforMACLayer");
791         if (!widget){
792                 g_warning("view_menu_en_for_MAC_cb: No widget found");
793         }else{
794                 name_resolution_cb( widget , user_data, RESOLV_MAC);
795         }
796 }
797
798 static void
799 view_menu_en_for_network_cb(GtkAction *action _U_, gpointer user_data)
800 {
801         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforNetworkLayer");
802         if (!widget){
803                 g_warning("view_menu_en_for_network_cb: No widget found");
804         }else{
805                 name_resolution_cb( widget , user_data, RESOLV_NETWORK);
806         }
807 }
808
809 static void
810 view_menu_en_for_transport_cb(GtkAction *action _U_, gpointer user_data)
811 {
812         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforTransportLayer");
813         if (!widget){
814                 g_warning("view_menu_en_for_transport_cb: No widget found");
815         }else{
816                 name_resolution_cb( widget , user_data, RESOLV_TRANSPORT);
817         }
818 }
819
820 static void
821 view_menu_colorize_pkt_lst_cb(GtkAction *action _U_, gpointer user_data)
822 {
823         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/ColorizePacketList");
824         if (!widget){
825                 g_warning("view_menu_colorize_pkt_lst_cb: No widget found");
826         }else{
827                 colorize_cb( widget , user_data);
828         }
829
830 }
831
832 #ifdef HAVE_LIBPCAP
833 static void
834 view_menu_auto_scroll_live_cb(GtkAction *action _U_, gpointer user_data _U_)
835 {
836         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/AutoScrollinLiveCapture");
837
838         if (!widget){
839                 g_warning("view_menu_auto_scroll_live_cb: No widget found");
840         }else{
841                 menu_auto_scroll_live_changed(GTK_CHECK_MENU_ITEM(widget)->active);
842         }
843 }
844 #endif
845
846 static void
847 view_menu_color_conv_color1_cb(GtkAction *action _U_, gpointer user_data)
848 {
849         colorize_conversation_cb( NULL /* widget _U_*/ , user_data, 1*256);
850 }
851
852 static void
853 view_menu_color_conv_color2_cb(GtkAction *action _U_, gpointer user_data)
854 {
855         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 2*256);
856 }
857
858 static void
859 view_menu_color_conv_color3_cb(GtkAction *action _U_, gpointer user_data)
860 {
861         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 3*256);
862 }
863
864 static void
865 view_menu_color_conv_color4_cb(GtkAction *action _U_, gpointer user_data)
866 {
867         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 4*256);
868 }
869
870 static void
871 view_menu_color_conv_color5_cb(GtkAction *action _U_, gpointer user_data)
872 {
873         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 5*256);
874 }
875
876 static void
877 view_menu_color_conv_color6_cb(GtkAction *action _U_, gpointer user_data)
878 {
879         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 6*256);
880 }
881
882 static void
883 view_menu_color_conv_color7_cb(GtkAction *action _U_, gpointer user_data)
884 {
885         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 7*256);
886 }
887
888 static void
889 view_menu_color_conv_color8_cb(GtkAction *action _U_, gpointer user_data)
890 {
891         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 8*256);
892 }
893
894 static void
895 view_menu_color_conv_color9_cb(GtkAction *action _U_, gpointer user_data)
896 {
897         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 9*256);
898 }
899
900 static void
901 view_menu_color_conv_color10_cb(GtkAction *action _U_, gpointer user_data)
902 {
903         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 10*256);
904 }
905
906 static void
907 view_menu_color_conv_new_rule_cb(GtkAction *action _U_, gpointer user_data)
908 {
909         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 0);
910 }
911
912 static void
913 view_menu_reset_coloring_cb(GtkAction *action _U_, gpointer user_data)
914 {
915         colorize_conversation_cb(  NULL /* widget _U_*/ , user_data, 255*256);
916 }
917
918 static void
919 help_menu_cont_cb(GtkAction *action _U_, gpointer user_data _U_)
920 {
921         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(HELP_CONTENT));
922 }
923
924 static void
925 help_menu_faq_cb(GtkAction *action _U_, gpointer user_data _U_)
926 {
927         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_FAQ));
928 }
929
930 static void
931 help_menu_wireshark_cb(GtkAction *action _U_, gpointer user_data _U_)
932 {
933         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_WIRESHARK));
934 }
935
936 static void
937 help_menu_wireshark_flt_cb(GtkAction *action _U_, gpointer user_data _U_)
938 {
939         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_WIRESHARK_FILTER));
940 }
941
942 static void
943 help_menu_Tshark_cb(GtkAction *action _U_, gpointer user_data _U_)
944 {
945         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_TSHARK));
946 }
947
948 static void
949 help_menu_RawShark_cb(GtkAction *action _U_, gpointer user_data _U_)
950 {
951         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_RAWSHARK));
952 }
953
954 static void
955 help_menu_Dumpcap_cb(GtkAction *action _U_, gpointer user_data _U_)
956 {
957         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_DUMPCAP));
958 }
959
960 static void
961 help_menu_Mergecap_cb(GtkAction *action _U_, gpointer user_data _U_)
962 {
963         topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_MERGECAP));
964 }
965
966 static void
967 help_menu_Editcap_cb(GtkAction *action _U_, gpointer user_data _U_)
968 {
969         topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_EDITCAP));
970 }
971
972 static void
973 help_menu_Text2pcap_cb(GtkAction *action _U_, gpointer user_data _U_)
974 {
975         topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_TEXT2PCAP));
976 }
977
978 static void
979 help_menu_Website_cb(GtkAction *action _U_, gpointer user_data _U_)
980 {
981         topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_HOME));
982 }
983
984 static void
985 help_menu_Wiki_cb(GtkAction *action _U_, gpointer user_data _U_)
986 {
987         topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_WIKI));
988 }
989
990 static void
991 help_menu_Downloads_cb(GtkAction *action _U_, gpointer user_data _U_)
992 {
993         topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_DOWNLOAD));
994 }
995
996 static void
997 help_menu_SampleCaptures_cb(GtkAction *action _U_, gpointer user_data _U_)
998 {
999         topic_menu_cb( NULL/* widget_U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_SAMPLE_FILES));
1000 }
1001
1002 static const char *ui_desc_menubar =
1003 "<ui>\n"
1004 "  <menubar name ='Menubar'>\n"
1005 "    <menu name= 'FileMenu' action='/File'>\n"
1006 "      <menuitem name='Open' action='/File/Open'/>\n"
1007 "      <menu name='OpenRecent' action='/File/OpenRecent'>\n"
1008 "         <placeholder name='RecentFiles'/>\n"
1009 "      </menu>\n"
1010 "      <menuitem name='Merge' action='/File/Merge'/>\n"
1011 "      <menuitem name='Import' action='/File/Import'/>\n"
1012 "      <menuitem name='Close' action='/File/Close'/>\n"
1013 "      <separator/>\n"
1014 "      <menuitem name='Save' action='/File/Save'/>\n"
1015 "      <menuitem name='SaveAs' action='/File/SaveAs'/>\n"
1016 "      <separator/>\n"
1017 "      <menu name= 'Set' action='/File/Set'>\n"
1018 "        <menuitem name='ListFiles' action='/File/Set/ListFiles'/>\n"
1019 "        <menuitem name='NextFile' action='/File/Set/NextFile'/>\n"
1020 "        <menuitem name='PreviousFile' action='/File/Set/PreviousFile'/>\n"
1021 "      </menu>\n"
1022 "      <separator/>\n"
1023 "      <menu name= 'Export' action='/File/Export'>\n"
1024 #if _WIN32
1025 "        <menuitem name='File' action='/File/Export/File'/>\n"
1026 #else
1027 "        <menu name= 'File' action='/File/Export/File'>\n"
1028 "          <menuitem name='AsTxt' action='/File/Export/File/Text'/>\n"
1029 "          <menuitem name='AsPostScript' action='/File/Export/File/PostScript'/>\n"
1030 "          <menuitem name='AsCSV' action='/File/Export/File/CSV'/>\n"
1031 "          <menuitem name='AsCArrays' action='/File/Export/File/CArrays'/>\n"
1032 "          <separator/>\n"
1033 "          <menuitem name='AsPSML' action='/File/Export/File/PSML'/>\n"
1034 "          <menuitem name='AsPDML' action='/File/Export/File/PDML'/>\n"
1035 "          <separator/>\n"
1036 "        </menu>\n"
1037 #endif /* _WIN32 */
1038 "      <menuitem name='SelectedPacketBytes' action='/File/Export/SelectedPacketBytes'/>\n"
1039 "        <menu name= 'Objects' action='/File/Export/Objects'>\n"
1040 "          <menuitem name='HTTP' action='/File/Export/Objects/HTTP'/>\n"
1041 "          <menuitem name='DICOM' action='/File/Export/Objects/DICOM'/>\n"
1042 "          <menuitem name='SMB' action='/File/Export/Objects/SMB'/>\n"
1043 "        </menu>\n"
1044 "      </menu>\n"
1045 "      <separator/>\n"
1046 "      <menuitem name='Print' action='/File/Print'/>\n"
1047 "      <separator/>\n"
1048 "        <menuitem name='Quit' action='/File/Quit'/>\n"
1049 "    </menu>\n"
1050 "    <menu name= 'EditMenu' action='/Edit'>\n"
1051 "        <menu name= 'Copy' action='/Edit/Copy'>\n"
1052 "          <menuitem name='Description' action='/Edit/Copy/Description'/>\n"
1053 "          <menuitem name='Fieldname' action='/Edit/Copy/Fieldname'/>\n"
1054 "          <menuitem name='Value' action='/Edit/Copy/Value'/>\n"
1055 "          <separator/>\n"
1056 "          <menuitem name='AsFilter' action='/Edit/Copy/AsFilter'/>\n"
1057 "        </menu>\n"
1058 "        <menuitem name='FindPacket' action='/Edit/FindPacket'/>\n"
1059 "        <menuitem name='FindNext' action='/Edit/FindNext'/>\n"
1060 "        <menuitem name='FindPrevious' action='/Edit/FindPrevious'/>\n"
1061 "        <separator/>\n"
1062 "        <menuitem name='MarkPacket' action='/Edit/MarkPacket'/>\n"
1063 "        <menuitem name='MarkAllDisplayedPackets' action='/Edit/MarkAllDisplayedPackets'/>\n"
1064 "        <menuitem name='UnmarkAllDisplayedPackets' action='/Edit/UnmarkAllDisplayedPackets'/>\n"
1065 "        <menuitem name='FindNextMark' action='/Edit/FindNextMark'/>\n"
1066 "        <menuitem name='FindPreviousMark' action='/Edit/FindPreviousMark'/>\n"
1067 "        <separator/>\n"
1068 "        <menuitem name='IgnorePacket' action='/Edit/IgnorePacket'/>\n"
1069 "        <menuitem name='IgnoreAllDisplayedPackets' action='/Edit/IgnoreAllDisplayedPackets'/>\n"
1070 "        <menuitem name='Un-IgnoreAllPackets' action='/Edit/Un-IgnoreAllPackets'/>\n"
1071 "        <separator/>\n"
1072 "        <menuitem name='SetTimeReference' action='/Edit/SetTimeReference'/>\n"
1073 "        <menuitem name='Un-TimeReferenceAllPackets' action='/Edit/Un-TimeReferenceAllPackets'/>\n"
1074 "        <menuitem name='FindNextTimeReference' action='/Edit/FindNextTimeReference'/>\n"
1075 "        <menuitem name='FindPreviousTimeReference' action='/Edit/FindPreviousTimeReference'/>\n"
1076 "        <separator/>\n"
1077 #ifdef WANT_PACKET_EDITOR
1078 "        <menuitem name='EditPacket' action='/Edit/EditPacket'/>\n"
1079 "        <separator/>\n"
1080 #endif
1081 "        <menuitem name='ConfigurationProfiles' action='/Edit/ConfigurationProfiles'/>\n"
1082 "        <menuitem name='Preferences' action='/Edit/Preferences'/>\n"
1083 "    </menu>\n"
1084 "    <menu name= 'ViewMenu' action='/View'>\n"
1085 "      <menuitem name='MainToolbar' action='/View/MainToolbar'/>\n"
1086 "      <menuitem name='FilterToolbar' action='/View/FilterToolbar'/>\n"
1087 #ifdef HAVE_AIRPCAP
1088 "      <menuitem name='WirelessToolbar' action='/View/WirelessToolbar'/>\n"
1089 #endif
1090 "      <menuitem name='Statusbar' action='/View/Statusbar'/>\n"
1091 "      <separator/>\n"
1092 "      <menuitem name='PacketList' action='/View/PacketList'/>\n"
1093 "      <menuitem name='PacketDetails' action='/View/PacketDetails'/>\n"
1094 "      <menuitem name='PacketBytes' action='/View/PacketBytes'/>\n"
1095 "      <separator/>\n"
1096 "      <menu name= 'TimeDisplayFormat' action='/View/TimeDisplayFormat'>\n"
1097 "        <menuitem name='DateandTimeofDay' action='/View/TimeDisplayFormat/DateandTimeofDay'/>\n"
1098 "        <menuitem name='TimeofDay' action='/View/TimeDisplayFormat/TimeofDay'/>\n"
1099 "        <menuitem name='SecondsSinceEpoch' action='/View/TimeDisplayFormat/SecondsSinceEpoch'/>\n"
1100 "        <menuitem name='SecondsSinceBeginningofCapture' action='/View/TimeDisplayFormat/SecondsSinceBeginningofCapture'/>\n"
1101 "        <menuitem name='SecondsSincePreviousCapturedPacket' action='/View/TimeDisplayFormat/SecondsSincePreviousCapturedPacket'/>\n"
1102 "        <menuitem name='SecondsSincePreviousDisplayedPacket' action='/View/TimeDisplayFormat/SecondsSincePreviousDisplayedPacket'/>\n"
1103 "        <separator/>\n"
1104 "        <menuitem name='FileFormatPrecision-Automatic' action='/View/TimeDisplayFormat/FileFormatPrecision-Automatic'/>\n"
1105 "        <menuitem name='FileFormatPrecision-Seconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Seconds'/>\n"
1106 "        <menuitem name='FileFormatPrecision-Deciseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Deciseconds'/>\n"
1107 "        <menuitem name='FileFormatPrecision-Centiseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Centiseconds'/>\n"
1108 "        <menuitem name='FileFormatPrecision-Milliseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Milliseconds'/>\n"
1109 "        <menuitem name='FileFormatPrecision-Microseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Microseconds'/>\n"
1110 "        <menuitem name='FileFormatPrecision-Nanoseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Nanoseconds'/>\n"
1111 "        <separator/>\n"
1112 "        <menuitem name='DisplaySecondsWithHoursAndMinutes' action='/View/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes'/>\n"
1113 "      </menu>\n"
1114 "      <menu name= 'NameResolution' action='/View/NameResolution'>\n"
1115 "         <menuitem name='ResolveName' action='/View/NameResolution/ResolveName'/>\n"
1116 "         <separator/>\n"
1117 "         <menuitem name='EnableforMACLayer' action='/View/NameResolution/EnableforMACLayer'/>\n"
1118 "         <menuitem name='EnableforNetworkLayer' action='/View/NameResolution/EnableforNetworkLayer'/>\n"
1119 "         <menuitem name='EnableforTransportLayer' action='/View/NameResolution/EnableforTransportLayer'/>\n"
1120 "      </menu>\n"
1121 "      <menuitem name='ColorizePacketList' action='/View/ColorizePacketList'/>\n"
1122 "      <menuitem name='AutoScrollinLiveCapture' action='/View/AutoScrollinLiveCapture'/>\n"
1123 "      <separator/>\n"
1124 "      <menuitem name='ZoomIn' action='/View/ZoomIn'/>\n"
1125 "      <menuitem name='ZoomOut' action='/View/ZoomOut'/>\n"
1126 "      <menuitem name='NormalSize' action='/View/NormalSize'/>\n"
1127 "      <separator/>\n"
1128 "      <menuitem name='ResizeAllColumns' action='/View/ResizeAllColumns'/>\n"
1129 "      <menuitem name='DisplayedColumns' action='/View/DisplayedColumns'/>\n"
1130 "      <separator/>\n"
1131 "      <menuitem name='ExpandSubtrees' action='/View/ExpandSubtrees'/>\n"
1132 "      <menuitem name='ExpandAll' action='/View/ExpandAll'/>\n"
1133 "      <menuitem name='CollapseAll' action='/View/CollapseAll'/>\n"
1134 "      <separator/>\n"
1135 "      <menu name= 'ColorizeConversation' action='/View/ColorizeConversation'>\n"
1136 "         <menuitem name='Color1' action='/View/ColorizeConversation/Color 1'/>\n"
1137 "         <menuitem name='Color2' action='/View/ColorizeConversation/Color 2'/>\n"
1138 "         <menuitem name='Color3' action='/View/ColorizeConversation/Color 3'/>\n"
1139 "         <menuitem name='Color4' action='/View/ColorizeConversation/Color 4'/>\n"
1140 "         <menuitem name='Color5' action='/View/ColorizeConversation/Color 5'/>\n"
1141 "         <menuitem name='Color6' action='/View/ColorizeConversation/Color 6'/>\n"
1142 "         <menuitem name='Color7' action='/View/ColorizeConversation/Color 7'/>\n"
1143 "         <menuitem name='Color8' action='/View/ColorizeConversation/Color 8'/>\n"
1144 "         <menuitem name='Color9' action='/View/ColorizeConversation/Color 9'/>\n"
1145 "         <menuitem name='Color10' action='/View/ColorizeConversation/Color 10'/>\n"
1146 "         <menuitem name='NewColoringRule' action='/View/ColorizeConversation/NewColoringRule'/>\n"
1147 "      </menu>\n"
1148 "      <separator/>\n"
1149 "      <menuitem name='ResetColoring1-10' action='/View/ResetColoring1-10'/>\n"
1150 "      <menuitem name='ColoringRules' action='/View/ColoringRules'/>\n"
1151 "      <separator/>\n"
1152 "      <menuitem name='ShowPacketinNewWindow' action='/View/ShowPacketinNewWindow'/>\n"
1153 "      <menuitem name='Reload' action='/View/Reload'/>\n"
1154 "    </menu>\n"
1155 "    <menu name= 'GoMenu' action='/Go'>\n"
1156 "      <menuitem name='Back' action='/Go/Back'/>\n"
1157 "      <menuitem name='Forward' action='/Go/Forward'/>\n"
1158 "      <menuitem name='Goto' action='/Go/Goto'/>\n"
1159 "      <menuitem name='GotoCorrespondingPacket' action='/Go/GotoCorrespondingPacket'/>\n"
1160 "      <separator/>\n"
1161 "      <menuitem name='PreviousPacket' action='/Go/PreviousPacket'/>\n"
1162 "      <menuitem name='NextPacket' action='/Go/NextPacket'/>\n"
1163 "      <menuitem name='FirstPacket' action='/Go/FirstPacket'/>\n"
1164 "      <menuitem name='LastPacket' action='/Go/LastPacket'/>\n"
1165 "      <menuitem name='PreviousPacketInConversation' action='/Go/PreviousPacketInConversation'/>\n"
1166 "      <menuitem name='NextPacketInConversation' action='/Go/NextPacketInConversation'/>\n"
1167 "    </menu>\n"
1168 #ifdef HAVE_LIBPCAP
1169 "    <menu name= 'CaptureMenu' action='/Capture'>\n"
1170 "      <menuitem name='Interfaces' action='/Capture/Interfaces'/>\n"
1171 "      <menuitem name='Options' action='/Capture/Options'/>\n"
1172 "      <menuitem name='Start' action='/Capture/Start'/>\n"
1173 "      <menuitem name='Stop' action='/Capture/Stop'/>\n"
1174 "      <menuitem name='Restart' action='/Capture/Restart'/>\n"
1175 "      <menuitem name='CaptureFilters' action='/Capture/CaptureFilters'/>\n"
1176 "    </menu>\n"
1177 #endif /* HAVE_LIBPCAP */
1178 "    <menu name= 'AnalyzeMenu' action='/Analyze'>\n"
1179 "      <menuitem name='DisplayFilters' action='/Analyze/DisplayFilters'/>\n"
1180 "      <menuitem name='DisplayFilterMacros' action='/Analyze/DisplayFilterMacros'/>\n"
1181 "      <separator/>\n"
1182 "      <menuitem name='ApplyasColumn' action='/Analyze/ApplyasColumn'/>\n"
1183 "      <menu name= 'ApplyAsFilter' action='/Analyze/ApplyasFilter'>\n"
1184 "        <menuitem name='Selected' action='/Analyze/ApplyasFilter/Selected'/>\n"
1185 "        <menuitem name='NotSelected' action='/Analyze/ApplyasFilter/NotSelected'/>\n"
1186 "        <menuitem name='AndSelected' action='/Analyze/ApplyasFilter/AndSelected'/>\n"
1187 "        <menuitem name='OrSelected' action='/Analyze/ApplyasFilter/OrSelected'/>\n"
1188 "        <menuitem name='AndNotSelected' action='/Analyze/ApplyasFilter/AndNotSelected'/>\n"
1189 "        <menuitem name='OrNotSelected' action='/Analyze/ApplyasFilter/OrNotSelected'/>\n"
1190 "      </menu>\n"
1191 "      <menu name= 'PrepareaFilter' action='/Analyze/PrepareaFilter'>\n"
1192 "        <menuitem name='Selected' action='/Analyze/PrepareaFilter/Selected'/>\n"
1193 "        <menuitem name='NotSelected' action='/Analyze/PrepareaFilter/NotSelected'/>\n"
1194 "        <menuitem name='AndSelected' action='/Analyze/PrepareaFilter/AndSelected'/>\n"
1195 "        <menuitem name='OrSelected' action='/Analyze/PrepareaFilter/OrSelected'/>\n"
1196 "        <menuitem name='AndNotSelected' action='/Analyze/PrepareaFilter/AndNotSelected'/>\n"
1197 "        <menuitem name='OrNotSelected' action='/Analyze/PrepareaFilter/OrNotSelected'/>\n"
1198 "      </menu>\n"
1199 "      <separator/>\n"
1200 "      <menuitem name='EnabledProtocols' action='/Analyze/EnabledProtocols'/>\n"
1201 "      <menuitem name='DecodeAs' action='/Analyze/DecodeAs'/>\n"
1202 "      <menuitem name='UserSpecifiedDecodes' action='/Analyze/UserSpecifiedDecodes'/>\n"
1203 "      <separator/>\n"
1204 "      <menuitem name='FollowTCPStream' action='/Analyze/FollowTCPStream'/>\n"
1205 "      <menuitem name='FollowUDPStream' action='/Analyze/FollowUDPStream'/>\n"
1206 "      <menuitem name='FollowSSLStream' action='/Analyze/FollowSSLStream'/>\n"
1207 "      <menuitem name='ExpertInfoComposite' action='/Analyze/ExpertInfoComposite'/>\n"
1208 "      <menu name= 'ConversationFilterMenu' action='/Analyze/ConversationFilter'>\n"
1209 "        <placeholder name='Filters'/>\n"
1210 "      </menu>\n"
1211 "    </menu>\n"
1212 "    <menu name= 'StatisticsMenu' action='/Statistics'>\n"
1213 "      <menuitem name='Summary' action='/Statistics/Summary'/>\n"
1214 "      <menuitem name='ProtocolHierarchy' action='/Statistics/ProtocolHierarchy'/>\n"
1215 "      <menuitem name='Conversations' action='/Statistics/Conversations'/>\n"
1216 "      <menuitem name='Endpoints' action='/Statistics/Endpoints'/>\n"
1217 "      <menuitem name='IOGraphs' action='/Statistics/IOGraphs'/>\n"
1218 "      <separator/>\n"
1219 "      <menu name= 'ConversationListMenu' action='/Analyze/ConversationList'>\n"
1220 "        <menuitem name='Ethernet' action='/Analyze/ConversationList/Ethernet'/>\n"
1221 "        <menuitem name='FibreChannel' action='/Analyze/ConversationList/FibreChannel'/>\n"
1222 "        <menuitem name='FDDI' action='/Analyze/ConversationList/FDDI'/>\n"
1223 "        <menuitem name='IP' action='/Analyze/ConversationList/IP'/>\n"
1224 "        <menuitem name='IPv6' action='/Analyze/ConversationList/IPv6'/>\n"
1225 "        <menuitem name='JXTA' action='/Analyze/ConversationList/JXTA'/>\n"
1226 "        <menuitem name='NCP' action='/Analyze/ConversationList/NCP'/>\n"
1227 "        <menuitem name='RSVP' action='/Analyze/ConversationList/RSVP'/>\n"
1228 "        <menuitem name='SCTP' action='/Analyze/ConversationList/SCTP'/>\n"
1229 "        <menuitem name='TCPIP' action='/Analyze/ConversationList/TCPIP'/>\n"
1230 "        <menuitem name='TR' action='/Analyze/ConversationList/TR'/>\n"
1231 "        <menuitem name='UDPIP' action='/Analyze/ConversationList/UDPIP'/>\n"
1232 "        <menuitem name='USB' action='/Analyze/ConversationList/USB'/>\n"
1233 "        <menuitem name='WLAN' action='/Analyze/ConversationList/WLAN'/>\n"
1234 "      </menu>\n"
1235 "      <menu name= 'EndpointListMenu' action='/Analyze/EndpointList'>\n"
1236 "        <menuitem name='Ethernet' action='/Analyze/EndpointList/Ethernet'/>\n"
1237 "        <menuitem name='FibreChannel' action='/Analyze/EndpointList/FibreChannel'/>\n"
1238 "        <menuitem name='FDDI' action='/Analyze/EndpointList/FDDI'/>\n"
1239 "        <menuitem name='IP' action='/Analyze/EndpointList/IP'/>\n"
1240 "        <menuitem name='IPv6' action='/Analyze/EndpointList/IPv6'/>\n"
1241 "        <menuitem name='JXTA' action='/Analyze/EndpointList/JXTA'/>\n"
1242 "        <menuitem name='RSVP' action='/Analyze/EndpointList/RSVP'/>\n"
1243 "        <menuitem name='SCTP' action='/Analyze/ConversationList/SCTP'/>\n"
1244 "        <menuitem name='TCPIP' action='/Analyze/ConversationList/TCPIP'/>\n"
1245 "        <menuitem name='TR' action='/Analyze/ConversationList/TR'/>\n"
1246 "        <menuitem name='UDPIP' action='/Analyze/ConversationList/UDPIP'/>\n"
1247 "        <menuitem name='USB' action='/Analyze/ConversationList/USB'/>\n"
1248 "        <menuitem name='WLAN' action='/Analyze/ConversationList/WLAN'/>\n"
1249 "      </menu>\n"
1250 "      <menu name= 'ServiceResponseTimeMenu' action='/Analyze/ServiceResponseTime'>\n"
1251 "        <menuitem name='ONC-RPC' action='/Analyze/ServiceResponseTime/ONC-RPC'/>\n"
1252 "      </menu>\n"
1253 "      <separator/>\n"
1254 "      <placeholder name='ANCP'/>\n"
1255 "      <menu name= 'BACnetMenu' action='/Analyze/BACnet'>\n"
1256 "        <placeholder name='BACnet-List-item'/>\n"
1257 "      </menu>\n"
1258 "      <menuitem name='FlowGraph' action='/Analyze/StatisticsMenu/FlowGraph'/>\n"
1259 "      <menu name= 'HTTPMenu' action='/Analyze/StatisticsMenu/HTTP'>\n"
1260 "        <placeholder name='HTTP-List-item'/>\n"
1261 "      </menu>\n"
1262 "      <menu name= 'TCPStreamGraphMenu' action='/Analyze/StatisticsMenu/TCPStreamGraphMenu'>\n"
1263 "        <menuitem name='Sequence-Graph-Stevens' action='/Analyze/StatisticsMenu/TCPStreamGraphMenu/Time-Sequence-Graph-Stevens'/>\n"
1264 "        <menuitem name='Sequence-Graph-tcptrace' action='/Analyze/StatisticsMenu/TCPStreamGraphMenu/Time-Sequence-Graph-tcptrace'/>\n"
1265 "        <menuitem name='Throughput-Graph' action='/Analyze/StatisticsMenu/TCPStreamGraphMenu/Throughput-Graph'/>\n"
1266 "        <menuitem name='RTT-Graph' action='/Analyze/StatisticsMenu/TCPStreamGraphMenu/RTT-Graph'/>\n"
1267 "        <menuitem name='Window-Scaling-Graph' action='/Analyze/StatisticsMenu/TCPStreamGraphMenu/Window-Scaling-Graph'/>\n"
1268 "      </menu>\n"
1269 "      <menuitem name='ONC-RPC-Programs' action='/Analyze/StatisticsMenu/ONC-RPC-Programs'/>\n"
1270 "      <menuitem name='UDPMulticastStreams' action='/Analyze/StatisticsMenu/UDPMulticastStreams'/>\n"
1271 "      <menuitem name='WLANTraffic' action='/Analyze/StatisticsMenu/WLANTraffic'/>\n"
1272 "    </menu>\n"
1273 "    <menu name= 'TelephonyMenu' action='/Telephony'>\n"
1274 "      <menu name= 'ANSI' action='/Telephony/ANSI'>\n"
1275 "        <menuitem name='BSMAP' action='/Telephony/ANSI/BSMAP'/>\n"
1276 "        <menuitem name='DTAP' action='/Telephony/ANSI/DTAP'/>\n"
1277 "        <menuitem name='MAP-OP' action='/Telephony/ANSI/MAP-OP'/>\n"
1278 "      </menu>\n"
1279 "      <menu name= 'GSM' action='/Telephony/GSM'>\n"
1280 "        <menuitem name='BSSMAP' action='/Telephony/GSM/BSSMAP'/>\n"
1281 "        <menu name='GSM-DTAP' action='/Telephony/GSM/DTAP'>\n"
1282 "          <menuitem name='CallControl' action='/Telephony/GSM/DTAP/CC'/>\n"
1283 "          <menuitem name='GPRS-MM' action='/Telephony/GSM/DTAP/GMM'/>\n"
1284 "          <menuitem name='GPRS-SM' action='/Telephony/GSM/DTAP/SM'/>\n"
1285 "          <menuitem name='MM' action='/Telephony/GSM/DTAP/MM'/>\n"
1286 "          <menuitem name='RR' action='/Telephony/GSM/DTAP/RR'/>\n"
1287 "          <menuitem name='SMS' action='/Telephony/GSM/DTAP/SMS'/>\n"
1288 "          <menuitem name='TP' action='/Telephony/GSM/DTAP/TP'/>\n"
1289 "          <menuitem name='SS' action='/Telephony/GSM/DTAP/SS'/>\n"
1290 "        </menu>\n"
1291 "        <menuitem name='SACCH' action='/Telephony/GSM/SACCH'/>\n"
1292 "        <menuitem name='MAP-OP' action='/Telephony/GSM/MAP-OP'/>\n"
1293 "        <menuitem name='MAP-Summary' action='/Telephony/GSM/MAPSummary'/>\n"
1294 "      </menu>\n"
1295 "      <menu name= 'IAX2menu' action='/Telephony/IAX2'>\n"
1296 "        <menuitem name='StreamAnalysis' action='/Telephony/IAX2/StreamAnalysis'/>\n"
1297 "      </menu>\n"
1298 "       <menuitem name='VoIPCalls' action='/Telephony/VoIPCalls'/>\n"
1299 "    </menu>\n"
1300 "    <menu name= 'ToolsMenu' action='/Tools'>\n"
1301 "      <menuitem name='FirewallACLRules' action='/Tools/FirewallACLRules'/>\n"
1302 "    </menu>\n"
1303 "    <menu name= 'InternalsMenu' action='/Internals'>\n"
1304 "      <menuitem name='Dissectortables' action='/Internals/Dissectortables'/>\n"
1305 "      <menuitem name='SupportedProtocols' action='/Internals/SupportedProtocols'/>\n"
1306 "    </menu>\n"
1307 "    <menu name= 'HelpMenu' action='/Help'>\n"
1308 "      <menuitem name='Contents' action='/Help/Contents'/>\n"
1309 "      <menu name= 'ManualPages' action='/Help/ManualPages'>\n"
1310 "        <menuitem name='Wireshark' action='/Help/ManualPages/Wireshark'/>\n"
1311 "        <menuitem name='WiresharkFilter' action='/Help/ManualPages/WiresharkFilter'/>\n"
1312 "        <separator/>\n"
1313 "        <menuitem name='TShark' action='/Help/ManualPages/TShark'/>\n"
1314 "        <menuitem name='RawShark' action='/Help/ManualPages/RawShark'/>\n"
1315 "        <menuitem name='Dumpcap' action='/Help/ManualPages/Dumpcap'/>\n"
1316 "        <menuitem name='Mergecap' action='/Help/ManualPages/Mergecap'/>\n"
1317 "        <menuitem name='Editcap' action='/Help/ManualPages/Editcap'/>\n"
1318 "        <menuitem name='Text2pcap' action='/Help/ManualPages/Text2pcap'/>\n"
1319 "      </menu>\n"
1320 "      <separator/>\n"
1321 "      <menuitem name='Website' action='/Help/Website'/>\n"
1322 "      <menuitem name='FAQs' action='/Help/FAQs'/>\n"
1323 "      <menuitem name='Downloads' action='/Help/Downloads'/>\n"
1324 "      <separator/>\n"
1325 "      <menuitem name='Wiki' action='/Help/Wiki'/>\n"
1326 "      <menuitem name='SampleCaptures' action='/Help/SampleCaptures'/>\n"
1327 "      <separator/>\n"
1328 "      <menuitem name='AboutWireshark' action='/Help/AboutWireshark'/>\n"
1329 "    </menu>\n"
1330 "  </menubar>\n"
1331 "</ui>\n";
1332
1333
1334 /*
1335  * Main menu.
1336  *
1337  * Please do not use keystrokes that are used as "universal" shortcuts in
1338  * various desktop environments:
1339  *
1340  *   Windows:
1341  *      http://support.microsoft.com/kb/126449
1342  *
1343  *   GNOME:
1344  *      http://library.gnome.org/users/user-guide/nightly/keyboard-skills.html.en
1345  *
1346  *   KDE:
1347  *      http://developer.kde.org/documentation/standards/kde/style/keys/shortcuts.html
1348  *
1349  * In particular, do not use the following <control> sequences for anything
1350  * other than their standard purposes:
1351  *
1352  *      <control>O      File->Open
1353  *      <control>S      File->Save
1354  *      <control>P      File->Print
1355  *      <control>W      File->Close
1356  *      <control>Q      File->Quit
1357  *      <control>Z      Edit->Undo (which we don't currently have)
1358  *      <control>X      Edit->Cut (which we don't currently have)
1359  *      <control>C      Edit->Copy (which we don't currently have)
1360  *      <control>V      Edit->Paste (which we don't currently have)
1361  *      <control>A      Edit->Select All (which we don't currently have)
1362  *
1363  * Note that some if not all of the Edit keys above already perform those
1364  * functions in text boxes, such as the Filter box.  Do no, under any
1365  * circumstances, make a change that keeps them from doing so.
1366  */
1367
1368 /*
1369  * GtkActionEntry
1370  * typedef struct {
1371  *   const gchar     *name;
1372  *   const gchar     *stock_id;
1373  *   const gchar     *label;
1374  *   const gchar     *accelerator;
1375  *   const gchar     *tooltip;
1376  *   GCallback  callback;
1377  * } GtkActionEntry;
1378  * const gchar *name;                   The name of the action.
1379  * const gchar *stock_id;               The stock id for the action, or the name of an icon from the icon theme.
1380  * const gchar *label;                  The label for the action. This field should typically be marked for translation,
1381  *                                                              see gtk_action_group_set_translation_domain().
1382  *                                                              If label is NULL, the label of the stock item with id stock_id is used.
1383  * const gchar *accelerator;    The accelerator for the action, in the format understood by gtk_accelerator_parse().
1384  * const gchar *tooltip;                The tooltip for the action. This field should typically be marked for translation,
1385  *                              see gtk_action_group_set_translation_domain().
1386  * GCallback callback;                  The function to call when the action is activated.
1387  *
1388  */
1389 static const GtkActionEntry main_menu_bar_entries[] = {
1390   /* Top level */
1391   { "/File",                                    NULL,                                                   "_File",                        NULL,                                   NULL,                   NULL },
1392   { "/Edit",                                    NULL,                                                   "_Edit",                        NULL,                                   NULL,                   NULL },
1393   { "/View",                                    NULL,                                                   "_View",                        NULL,                                   NULL,                   NULL },
1394   { "/Go",                                              NULL,                                                   "_Go",                          NULL,                                   NULL,                   NULL },
1395 #ifdef HAVE_LIBPCAP
1396   { "/Capture",                                 NULL,                                                   "_Capture",                     NULL,                                   NULL,                   NULL },
1397 #endif
1398   { "/Analyze",                                 NULL,                                                   "_Analyze",                     NULL,                                   NULL,                   NULL },
1399   { "/Statistics",                              NULL,                                                   "_Statistics",          NULL,                                   NULL,                   NULL },
1400   { "/Telephony",                               NULL,                                                   "Telephon_y",           NULL,                                   NULL,                   NULL },
1401   { "/Tools",                                   NULL,                                                   "_Tools",                       NULL,                                   NULL,                   NULL },
1402   { "/Internals",                               NULL,                                                   "_Internals",           NULL,                                   NULL,                   NULL },
1403   { "/Help",                                    NULL,                                                   "_Help",                        NULL,                                   NULL,                   NULL },
1404
1405   { "/File/Open",                               GTK_STOCK_OPEN,                                 "_Open...",                     "<control>O",                   "Open a file",  G_CALLBACK(file_open_cmd_cb) },
1406   { "/File/OpenRecent",                 NULL,                                                   "Open _Recent",         NULL,                                   NULL,                   NULL },
1407   { "/File/Merge",                              NULL,                                                   "_Merge...",            NULL,                                   NULL,                   G_CALLBACK(file_merge_cmd_cb) },
1408   { "/File/Import",                             NULL,                                                   "_Import...",           NULL,                                   NULL,                   G_CALLBACK(file_import_cmd_cb) },
1409   { "/File/Close",                              GTK_STOCK_CLOSE,                                "_Close",                       "<control>W",                   NULL,                   G_CALLBACK(file_close_cmd_cb) },
1410
1411   { "/File/Save",                               GTK_STOCK_SAVE,                                 "_Save",                        "<control>S",                   NULL,                   G_CALLBACK(file_save_cmd_cb) },
1412   { "/File/SaveAs",                             GTK_STOCK_SAVE_AS,                              "Save _As...",          "<shift><control>S",    NULL,                   G_CALLBACK(file_save_as_cmd_cb) },
1413
1414   { "/File/Set",                                NULL,                                                   "File Set",                     NULL,                                   NULL,                   NULL },
1415   { "/File/Export",                             NULL,                                                   "Export",                       NULL,                                   NULL,                   NULL },
1416   { "/File/Print",                              GTK_STOCK_PRINT,                                "_Print...",            "<control>P",                   NULL,                   G_CALLBACK(file_print_cmd_cb) },
1417   { "/File/Quit",                               GTK_STOCK_QUIT,                                 "_Quit",                        "<control>Q",                   NULL,                   G_CALLBACK(file_quit_cmd_cb) },
1418
1419   { "/File/Set/ListFiles",      WIRESHARK_STOCK_FILE_SET_LIST,  "List Files",           NULL,                                   NULL,                   G_CALLBACK(fileset_cb) },
1420   { "/File/Set/NextFile",       WIRESHARK_STOCK_FILE_SET_NEXT,  "Next File",            NULL,                                   NULL,                   G_CALLBACK(fileset_next_cb) },
1421   { "/File/Set/PreviousFile",WIRESHARK_STOCK_FILE_SET_PREVIOUS, "Previous File",        NULL,                           NULL,                   G_CALLBACK(fileset_previous_cb) },
1422
1423 #if _WIN32
1424   { "/File/Export/File",                                NULL,           "File...",                                              NULL,                                   NULL,                   G_CALLBACK(export_text_cmd_cb) },
1425 #else
1426   { "/File/Export/File",                                NULL,           "File...",                                              NULL,                                   NULL,                   NULL },
1427   { "/File/Export/File/Text",                   NULL,           "as \"Plain _Text\" file...",   NULL,                                   NULL,                   G_CALLBACK(export_text_cmd_cb) },
1428   { "/File/Export/File/PostScript",             NULL,           "as \"_PostScript\" file...",   NULL,                                   NULL,                   G_CALLBACK(export_ps_cmd_cb) },
1429   { "/File/Export/File/CSV",                    NULL,           "as \"_CSV\" (Comma Separated Values packet summary) file...",
1430                                                                                                                                                                         NULL,                                   NULL,                   G_CALLBACK(export_csv_cmd_cb) },
1431   { "/File/Export/File/CArrays",                NULL,           "as \"C _Arrays\" (packet bytes) file...",
1432                                                                                                                                                                         NULL,                                   NULL,                   G_CALLBACK(export_carrays_cmd_cb) },
1433   { "/File/Export/File/PSML",                   NULL,           "as XML - \"P_SML\" (packet summary) file...",
1434                                                                                                                                                                         NULL,                                   NULL,                   G_CALLBACK(export_psml_cmd_cb) },
1435   { "/File/Export/File/PDML",                   NULL,           "as XML - \"P_DML\" (packet details) file...",
1436                                                                                                                                                                         NULL,                                   NULL,                   G_CALLBACK(export_pdml_cmd_cb) },
1437 #endif /* _WIN32 */
1438   { "/File/Export/SelectedPacketBytes", NULL,           "Selected Packet _Bytes...",    "<control>H",                   NULL,                   G_CALLBACK(savehex_cb) },
1439   { "/File/Export/SslSessionKeys",      NULL,           "SSL Session Keys...",  NULL,                   NULL,                   G_CALLBACK(savesslkeys_cb) },
1440   { "/File/Export/Objects",                             NULL,           "Objects",                                              NULL,                                   NULL,                   NULL },
1441   { "/File/Export/Objects/HTTP",                NULL,           "_HTTP",                                                NULL,                                   NULL,                   G_CALLBACK(eo_http_cb) },
1442   { "/File/Export/Objects/DICOM",               NULL,           "_DICOM",                                               NULL,                                   NULL,                   G_CALLBACK(eo_dicom_cb) },
1443   { "/File/Export/Objects/SMB",                 NULL,           "_SMB",                                                 NULL,                                   NULL,                   G_CALLBACK(eo_smb_cb) },
1444
1445
1446   { "/Edit/Copy",                                               NULL,           "Copy",                                                 NULL,                                   NULL,                   NULL },
1447
1448   { "/Edit/Copy/Description",                   NULL,           "Description",                                  "<shift><control>D",    NULL,                   G_CALLBACK(copy_description_cb) },
1449   { "/Edit/Copy/Fieldname",                             NULL,           "Fieldname",                                    "<shift><control>F",    NULL,                   G_CALLBACK(copy_fieldname_cb) },
1450   { "/Edit/Copy/Value",                                 NULL,           "Value",                                                "<shift><control>V",    NULL,                   G_CALLBACK(copy_value_cb) },
1451   { "/Edit/Copy/AsFilter",                              NULL,           "As Filter",                                    "<shift><control>C",    NULL,                   G_CALLBACK(copy_as_filter_cb) },
1452
1453 #if 0
1454     /*
1455      * Un-#if this when we actually implement Cut/Copy/Paste for the
1456      * packet list and packet detail windows.
1457      *
1458      * Note: when we implement Cut/Copy/Paste in those windows, we
1459      * will almost certainly want to allow multiple packets to be
1460      * selected in the packet list pane and multiple packet detail
1461      * items to be selected in the packet detail pane, so that
1462      * the user can, for example, copy the summaries of multiple
1463      * packets to the clipboard from the packet list pane and multiple
1464      * packet detail items - perhaps *all* packet detail items - from
1465      * the packet detail pane.  Given that, we'll also want to
1466      * implement Select All.
1467      *
1468      * If multiple packets are selected, we would probably display nothing
1469      * in the packet detail pane, just as we do if no packet is selected,
1470      * and any menu items etc. that would pertain only to a single packet
1471      * would be disabled.
1472      *
1473      * If multiple packet detail items are selected, we would probably
1474      * disable all items that pertain only to a single packet detail
1475      * item, such as some items in the status bar.
1476      *
1477      * XXX - the actions for these will be different depending on what
1478      * widget we're in; ^C should copy from the filter text widget if
1479      * we're in that widget, the packet list if we're in that widget
1480      * (presumably copying the summaries of selected packets to the
1481      * clipboard, e.g. the text copy would be the text of the columns),
1482      * the packet detail if we're in that widget (presumably copying
1483      * the contents of selected protocol tree items to the clipboard,
1484      * e.g. the text copy would be the text displayed for those items),
1485      * etc..
1486      *
1487      * Given that those menu items should also affect text widgets
1488      * such as the filter box, we would again want Select All, and,
1489      * at least for the filter box, we would also want Undo and Redo.
1490      * We would only want Cut, Paste, Undo, and Redo for the packet
1491      * list and packet detail panes if we support modifying them.
1492      */
1493     {"/Edit/_Undo", "<control>Z", NULL,
1494                              0, "<StockItem>", GTK_STOCK_UNDO,},
1495     {"/Edit/_Redo", "<shift><control>Z", NULL,
1496                              0, "<StockItem>", GTK_STOCK_REDO,},
1497     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1498     {"/Edit/Cu_t", "<control>X", NULL,
1499                              0, "<StockItem>", GTK_STOCK_CUT,},
1500     {"/Edit/_Copy", "<control>C", NULL,
1501                              0, "<StockItem>", GTK_STOCK_COPY,},
1502     {"/Edit/_Paste", "<control>V", NULL,
1503                              0, "<StockItem>", GTK_STOCK_PASTE,},
1504     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1505     {"/Edit/Select _All", "<control>A", NULL, 0,
1506 #ifdef GTK_STOCK_SELECT_ALL     /* first appeared in 2.10 */
1507                              "<StockItem>", GTK_STOCK_SELECT_ALL,
1508 #else
1509                              NULL, NULL,
1510 #endif /* GTK_STOCK_SELECT_ALL */
1511 #endif /* 0 */
1512    { "/Edit/FindPacket",                                GTK_STOCK_FIND,         "_Find Packet...",                                              "<control>F",                   NULL,                   G_CALLBACK(find_frame_cb) },
1513    { "/Edit/FindNext",                                  NULL,                           "Find Ne_xt",                                                   "<control>N",                   NULL,                   G_CALLBACK(find_next_cb) },
1514    { "/Edit/FindPrevious",                              NULL,                           "Find Pre_vious",                                               "<control>B",                   NULL,                   G_CALLBACK(find_previous_cb) },
1515
1516    { "/Edit/MarkPacket",                                NULL,                           "_Mark Packet (toggle)",                                "<control>M",                   NULL,                   G_CALLBACK(new_packet_list_mark_frame_cb) },
1517    { "/Edit/ToggleMarkingOfAllDisplayedPackets",        NULL,   "Toggle Marking Of All Displayed Packets",      "<shift><alt><control>M",                       NULL,                   G_CALLBACK(new_packet_list_toggle_mark_all_displayed_frames_cb) },
1518    { "/Edit/MarkAllDisplayedPackets",   NULL,                           "Mark All Displayed Packets",                   "<shift><control>M",    NULL,                   G_CALLBACK(new_packet_list_mark_all_displayed_frames_cb) },
1519    { "/Edit/UnmarkAllDisplayedPackets", NULL,                           "_Unmark All Displayed Packets",                "<alt><control>M",              NULL,                   G_CALLBACK(new_packet_list_unmark_all_displayed_frames_cb) },
1520    { "/Edit/FindNextMark",                              NULL,                           "Find Next Mark",                                               "<shift><control>N",    NULL,                   G_CALLBACK(find_next_mark_cb) },
1521    { "/Edit/FindPreviousMark",                  NULL,                           "Find Next Mark",                                               "<shift><control>B",    NULL,                   G_CALLBACK(find_prev_mark_cb) },
1522
1523    { "/Edit/IgnorePacket",                              NULL,                           "_Ignore Packet (toggle)",                              "<control>X",                   NULL,                   G_CALLBACK(new_packet_list_ignore_frame_cb) },
1524     /*
1525      * XXX - this next one overrides /Edit/Copy/Description
1526      */
1527    { "/Edit/IgnoreAllDisplayedPackets", NULL,                           "_Ignore All Displayed Packets (toggle)","<alt><shift><control>X",      NULL,                   G_CALLBACK(new_packet_list_ignore_all_displayed_frames_cb) },
1528    { "/Edit/Un-IgnoreAllPackets",               NULL,                           "U_n-Ignore All Packets",                               "<shift><control>X",            NULL,                   G_CALLBACK(new_packet_list_unignore_all_frames_cb) },
1529    { "/Edit/SetTimeReference",                  WIRESHARK_STOCK_TIME,   "Set Time Reference (toggle)",                  "<control>T",                   NULL,                   G_CALLBACK(set_reftime_cb) },
1530    { "/Edit/Un-TimeReferenceAllPackets",NULL,                           "Un-Time Reference All Packets",                "<alt><control>T",                      NULL,                   G_CALLBACK(new_packet_list_untime_reference_all_frames_cb) },
1531    { "/Edit/FindNextTimeReference",             NULL,                           "Find Next Time Reference",                             "<alt><control>N",                      NULL,                   G_CALLBACK(find_next_ref_time_cb) },
1532    { "/Edit/FindPreviousTimeReference", NULL,                           "Find Previous Time Reference",                 "<alt><control>B",                      NULL,                   G_CALLBACK(find_previous_ref_time_cb) },
1533
1534    { "/Edit/ConfigurationProfiles",     NULL,                                   "_Configuration Profiles...",                   "<shift><control>A",            NULL,                   G_CALLBACK(profile_dialog_cb) },
1535    { "/Edit/Preferences",                       GTK_STOCK_PREFERENCES,  "_Preferences...",                                              "<shift><control>P",            NULL,                   G_CALLBACK(menus_prefs_cb) },
1536 #ifdef WANT_PACKET_EDITOR
1537    { "/Edit/EditPacket",                                NULL,                           "_Edit Packet",                                                 NULL,                                           NULL,                   G_CALLBACK(edit_window_cb) },
1538 #endif
1539
1540
1541    { "/View/TimeDisplayFormat",         NULL,                                   "_Time Display Format",                                 NULL,                                           NULL,                   NULL },
1542
1543    { "/View/NameResolution",                    NULL,                                   "Name Resol_ution",                                             NULL,                                           NULL,                   NULL },
1544    { "/View/ZoomIn",                            GTK_STOCK_ZOOM_IN,              "_Zoom In",                                                             "<control>plus",                        NULL,                   G_CALLBACK(view_zoom_in_cb) },
1545    { "/View/ZoomOut",                           GTK_STOCK_ZOOM_OUT,             "Zoom _Out",                                                    "<control>minus",                       NULL,                   G_CALLBACK(view_zoom_out_cb) },
1546    { "/View/NormalSize",                        GTK_STOCK_ZOOM_100,             "_Normal Size",                                                 "<control>equal",                       NULL,                   G_CALLBACK(view_zoom_100_cb) },
1547    { "/View/ResizeAllColumns",          WIRESHARK_STOCK_RESIZE_COLUMNS, "Resize All Columns",                   "<shift><control>R",            NULL,                   G_CALLBACK(new_packet_list_resize_columns_cb) },
1548    { "/View/DisplayedColumns",          NULL,                                   "Displayed Columns",                    NULL,           NULL,                   NULL },
1549    { "/View/ExpandSubtrees",            NULL,                                   "Expand Subtrees",              NULL,                                   NULL,                   G_CALLBACK(expand_tree_cb) },
1550    { "/View/ExpandAll",                         NULL,                                   "Expand All",                   NULL,                                   NULL,                   G_CALLBACK(expand_all_cb) },
1551    { "/View/CollapseAll",                       NULL,                                   "Collapse All",                 NULL,                                   NULL,                   G_CALLBACK(collapse_all_cb) },
1552    { "/View/ColorizeConversation",      NULL,                                   "Colorize Conversation",NULL,                                   NULL,                   NULL },
1553
1554    { "/View/ColorizeConversation/Color 1",      WIRESHARK_STOCK_COLOR1, "Color 1",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color1_cb) },
1555    { "/View/ColorizeConversation/Color 2",      WIRESHARK_STOCK_COLOR2, "Color 2",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color2_cb) },
1556    { "/View/ColorizeConversation/Color 3",      WIRESHARK_STOCK_COLOR3, "Color 3",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color3_cb) },
1557    { "/View/ColorizeConversation/Color 4",      WIRESHARK_STOCK_COLOR4, "Color 4",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color4_cb) },
1558    { "/View/ColorizeConversation/Color 5",      WIRESHARK_STOCK_COLOR5, "Color 5",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color5_cb) },
1559    { "/View/ColorizeConversation/Color 6",      WIRESHARK_STOCK_COLOR6, "Color 6",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color6_cb) },
1560    { "/View/ColorizeConversation/Color 7",      WIRESHARK_STOCK_COLOR7, "Color 7",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color7_cb) },
1561    { "/View/ColorizeConversation/Color 8",      WIRESHARK_STOCK_COLOR8, "Color 8",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color8_cb) },
1562    { "/View/ColorizeConversation/Color 9",      WIRESHARK_STOCK_COLOR9, "Color 9",                                      NULL, NULL, G_CALLBACK(view_menu_color_conv_color9_cb) },
1563    { "/View/ColorizeConversation/Color 10",     WIRESHARK_STOCK_COLOR0, "Color 10",                                     NULL, NULL, G_CALLBACK(view_menu_color_conv_color10_cb) },
1564    { "/View/ColorizeConversation/NewColoringRule",      NULL,                   "New Coloring Rule...",         NULL, NULL, G_CALLBACK(view_menu_color_conv_new_rule_cb) },
1565
1566    { "/View/ResetColoring1-10",         NULL,                                   "Reset Coloring 1-10",                          "<control>space",                               NULL,                           G_CALLBACK(view_menu_reset_coloring_cb) },
1567    { "/View/ColoringRules",                     GTK_STOCK_SELECT_COLOR, "_Coloring Rules...",                           NULL,                                                   NULL,                           G_CALLBACK(color_display_cb) },
1568    { "/View/ShowPacketinNewWindow",     NULL,                                   "Show Packet in New _Window",           NULL,                                                   NULL,                           G_CALLBACK(new_window_cb) },
1569    { "/View/Reload",                            GTK_STOCK_REFRESH,              "_Reload",                                                      "<control>R",                                   NULL,                           G_CALLBACK(file_reload_cmd_cb) },
1570
1571
1572    { "/Go/Back",                                        GTK_STOCK_GO_BACK,              "_Back",                                                        "<alt>Left",                                    NULL,                           G_CALLBACK(history_back_cb) },
1573    { "/Go/Forward",                                     GTK_STOCK_GO_FORWARD,   "_Forward",                                                     "<alt>Right",                                   NULL,                           G_CALLBACK(history_forward_cb) },
1574    { "/Go/Goto",                                        GTK_STOCK_JUMP_TO,              "_Go to Packet...",                                     "<control>G",                                   NULL,                           G_CALLBACK(goto_frame_cb) },
1575    { "/Go/GotoCorrespondingPacket",     NULL,                                   "Go to _Corresponding Packet",          NULL,                                                   NULL,                           G_CALLBACK(goto_framenum_cb) },
1576    { "/Go/PreviousPacket",                      GTK_STOCK_GO_UP,                "Previous Packet",                                      "<control>Up",                                  NULL,                           G_CALLBACK(goto_previous_frame_cb) },
1577    { "/Go/NextPacket",                          GTK_STOCK_GO_DOWN,              "Next Packet",                                          "<control>Down",                                NULL,                           G_CALLBACK(goto_next_frame_cb) },
1578    { "/Go/FirstPacket",                         GTK_STOCK_GOTO_TOP,             "F_irst Packet",                                        "<control>Home",                                NULL,                           G_CALLBACK(goto_top_frame_cb) },
1579    { "/Go/LastPacket",                          GTK_STOCK_GOTO_BOTTOM,  "_Last Packet",                                         "<control>End",                                 NULL,                           G_CALLBACK(goto_bottom_frame_cb) },
1580    { "/Go/PreviousPacketInConversation",                        GTK_STOCK_GO_UP,                "Previous Packet In Conversation",                                      "<control>comma",                                       NULL,                           G_CALLBACK(goto_previous_frame_conversation_cb) },
1581    { "/Go/NextPacketInConversation",                            GTK_STOCK_GO_DOWN,              "Next Packet In Conversation",                                          "<control>period",                              NULL,                           G_CALLBACK(goto_next_frame_conversation_cb) },
1582
1583 #ifdef HAVE_LIBPCAP
1584    { "/Capture/Interfaces",                     WIRESHARK_STOCK_CAPTURE_INTERFACES,     "_Interfaces...",               "<control>I",                                   NULL,                           G_CALLBACK(capture_if_cb) },
1585    { "/Capture/Options",                        WIRESHARK_STOCK_CAPTURE_OPTIONS,        "_Options...",                  "<control>K",                                   NULL,                           G_CALLBACK(capture_prep_cb) },
1586    { "/Capture/Start",                          WIRESHARK_STOCK_CAPTURE_START,          "_Start",                               "<control>E",                                   NULL,                           G_CALLBACK(capture_start_cb) },
1587    { "/Capture/Stop",                           WIRESHARK_STOCK_CAPTURE_STOP,           "S_top",                                "<control>E",                                   NULL,                           G_CALLBACK(capture_stop_cb) },
1588    { "/Capture/Restart",                        WIRESHARK_STOCK_CAPTURE_RESTART,        "_Restart",                             "<control>R",                                   NULL,                           G_CALLBACK(capture_restart_cb) },
1589    { "/Capture/CaptureFilters",         WIRESHARK_STOCK_CAPTURE_FILTER,         "Capture _Filters...",  NULL,                                                   NULL,                           G_CALLBACK(cfilter_dialog_cb) },
1590
1591 #endif /* HAVE_LIBPCAP */
1592    { "/Analyze/DisplayFilters",         WIRESHARK_STOCK_DISPLAY_FILTER,         "_Display Filters...",  NULL,                                                   NULL,                           G_CALLBACK(dfilter_dialog_cb) },
1593
1594    { "/Analyze/DisplayFilterMacros",                    NULL,                                   "Display Filter _Macros...",    NULL,                                   NULL,                           G_CALLBACK(macros_dialog_cb) },
1595    { "/Analyze/ApplyasColumn",                                  NULL,                                                   "Apply as Column",              NULL,                                   NULL,                           G_CALLBACK(apply_as_custom_column_cb) },
1596    { "/Analyze/ApplyasFilter",                                  NULL,                                                   "Apply as Filter",              NULL,                                   NULL,                           NULL },
1597
1598    { "/Analyze/ApplyasFilter/Selected",                 NULL, "_Selected" ,                             NULL, NULL, G_CALLBACK(tree_view_menu_apply_selected_cb) },
1599    { "/Analyze/ApplyasFilter/NotSelected",              NULL, "_Not Selected",                  NULL, NULL, G_CALLBACK(tree_view_menu_apply_not_selected_cb) },
1600    { "/Analyze/ApplyasFilter/AndSelected",              NULL, UTF8_HORIZONTAL_ELLIPSIS " _and Selected",                NULL, NULL, G_CALLBACK(tree_view_menu_apply_and_selected_cb) },
1601    { "/Analyze/ApplyasFilter/OrSelected",               NULL, UTF8_HORIZONTAL_ELLIPSIS " _or Selected",         NULL, NULL, G_CALLBACK(tree_view_menu_apply_or_selected_cb) },
1602    { "/Analyze/ApplyasFilter/AndNotSelected",   NULL, UTF8_HORIZONTAL_ELLIPSIS " a_nd not Selected",    NULL, NULL, G_CALLBACK(tree_view_menu_apply_and_not_selected_cb) },
1603    { "/Analyze/ApplyasFilter/OrNotSelected",    NULL, UTF8_HORIZONTAL_ELLIPSIS " o_r not Selected",     NULL, NULL, G_CALLBACK(tree_view_menu_apply_or_not_selected_cb) },
1604
1605    { "/Analyze/PrepareaFilter",                                 NULL, "Prepare a Filter",               NULL, NULL, NULL },
1606    { "/Analyze/PrepareaFilter/Selected",                NULL, "_Selected" ,                             NULL, NULL, G_CALLBACK(tree_view_menu_prepare_selected_cb) },
1607    { "/Analyze/PrepareaFilter/NotSelected",             NULL, "_Not Selected",                  NULL, NULL, G_CALLBACK(tree_view_menu_prepare_not_selected_cb) },
1608    { "/Analyze/PrepareaFilter/AndSelected",             NULL, UTF8_HORIZONTAL_ELLIPSIS " _and Selected",                NULL, NULL, G_CALLBACK(tree_view_menu_prepare_and_selected_cb) },
1609    { "/Analyze/PrepareaFilter/OrSelected",              NULL, UTF8_HORIZONTAL_ELLIPSIS " _or Selected",         NULL, NULL, G_CALLBACK(tree_view_menu_prepare_or_selected_cb) },
1610    { "/Analyze/PrepareaFilter/AndNotSelected",  NULL, UTF8_HORIZONTAL_ELLIPSIS " a_nd not Selected",    NULL, NULL, G_CALLBACK(tree_view_menu_prepare_and_not_selected_cb) },
1611    { "/Analyze/PrepareaFilter/OrNotSelected",   NULL, UTF8_HORIZONTAL_ELLIPSIS " o_r not Selected",     NULL, NULL, G_CALLBACK(tree_view_menu_prepare_or_not_selected_cb) },
1612
1613    { "/Analyze/EnabledProtocols",       WIRESHARK_STOCK_CHECKBOX, "_Enabled Protocols...",      "<shift><control>E", NULL, G_CALLBACK(proto_cb) },
1614    { "/Analyze/DecodeAs",       WIRESHARK_STOCK_DECODE_AS, "Decode _As...",                     NULL, NULL, G_CALLBACK(decode_as_cb) },
1615    { "/Analyze/UserSpecifiedDecodes",   WIRESHARK_STOCK_DECODE_AS, "_User Specified Decodes...",                        NULL, NULL, G_CALLBACK(decode_show_cb) },
1616
1617    { "/Analyze/FollowTCPStream",                                                        NULL,           "Follow TCP Stream",                                    NULL, NULL, G_CALLBACK(follow_tcp_stream_cb) },
1618    { "/Analyze/FollowUDPStream",                                                        NULL,           "Follow UDP Stream",                                    NULL, NULL, G_CALLBACK(follow_udp_stream_cb) },
1619    { "/Analyze/FollowSSLStream",                                                        NULL,           "Follow SSL Stream",                                    NULL, NULL, G_CALLBACK(follow_ssl_stream_cb) },
1620
1621    { "/Analyze/ExpertInfoComposite",WIRESHARK_STOCK_EXPERT_INFO,                "Expert Info _Composite",                               NULL, NULL, G_CALLBACK(expert_comp_dlg_launch) },
1622
1623    { "/Analyze/ConversationFilter",                                                     NULL,           "Conversation Filter",                                  NULL, NULL, NULL },
1624    { "/Analyze/ConversationList",                                                       NULL,           "_Conversation List",                                   NULL, NULL, NULL },
1625    { "/Analyze/ConversationList/Ethernet",              WIRESHARK_STOCK_CONVERSATIONS,  "Ethernet",                                             NULL, NULL,     G_CALLBACK(eth_endpoints_cb) },
1626    { "/Analyze/ConversationList/FibreChannel",  WIRESHARK_STOCK_CONVERSATIONS,  "Fibre Channel",                                NULL, NULL,     G_CALLBACK(fc_endpoints_cb) },
1627    { "/Analyze/ConversationList/FDDI",                  WIRESHARK_STOCK_CONVERSATIONS,  "FDDI",                                                 NULL, NULL,     G_CALLBACK(fddi_endpoints_cb) },
1628    { "/Analyze/ConversationList/IP",                    WIRESHARK_STOCK_CONVERSATIONS,  "IPv4",                                                 NULL, NULL,     G_CALLBACK(ip_endpoints_cb) },
1629    { "/Analyze/ConversationList/IPv6",                  WIRESHARK_STOCK_CONVERSATIONS,  "IPv6",                                                 NULL, NULL,     G_CALLBACK(ipv6_endpoints_cb) },
1630    { "/Analyze/ConversationList/IPX",                   WIRESHARK_STOCK_CONVERSATIONS,  "IPX",                                                  NULL, NULL,     G_CALLBACK(ipx_endpoints_cb) },
1631    { "/Analyze/ConversationList/JXTA",                  WIRESHARK_STOCK_CONVERSATIONS,  "JXTA",                                                 NULL, NULL,     G_CALLBACK(jxta_conversation_cb) },
1632    { "/Analyze/ConversationList/NCP",                   WIRESHARK_STOCK_CONVERSATIONS,  "NCP",                                                  NULL, NULL,     G_CALLBACK(ncp_endpoints_cb) },
1633    { "/Analyze/ConversationList/RSVP",                  WIRESHARK_STOCK_CONVERSATIONS,  "RSVP",                                                 NULL, NULL,     G_CALLBACK(rsvp_endpoints_cb) },
1634    { "/Analyze/ConversationList/SCTP",                  WIRESHARK_STOCK_CONVERSATIONS,  "SCTP",                                                 NULL, NULL,     G_CALLBACK(sctp_conversation_cb) },
1635    { "/Analyze/ConversationList/TCPIP",                 WIRESHARK_STOCK_CONVERSATIONS,  "TCP (IPv4 & IPv6)",                    NULL, NULL,     G_CALLBACK(tcpip_conversation_cb) },
1636    { "/Analyze/ConversationList/TR",                    WIRESHARK_STOCK_CONVERSATIONS,  "Token Ring",                                   NULL, NULL,     G_CALLBACK(tr_conversation_cb) },
1637    { "/Analyze/ConversationList/UDPIP",                 WIRESHARK_STOCK_CONVERSATIONS,  "UDP (IPv4 & IPv6)",                    NULL, NULL,     G_CALLBACK(udpip_conversation_cb) },
1638    { "/Analyze/ConversationList/USB",                   WIRESHARK_STOCK_CONVERSATIONS,  "USB",                                                  NULL, NULL,     G_CALLBACK(usb_endpoints_cb) },
1639    { "/Analyze/ConversationList/WLAN",                  WIRESHARK_STOCK_CONVERSATIONS,  "WLAN",                                                 NULL, NULL,     G_CALLBACK(wlan_endpoints_cb) },
1640
1641    { "/Analyze/EndpointList",                                                           NULL,                           "_Endpoint List",                               NULL, NULL, NULL },
1642    { "/Analyze/EndpointList/Ethernet",                  WIRESHARK_STOCK_ENDPOINTS,              "Ethernet",                                             NULL, NULL,     G_CALLBACK(gtk_eth_hostlist_cb) },
1643    { "/Analyze/EndpointList/FibreChannel",              WIRESHARK_STOCK_ENDPOINTS,              "Fibre Channel",                                NULL, NULL,     G_CALLBACK(gtk_fc_hostlist_cb) },
1644    { "/Analyze/EndpointList/FDDI",                              WIRESHARK_STOCK_ENDPOINTS,              "FDDI",                                                 NULL, NULL,     G_CALLBACK(gtk_fddi_hostlist_cb) },
1645    { "/Analyze/EndpointList/IP",                                WIRESHARK_STOCK_ENDPOINTS,              "IPv4",                                                 NULL, NULL,     G_CALLBACK(gtk_ip_hostlist_cb) },
1646    { "/Analyze/EndpointList/IPv6",                              WIRESHARK_STOCK_ENDPOINTS,              "IPv6",                                                 NULL, NULL,     G_CALLBACK(gtk_ipv6_hostlist_cb) },
1647    { "/Analyze/EndpointList/IPX",                               WIRESHARK_STOCK_ENDPOINTS,              "IPX",                                                  NULL, NULL,     G_CALLBACK(gtk_ipx_hostlist_cb) },
1648    { "/Analyze/EndpointList/JXTA",                              WIRESHARK_STOCK_ENDPOINTS,              "JXTA",                                                 NULL, NULL,     G_CALLBACK(gtk_jxta_hostlist_cb) },
1649    { "/Analyze/EndpointList/NCP",                               WIRESHARK_STOCK_ENDPOINTS,              "NCP",                                                  NULL, NULL,     G_CALLBACK(gtk_ncp_hostlist_cb) },
1650    { "/Analyze/EndpointList/RSVP",                              WIRESHARK_STOCK_ENDPOINTS,              "RSVP",                                                 NULL, NULL,     G_CALLBACK(gtk_rsvp_hostlist_cb) },
1651    { "/Analyze/EndpointList/SCTP",                              WIRESHARK_STOCK_ENDPOINTS,              "SCTP",                                                 NULL, NULL,     G_CALLBACK(gtk_sctp_hostlist_cb) },
1652    { "/Analyze/EndpointList/TCPIP",                             WIRESHARK_STOCK_ENDPOINTS,              "TCP (IPv4 & IPv6)",                    NULL, NULL,     G_CALLBACK(gtk_tcpip_hostlist_cb) },
1653    { "/Analyze/EndpointList/TR",                                WIRESHARK_STOCK_ENDPOINTS,              "Token Ring",                                   NULL, NULL,     G_CALLBACK(gtk_tr_hostlist_cb) },
1654    { "/Analyze/EndpointList/UDPIP",                             WIRESHARK_STOCK_ENDPOINTS,              "UDP (IPv4 & IPv6)",                    NULL, NULL,     G_CALLBACK(gtk_udpip_hostlist_cb) },
1655    { "/Analyze/EndpointList/USB",                               WIRESHARK_STOCK_ENDPOINTS,              "USB",                                                  NULL, NULL,     G_CALLBACK(gtk_usb_hostlist_cb) },
1656    { "/Analyze/EndpointList/WLAN",                              WIRESHARK_STOCK_ENDPOINTS,              "WLAN",                                                 NULL, NULL,     G_CALLBACK(gtk_wlan_hostlist_cb) },
1657
1658    { "/Analyze/ServiceResponseTime",                                            NULL,                           "Service _Response Time",               NULL, NULL, NULL },
1659    { "/Analyze/ServiceResponseTime/ONC-RPC",    WIRESHARK_STOCK_TIME,                   "ONC-RPC...",                                   NULL, NULL,     G_CALLBACK(gtk_rpcstat_cb) },
1660
1661    { "/Analyze/BACnet",                                                                         NULL,                           "BACnet",                                               NULL, NULL, NULL },
1662
1663    { "/Analyze/StatisticsMenu/FlowGraph",               WIRESHARK_STOCK_FLOW_GRAPH,             "Flo_w Graph...",                               NULL, NULL,     G_CALLBACK(flow_graph_launch) },
1664    { "/Analyze/StatisticsMenu/HTTP",                    NULL,                           "HTTP",                                                 NULL, NULL, NULL },
1665    { "/Analyze/StatisticsMenu/TCPStreamGraphMenu",      NULL,                   "TCP StreamGraph",                                                      NULL, NULL, NULL },
1666    { "/Analyze/StatisticsMenu/TCPStreamGraphMenu/Time-Sequence-Graph-Stevens",  NULL, "Time-Sequence Graph (Stevens)",  NULL, NULL, G_CALLBACK(tcp_graph_cb) },
1667    { "/Analyze/StatisticsMenu/TCPStreamGraphMenu/Time-Sequence-Graph-tcptrace", NULL, "Time-Sequence Graph (tcptrace)", NULL, NULL, G_CALLBACK(tcp_graph_cb) },
1668    { "/Analyze/StatisticsMenu/TCPStreamGraphMenu/Throughput-Graph",                             NULL, "Throughput Graph",                               NULL, NULL, G_CALLBACK(tcp_graph_cb) },
1669    { "/Analyze/StatisticsMenu/TCPStreamGraphMenu/RTT-Graph",                                    NULL, "Round Trip Time Graph",                  NULL, NULL, G_CALLBACK(tcp_graph_cb) },
1670    { "/Analyze/StatisticsMenu/TCPStreamGraphMenu/Window-Scaling-Graph",                 NULL, "Window Scaling Graph",                   NULL, NULL, G_CALLBACK(tcp_graph_cb) },
1671
1672    { "/Analyze/StatisticsMenu/ONC-RPC-Programs",                                                                NULL, "ONC-RPC Programs",                               NULL, NULL,     G_CALLBACK(gtk_rpcprogs_cb) },
1673    { "/Analyze/StatisticsMenu/UDPMulticastStreams",                                                             NULL, "UDP Multicast Streams",                  NULL, NULL,     G_CALLBACK(mcaststream_launch) },
1674    { "/Analyze/StatisticsMenu/WLANTraffic",                                                                             NULL, "WLAN Traffic",                                   NULL, NULL,     G_CALLBACK(wlanstat_launch) },
1675
1676    { "/Statistics/Summary",                                             GTK_STOCK_PROPERTIES,                   "_Summary",                                             NULL, NULL,     G_CALLBACK(summary_open_cb) },
1677    { "/Statistics/ProtocolHierarchy",                   NULL,                                                   "_Protocol Hierarchy",                  NULL, NULL, G_CALLBACK(proto_hier_stats_cb) },
1678    { "/Statistics/Conversations",       WIRESHARK_STOCK_CONVERSATIONS,  "Conversations",                        NULL,                                           NULL,                           G_CALLBACK(init_conversation_notebook_cb) },
1679    { "/Statistics/Endpoints",           WIRESHARK_STOCK_ENDPOINTS,              "Endpoints",                            NULL,                                           NULL,                           G_CALLBACK(init_hostlist_notebook_cb) },
1680    { "/Statistics/IOGraphs",                    WIRESHARK_STOCK_GRAPHS,         "_IO Graph",                            NULL,                                           NULL,                           G_CALLBACK(gui_iostat_cb) },
1681
1682    { "/Telephony/ANSI",                                 NULL,                                           "ANSI",                                         NULL, NULL, NULL },
1683    { "/Telephony/ANSI/BSMAP",                   NULL,                                           "A-Interface BSMAP",            NULL,                                           NULL,                           G_CALLBACK(ansi_a_stat_gtk_bsmap_cb) },
1684    { "/Telephony/ANSI/DTAP",                    NULL,                                           "A-Interface DTAP",                     NULL,                                           NULL,                           G_CALLBACK(ansi_a_stat_gtk_dtap_cb) },
1685    { "/Telephony/ANSI/MAP-OP",                  NULL,                                           "MAP Operation",                        NULL,                                           NULL,                           G_CALLBACK(ansi_map_stat_gtk_cb) },
1686
1687    { "/Telephony/GSM",                                  NULL,                                           "GSM",                                          NULL, NULL, NULL },
1688    { "/Telephony/GSM/BSSMAP",                   NULL,                                           "_GSM/A-Interface BSSMAP",      NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_bssmap_cb) },
1689
1690    { "/Telephony/GSM/DTAP",                             NULL,                                           "_GSM/A-Interface DTAP",        NULL, NULL, NULL },
1691    { "/Telephony/GSM/DTAP/CC",                  NULL,                                           "Call Control",                         NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_cc_cb) },
1692    { "/Telephony/GSM/DTAP/GMM",                 NULL,                                           "GPRS Mobility Management",     NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_gmm_cb) },
1693    { "/Telephony/GSM/DTAP/SM",                  NULL,                                           "GPRS Session Management",      NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_sm_cb) },
1694    { "/Telephony/GSM/DTAP/MM",                  NULL,                                           "Mobility Management",          NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_mm_cb) },
1695    { "/Telephony/GSM/DTAP/RR",                  NULL,                                           "Radio Resource Management",NULL,                                               NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_rr_cb) },
1696    { "/Telephony/GSM/DTAP/SMS",                 NULL,                                           "Short Message Service",        NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_sms_cb) },
1697    { "/Telephony/GSM/DTAP/TP",                  NULL,           "Special Conformance Testing Functions",        NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_tp_cb) },
1698    { "/Telephony/GSM/DTAP/SS",                  NULL,                                           "Supplementary Services",       NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_dtap_ss_cb) },
1699
1700    { "/Telephony/GSM/SACCH",                    NULL,                                           "_GSM/A-Interface SACCH",       NULL,                                           NULL,                           G_CALLBACK(gsm_a_stat_gtk_sacch_rr_cb) },
1701    { "/Telephony/GSM/MAP-OP",                   NULL,                                           "_GSM/MAP Operation",           NULL,                                           NULL,                           G_CALLBACK(gsm_map_stat_gtk_cb) },
1702    { "/Telephony/GSM/MAPSummary",               NULL,                                           "MAP Summary",                          NULL,                                           NULL,                           G_CALLBACK(gsm_map_stat_gtk_sum_cb) },
1703
1704    { "/Telephony/IAX2",                                 NULL,                                           "IA_X2",                                        NULL, NULL, NULL },
1705    { "/Telephony/IAX2/StreamAnalysis",  NULL,                                           "Stream Analysis...",           NULL,                                           NULL,                           G_CALLBACK(iax2_analysis_cb) },
1706    { "/Telephony/VoIPCalls",                    WIRESHARK_STOCK_TELEPHONE,      "_VoIP Calls",                          NULL,                                           NULL,                           G_CALLBACK(voip_calls_launch) },
1707
1708    { "/Tools/FirewallACLRules",         NULL,                                                   "Firewall ACL Rules",           NULL,                                           NULL,                           G_CALLBACK(firewall_rule_cb) },
1709
1710    { "/Internals/Dissectortables",      NULL,                                                   "_Dissector tables",            NULL,                                           NULL,                           G_CALLBACK(dissector_tables_dlg_cb) },
1711    { "/Internals/SupportedProtocols", NULL,                                     "_Supported Protocols (slow!)",         NULL,                                           NULL,                           G_CALLBACK(supported_cb) },
1712
1713    { "/Help/Contents",                          GTK_STOCK_HELP,                                 "_Contents",                    "F1",                                                   NULL,                           G_CALLBACK(help_menu_cont_cb) },
1714    { "/Help/ManualPages",                       NULL,                                                   "ManualPages",                  NULL,                                                   NULL,                           NULL },
1715    { "/Help/ManualPages/Wireshark", NULL,                                                       "Wireshark",                    NULL,                                                   NULL,                           G_CALLBACK(help_menu_wireshark_cb) },
1716    { "/Help/ManualPages/WiresharkFilter", NULL,                                         "Wireshark Filter",             NULL,                                                   NULL,                           G_CALLBACK(help_menu_wireshark_flt_cb) },
1717    { "/Help/ManualPages/TShark",        NULL,                                                   "Wireshark",                    NULL,                                                   NULL,                           G_CALLBACK(help_menu_Tshark_cb) },
1718    { "/Help/ManualPages/RawShark",      NULL,                                                   "RawShark",                             NULL,                                                   NULL,                           G_CALLBACK(help_menu_RawShark_cb) },
1719    { "/Help/ManualPages/Dumpcap",       NULL,                                                   "Dumpcap",                              NULL,                                                   NULL,                           G_CALLBACK(help_menu_Dumpcap_cb) },
1720    { "/Help/ManualPages/Mergecap",      NULL,                                                   "Mergecap",                             NULL,                                                   NULL,                           G_CALLBACK(help_menu_Mergecap_cb) },
1721    { "/Help/ManualPages/Editcap",       NULL,                                                   "Editcap",                              NULL,                                                   NULL,                           G_CALLBACK(help_menu_Editcap_cb) },
1722    { "/Help/ManualPages/Text2pcap",     NULL,                                                   "Text2pcap",                    NULL,                                                   NULL,                           G_CALLBACK(help_menu_Text2pcap_cb) },
1723
1724    { "/Help/Website",                           GTK_STOCK_HOME,                                 "Website",                              NULL,                                                   NULL,                           G_CALLBACK(help_menu_Website_cb) },
1725    { "/Help/FAQs",                                      NULL,                                                   "FAQ's",                                NULL,                                                   NULL,                           G_CALLBACK(help_menu_faq_cb) },
1726    { "/Help/Downloads",                         NULL,                                                   "Downloads",                    NULL,                                                   NULL,                           G_CALLBACK(help_menu_Downloads_cb) },
1727    { "/Help/Wiki",                                      WIRESHARK_STOCK_WIKI,                   "Wiki",                                 NULL,                                                   NULL,                           G_CALLBACK(help_menu_Wiki_cb) },
1728    { "/Help/SampleCaptures",            NULL,                                                   "Sample Captures",              NULL,                                                   NULL,                           G_CALLBACK(help_menu_SampleCaptures_cb) },
1729    { "/Help/AboutWireshark",            WIRESHARK_STOCK_ABOUT,                  "_About Wireshark",             NULL,                                                   NULL,                           G_CALLBACK(about_wireshark_cb) },
1730 };
1731
1732 static const GtkToggleActionEntry main_menu_bar_toggle_action_entries[] =
1733 {
1734         /* name, stock id, label, accel, tooltip, callback, is_active */
1735         {"/View/MainToolbar",   NULL, "_Main Toolbar",  NULL, NULL,     G_CALLBACK(main_toolbar_show_hide_cb), TRUE},
1736         {"/View/FilterToolbar", NULL, "_FilterToolbar", NULL, NULL,     G_CALLBACK(filter_toolbar_show_hide_cb), TRUE},
1737 #ifdef HAVE_AIRPCAP
1738         {"/View/WirelessToolbar", NULL, "_WirelessToolbar", NULL, NULL, G_CALLBACK(wireless_toolbar_show_hide_cb), TRUE},
1739 #endif /* HAVE_AIRPCAP */
1740         {"/View/Statusbar",             NULL, "_Statusbar", NULL, NULL, G_CALLBACK(status_bar_show_hide_cb), TRUE},
1741         {"/View/PacketList",    NULL, "Packet _List", NULL, NULL,       G_CALLBACK(packet_list_show_hide_cb), TRUE},
1742         {"/View/PacketDetails", NULL, "Packet _Details", NULL, NULL,    G_CALLBACK(packet_details_show_hide_cb), TRUE},
1743         {"/View/PacketBytes",   NULL, "Packet _Bytes", NULL, NULL,      G_CALLBACK(packet_bytes_show_hide_cb), TRUE},
1744         {"/View/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes",   NULL, "Display Seconds with hours and minutes", NULL, NULL,     G_CALLBACK(view_menu_seconds_time_cb), FALSE},
1745         {"/View/NameResolution/ResolveName",                                                    NULL, "_Resolve Name",                                                  NULL, NULL,     G_CALLBACK(resolve_name_cb), FALSE},
1746         {"/View/NameResolution/EnableforMACLayer",                                              NULL, "Enable for _MAC Layer",                                  NULL, NULL, G_CALLBACK(view_menu_en_for_MAC_cb), TRUE},
1747         {"/View/NameResolution/EnableforNetworkLayer",                                  NULL, "Enable for _Network Layer",                              NULL, NULL, G_CALLBACK(view_menu_en_for_network_cb), TRUE },
1748         {"/View/NameResolution/EnableforTransportLayer",                                NULL, "Enable for _Transport Layer",                    NULL, NULL, G_CALLBACK(view_menu_en_for_transport_cb), TRUE },
1749         {"/View/ColorizePacketList",                                                                    NULL, "Colorize Packet List",                                   NULL, NULL, G_CALLBACK(view_menu_colorize_pkt_lst_cb), TRUE },
1750 #ifdef HAVE_LIBPCAP
1751         {"/View/AutoScrollinLiveCapture",                                                               NULL, "Auto Scroll in Li_ve Capture",                   NULL, NULL, G_CALLBACK(view_menu_auto_scroll_live_cb), TRUE },
1752 #endif
1753 };
1754
1755
1756
1757 static const GtkRadioActionEntry main_menu_bar_radio_view_time_entries [] =
1758 {
1759         /* name, stock id, label, accel, tooltip,  value */
1760         { "/View/TimeDisplayFormat/DateandTimeofDay",                                   NULL, "Date and Time of Day:   1970-01-01 01:02:03.123456", "<alt><control>1", NULL, TS_ABSOLUTE_WITH_DATE },
1761         { "/View/TimeDisplayFormat/TimeofDay",                                                  NULL, "Time of Day:   01:02:03.123456", "<alt><control>2", NULL, TS_ABSOLUTE },
1762         { "/View/TimeDisplayFormat/SecondsSinceEpoch",                                  NULL, "Seconds Since Epoch (1970-01-01):   1234567890.123456", "<alt><control>3", NULL, TS_EPOCH },
1763         { "/View/TimeDisplayFormat/SecondsSinceBeginningofCapture",             NULL, "Seconds Since Beginning of Capture:   123.123456", "<alt><control>4", NULL, TS_RELATIVE },
1764         { "/View/TimeDisplayFormat/SecondsSincePreviousCapturedPacket", NULL, "Seconds Since Previous Captured Packet:   1.123456", "<alt><control>5", NULL, TS_DELTA },
1765         { "/View/TimeDisplayFormat/SecondsSincePreviousDisplayedPacket",NULL, "Seconds Since Previous Displayed Packet:   1.123456", "<alt><control>6", NULL, TS_DELTA_DIS },
1766 };
1767
1768 static const GtkRadioActionEntry main_menu_bar_radio_view_time_fileformat_prec_entries [] =
1769 {
1770         /* name, stock id, label, accel, tooltip,  value */
1771         { "/View/TimeDisplayFormat/FileFormatPrecision-Automatic",              NULL, "Automatic (File Format Precision)",      NULL, NULL, TS_PREC_AUTO },
1772         { "/View/TimeDisplayFormat/FileFormatPrecision-Seconds",                NULL, "Seconds:   0",                                       NULL, NULL, TS_PREC_FIXED_SEC },
1773         { "/View/TimeDisplayFormat/FileFormatPrecision-Deciseconds",    NULL, "Deciseconds:   0.1",                                     NULL, NULL, TS_PREC_FIXED_DSEC },
1774         { "/View/TimeDisplayFormat/FileFormatPrecision-Centiseconds",   NULL, "Centiseconds:  0.12",                            NULL, NULL, TS_PREC_FIXED_CSEC },
1775         { "/View/TimeDisplayFormat/FileFormatPrecision-Milliseconds",   NULL, "Milliseconds:  0.123",                           NULL, NULL, TS_PREC_FIXED_MSEC },
1776         { "/View/TimeDisplayFormat/FileFormatPrecision-Microseconds",   NULL, "Microseconds:  0.123456",                        NULL, NULL, TS_PREC_FIXED_USEC },
1777         { "/View/TimeDisplayFormat/FileFormatPrecision-Nanoseconds",    NULL, "Nanoseconds:   0.123456789",                     NULL, NULL, TS_PREC_FIXED_NSEC },
1778 };
1779 #else /* MAIN_MENU_USE_UIMANAGER */
1780 /*
1781  * Main menu.
1782  *
1783  * Please do not use keystrokes that are used as "universal" shortcuts in
1784  * various desktop environments:
1785  *
1786  *   Windows:
1787  *      http://support.microsoft.com/kb/126449
1788  *
1789  *   GNOME:
1790  *      http://library.gnome.org/users/user-guide/nightly/keyboard-skills.html.en
1791  *
1792  *   KDE:
1793  *      http://developer.kde.org/documentation/standards/kde/style/keys/shortcuts.html
1794  *
1795  * In particular, do not use the following <control> sequences for anything
1796  * other than their standard purposes:
1797  *
1798  *      <control>O      File->Open
1799  *      <control>S      File->Save
1800  *      <control>P      File->Print
1801  *      <control>W      File->Close
1802  *      <control>Q      File->Quit
1803  *      <control>Z      Edit->Undo (which we don't currently have)
1804  *      <control>X      Edit->Cut (which we don't currently have)
1805  *      <control>C      Edit->Copy (which we don't currently have)
1806  *      <control>V      Edit->Paste (which we don't currently have)
1807  *      <control>A      Edit->Select All (which we don't currently have)
1808  *
1809  * Note that some if not all of the Edit keys above already perform those
1810  * functions in text boxes, such as the Filter box.  Do no, under any
1811  * circumstances, make a change that keeps them from doing so.
1812  */
1813
1814 /* This is the GtkItemFactoryEntry structure used to generate new menus.
1815        Item 1: The menu path. The letter after the underscore indicates an
1816                accelerator key once the menu is open.
1817        Item 2: The accelerator key for the entry
1818        Item 3: The callback function.
1819        Item 4: The callback action.  This changes the parameters with
1820                which the function is called.  The default is 0.
1821        Item 5: The item type, used to define what kind of an item it is.
1822                Here are the possible values:
1823
1824                NULL               -> "<Item>"
1825                ""                 -> "<Item>"
1826                "<Title>"          -> create a title item
1827                "<Item>"           -> create a simple item
1828                "<ImageItem>"      -> create an item holding an image
1829                "<StockItem>"      -> create an item holding a stock image
1830                "<CheckItem>"      -> create a check item
1831                "<ToggleItem>"     -> create a toggle item
1832                "<RadioItem>"      -> create a radio item
1833                <path>             -> path of a radio item to link against
1834                "<Separator>"      -> create a separator
1835                "<Tearoff>"        -> create a tearoff separator
1836                "<Branch>"         -> create an item to hold sub items (optional)
1837                "<LastBranch>"     -> create a right justified branch
1838        Item 6: extra data needed for ImageItem and StockItem
1839     */
1840 static GtkItemFactoryEntry menu_items[] =
1841 {
1842     {"/_File", NULL, NULL, 0, "<Branch>", NULL,},
1843     {"/File/_Open...", "<control>O", GTK_MENU_FUNC(file_open_cmd_cb),
1844                              0, "<StockItem>", GTK_STOCK_OPEN,},
1845     {"/File/Open _Recent", NULL, NULL, 0, "<Branch>", NULL,},
1846     {"/File/_Merge...", NULL, GTK_MENU_FUNC(file_merge_cmd_cb), 0, NULL, NULL,},
1847     {"/File/_Import...", NULL, GTK_MENU_FUNC(file_import_cmd_cb), 0, NULL, NULL,},
1848     {"/File/_Close", "<control>W", GTK_MENU_FUNC(file_close_cmd_cb),
1849                              0, "<StockItem>", GTK_STOCK_CLOSE,},
1850     {"/File/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1851     {"/File/_Save", "<control>S", GTK_MENU_FUNC(file_save_cmd_cb),
1852                              0, "<StockItem>", GTK_STOCK_SAVE,},
1853     {"/File/Save _As...", "<shift><control>S", GTK_MENU_FUNC(file_save_as_cmd_cb),
1854                              0, "<StockItem>", GTK_STOCK_SAVE_AS,},
1855     {"/File/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1856     {"/File/File Set", NULL, NULL, 0, "<Branch>", NULL,},
1857     {"/File/File Set/List Files", NULL, GTK_MENU_FUNC(fileset_cb), 0, "<StockItem>", WIRESHARK_STOCK_FILE_SET_LIST,},
1858     {"/File/File Set/Next File", NULL, GTK_MENU_FUNC(fileset_next_cb), 0, "<StockItem>", WIRESHARK_STOCK_FILE_SET_NEXT,},
1859     {"/File/File Set/Previous File", NULL, GTK_MENU_FUNC(fileset_previous_cb), 0, "<StockItem>", WIRESHARK_STOCK_FILE_SET_PREVIOUS,},
1860     {"/File/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1861     {"/File/_Export", NULL, NULL, 0, "<Branch>", NULL,},
1862 #if _WIN32
1863     {"/File/Export/File...", NULL, GTK_MENU_FUNC(export_text_cmd_cb),
1864                          0, NULL, NULL,},
1865 #else
1866     {"/File/Export/as \"Plain _Text\" file...", NULL, GTK_MENU_FUNC(export_text_cmd_cb),
1867                              0, NULL, NULL,},
1868     {"/File/Export/as \"_PostScript\" file...", NULL, GTK_MENU_FUNC(export_ps_cmd_cb),
1869                              0, NULL, NULL,},
1870     {"/File/Export/as \"_CSV\" (Comma Separated Values packet summary) file...",
1871                              NULL, GTK_MENU_FUNC(export_csv_cmd_cb), 0, NULL, NULL,},
1872     {"/File/Export/as \"C _Arrays\" (packet bytes) file...", NULL, GTK_MENU_FUNC(export_carrays_cmd_cb),
1873                              0, NULL, NULL,},
1874     {"/File/Export/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1875     {"/File/Export/as XML - \"P_SML\" (packet summary) file...", NULL, GTK_MENU_FUNC(export_psml_cmd_cb),
1876                              0, NULL, NULL,},
1877     {"/File/Export/as XML - \"P_DML\" (packet details) file...", NULL, GTK_MENU_FUNC(export_pdml_cmd_cb),
1878                              0, NULL, NULL,},
1879     {"/File/Export/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1880 #endif
1881     {"/File/Export/Selected Packet _Bytes...", "<control>H", GTK_MENU_FUNC(savehex_cb),
1882                              0, NULL, NULL,},
1883     {"/File/Export/SSL Session Keys...", NULL, GTK_MENU_FUNC(savesslkeys_cb),
1884                              0, NULL, NULL,},
1885     {"/File/Export/_Objects/_HTTP", NULL, GTK_MENU_FUNC(eo_http_cb), 0, NULL, NULL,},
1886     {"/File/Export/_Objects/_DICOM", NULL, GTK_MENU_FUNC(eo_dicom_cb), 0, NULL, NULL,},
1887     {"/File/Export/_Objects/_SMB", NULL, GTK_MENU_FUNC(eo_smb_cb), 0, NULL, NULL,},
1888     {"/File/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1889     {"/File/_Print...", "<control>P", GTK_MENU_FUNC(file_print_cmd_cb),
1890                              0, "<StockItem>", GTK_STOCK_PRINT,},
1891     {"/File/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1892     {"/File/_Quit", "<control>Q", GTK_MENU_FUNC(file_quit_cmd_cb),
1893                              0, "<StockItem>", GTK_STOCK_QUIT,},
1894     {"/_Edit", NULL, NULL, 0, "<Branch>", NULL,},
1895     {"/Edit/Copy", NULL, NULL, 0, "<Branch>", NULL,},
1896     {"/Edit/Copy/Description", "<shift><control>D", GTK_MENU_FUNC(copy_selected_plist_cb), COPY_SELECTED_DESCRIPTION, NULL, NULL,},
1897     {"/Edit/Copy/Fieldname", "<shift><control>F", GTK_MENU_FUNC(copy_selected_plist_cb), COPY_SELECTED_FIELDNAME, NULL, NULL,},
1898     {"/Edit/Copy/Value", "<shift><control>V", GTK_MENU_FUNC(copy_selected_plist_cb), COPY_SELECTED_VALUE, NULL, NULL,},
1899     {"/Edit/Copy/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1900     {"/Edit/Copy/As Filter", "<shift><control>C", GTK_MENU_FUNC(match_selected_ptree_cb),
1901                        MATCH_SELECTED_REPLACE|MATCH_SELECTED_COPY_ONLY, NULL, NULL,},
1902 #if 0
1903     /*
1904      * Un-#if this when we actually implement Cut/Copy/Paste for the
1905      * packet list and packet detail windows.
1906      *
1907      * Note: when we implement Cut/Copy/Paste in those windows, we
1908      * will almost certainly want to allow multiple packets to be
1909      * selected in the packet list pane and multiple packet detail
1910      * items to be selected in the packet detail pane, so that
1911      * the user can, for example, copy the summaries of multiple
1912      * packets to the clipboard from the packet list pane and multiple
1913      * packet detail items - perhaps *all* packet detail items - from
1914      * the packet detail pane.  Given that, we'll also want to
1915      * implement Select All.
1916      *
1917      * If multiple packets are selected, we would probably display nothing
1918      * in the packet detail pane, just as we do if no packet is selected,
1919      * and any menu items etc. that would pertain only to a single packet
1920      * would be disabled.
1921      *
1922      * If multiple packet detail items are selected, we would probably
1923      * disable all items that pertain only to a single packet detail
1924      * item, such as some items in the status bar.
1925      *
1926      * XXX - the actions for these will be different depending on what
1927      * widget we're in; ^C should copy from the filter text widget if
1928      * we're in that widget, the packet list if we're in that widget
1929      * (presumably copying the summaries of selected packets to the
1930      * clipboard, e.g. the text copy would be the text of the columns),
1931      * the packet detail if we're in that widget (presumably copying
1932      * the contents of selected protocol tree items to the clipboard,
1933      * e.g. the text copy would be the text displayed for those items),
1934      * etc..
1935      *
1936      * Given that those menu items should also affect text widgets
1937      * such as the filter box, we would again want Select All, and,
1938      * at least for the filter box, we would also want Undo and Redo.
1939      * We would only want Cut, Paste, Undo, and Redo for the packet
1940      * list and packet detail panes if we support modifying them.
1941      */
1942     {"/Edit/_Undo", "<control>Z", NULL,
1943                              0, "<StockItem>", GTK_STOCK_UNDO,},
1944     {"/Edit/_Redo", "<shift><control>Z", NULL,
1945                              0, "<StockItem>", GTK_STOCK_REDO,},
1946     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1947     {"/Edit/Cu_t", "<control>X", NULL,
1948                              0, "<StockItem>", GTK_STOCK_CUT,},
1949     {"/Edit/_Copy", "<control>C", NULL,
1950                              0, "<StockItem>", GTK_STOCK_COPY,},
1951     {"/Edit/_Paste", "<control>V", NULL,
1952                              0, "<StockItem>", GTK_STOCK_PASTE,},
1953     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1954     {"/Edit/Select _All", "<control>A", NULL, 0,
1955 #ifdef GTK_STOCK_SELECT_ALL     /* first appeared in 2.10 */
1956                              "<StockItem>", GTK_STOCK_SELECT_ALL,
1957 #else
1958                              NULL, NULL,
1959 #endif /* GTK_STOCK_SELECT_ALL */
1960     },
1961 #endif /* 0 */
1962     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1963     {"/Edit/_Find Packet...",                             "<control>F", GTK_MENU_FUNC(find_frame_cb), 0, "<StockItem>", GTK_STOCK_FIND,},
1964     {"/Edit/Find Ne_xt",                                  "<control>N", GTK_MENU_FUNC(find_next_cb), 0, NULL, NULL,},
1965     {"/Edit/Find Pre_vious",                              "<control>B", GTK_MENU_FUNC(find_previous_cb), 0, NULL, NULL,},
1966     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1967     {"/Edit/_Mark Packet (toggle)",                       "<control>M", GTK_MENU_FUNC(new_packet_list_mark_frame_cb),0, NULL, NULL,},
1968     {"/Edit/Toggle Marking Of All Displayed Packets",        "<shift><alt><control>M", GTK_MENU_FUNC(new_packet_list_toggle_mark_all_displayed_frames_cb), 0, NULL, NULL,},
1969     {"/Edit/Mark All Displayed Packets",                  "<shift><control>M", GTK_MENU_FUNC(new_packet_list_mark_all_displayed_frames_cb), 0, NULL, NULL,},
1970     {"/Edit/Unmark All Displayed Packets",                "<alt><control>M", GTK_MENU_FUNC(new_packet_list_unmark_all_displayed_frames_cb), 0, NULL, NULL,},
1971     {"/Edit/Find Next Mark",                       "<shift><control>N", GTK_MENU_FUNC(find_next_mark_cb), 0, NULL, NULL,},
1972     {"/Edit/Find Previous Mark",                   "<shift><control>B", GTK_MENU_FUNC(find_prev_mark_cb), 0, NULL, NULL,},
1973     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1974     {"/Edit/_Ignore Packet (toggle)",                     "<control>D", GTK_MENU_FUNC(new_packet_list_ignore_frame_cb), 0, NULL, NULL,},
1975     /*
1976      * XXX - this next one overrides /Edit/Copy/Description
1977      */
1978     {"/Edit/Ignore All Displayed Packets (toggle)","<shift><control>D", GTK_MENU_FUNC(new_packet_list_ignore_all_displayed_frames_cb), 0, NULL, NULL,},
1979     {"/Edit/U_n-Ignore All Packets",                 "<alt><control>D", GTK_MENU_FUNC(new_packet_list_unignore_all_frames_cb), 0, NULL, NULL,},
1980     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1981     {"/Edit/Set Time Reference (toggle)",                 "<control>T", GTK_MENU_FUNC(reftime_frame_cb), REFTIME_TOGGLE, "<StockItem>", WIRESHARK_STOCK_TIME,},
1982     {"/Edit/Un-Time Reference All Packets",          "<alt><control>T", GTK_MENU_FUNC(new_packet_list_untime_reference_all_frames_cb), 0, NULL, NULL,},
1983     {"/Edit/Find Next Time Reference",               "<alt><control>N", GTK_MENU_FUNC(reftime_frame_cb), REFTIME_FIND_NEXT, NULL, NULL,},
1984     {"/Edit/Find Previous Time Reference",           "<alt><control>B", GTK_MENU_FUNC(reftime_frame_cb), REFTIME_FIND_PREV, NULL, NULL,},
1985     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1986 #ifdef WANT_PACKET_EDITOR
1987     {"/Edit/Edit packet",                                                       NULL,                           GTK_MENU_FUNC(edit_window_cb), 0, NULL, NULL, },
1988     {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
1989 #endif
1990     {"/Edit/_Configuration Profiles...", "<shift><control>A", GTK_MENU_FUNC(profile_dialog_cb), 0, NULL, NULL,},
1991     {"/Edit/_Preferences...", "<shift><control>P", GTK_MENU_FUNC(prefs_page_cb),
1992                              PREFS_PAGE_USER_INTERFACE, "<StockItem>", GTK_STOCK_PREFERENCES,},
1993     {"/_View", NULL, NULL, 0, "<Branch>", NULL,},
1994     {"/View/_Main Toolbar", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_MAIN_TOOLBAR, "<CheckItem>", NULL,},
1995     {"/View/_Filter Toolbar", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_FILTER_TOOLBAR, "<CheckItem>", NULL,},
1996 #ifdef HAVE_AIRPCAP
1997     {"/View/_Wireless Toolbar", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_AIRPCAP_TOOLBAR, "<CheckItem>", NULL,},
1998 #endif
1999     {"/View/_Statusbar", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_STATUSBAR, "<CheckItem>", NULL,},
2000     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2001     {"/View/Packet _List", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_PACKET_LIST, "<CheckItem>", NULL,},
2002     {"/View/Packet _Details", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_TREE_VIEW, "<CheckItem>", NULL,},
2003     {"/View/Packet _Bytes", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_BYTE_VIEW, "<CheckItem>", NULL,},
2004     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2005     {"/View/_Time Display Format", NULL, NULL, 0, "<Branch>", NULL,},
2006     {"/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", "<alt><control>1", GTK_MENU_FUNC(timestamp_format_cb),
2007                         TS_ABSOLUTE_WITH_DATE, "<RadioItem>", NULL,},
2008     {"/View/Time Display Format/Time of Day:   01:02:03.123456", "<alt><control>2", GTK_MENU_FUNC(timestamp_format_cb),
2009                         TS_ABSOLUTE, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2010     {"/View/Time Display Format/Seconds Since Epoch (1970-01-01):   1234567890.123456", "<alt><control>3", GTK_MENU_FUNC(timestamp_format_cb),
2011                         TS_EPOCH, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2012     {"/View/Time Display Format/Seconds Since Beginning of Capture:   123.123456", "<alt><control>4", GTK_MENU_FUNC(timestamp_format_cb),
2013                         TS_RELATIVE, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2014     {"/View/Time Display Format/Seconds Since Previous Captured Packet:   1.123456", "<alt><control>5", GTK_MENU_FUNC(timestamp_format_cb),
2015                         TS_DELTA, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2016     {"/View/Time Display Format/Seconds Since Previous Displayed Packet:   1.123456", "<alt><control>6", GTK_MENU_FUNC(timestamp_format_cb),
2017                         TS_DELTA_DIS, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2018     {"/View/Time Display Format/UTC Date and Time of Day:   1970-01-01 01:02:03.123456", "<alt><control>7", GTK_MENU_FUNC(timestamp_format_cb),
2019                         TS_UTC_WITH_DATE, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2020     {"/View/Time Display Format/UTC Time of Day:   01:02:03.123456", "<alt><control>8", GTK_MENU_FUNC(timestamp_format_cb),
2021                         TS_UTC, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
2022     {"/View/Time Display Format/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2023     {"/View/Time Display Format/Automatic (File Format Precision)", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2024                         TS_PREC_AUTO, "<RadioItem>", NULL,},
2025     {"/View/Time Display Format/Seconds:   0", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2026                         TS_PREC_FIXED_SEC, "/View/Time Display Format/Automatic (File Format Precision)", NULL,},
2027     {"/View/Time Display Format/Deciseconds:   0.1", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2028                         TS_PREC_FIXED_DSEC, "/View/Time Display Format/Automatic (File Format Precision)", NULL,},
2029     {"/View/Time Display Format/Centiseconds:   0.12", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2030                         TS_PREC_FIXED_CSEC, "/View/Time Display Format/Automatic (File Format Precision)", NULL,},
2031     {"/View/Time Display Format/Milliseconds:   0.123", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2032                         TS_PREC_FIXED_MSEC, "/View/Time Display Format/Automatic (File Format Precision)", NULL,},
2033     {"/View/Time Display Format/Microseconds:   0.123456", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2034                         TS_PREC_FIXED_USEC, "/View/Time Display Format/Automatic (File Format Precision)", NULL,},
2035     {"/View/Time Display Format/Nanoseconds:   0.123456789", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
2036                         TS_PREC_FIXED_NSEC, "/View/Time Display Format/Automatic (File Format Precision)", NULL,},
2037     {"/View/Time Display Format/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2038     {"/View/Time Display Format/Display Seconds with hours and minutes", "<alt><control>0", GTK_MENU_FUNC(timestamp_seconds_time_cb), 0, "<CheckItem>", NULL,},
2039     {"/View/Name Resol_ution", NULL, NULL, 0, "<Branch>", NULL,},
2040     {"/View/Name Resolution/_Resolve Name", NULL, GTK_MENU_FUNC(resolve_name_cb), 0, NULL, NULL,},
2041     {"/View/Name Resolution/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2042     {"/View/Name Resolution/Enable for _MAC Layer", NULL, GTK_MENU_FUNC(name_resolution_cb), RESOLV_MAC, "<CheckItem>", NULL,},
2043     {"/View/Name Resolution/Enable for _Network Layer", NULL, GTK_MENU_FUNC(name_resolution_cb), RESOLV_NETWORK, "<CheckItem>", NULL,},
2044     {"/View/Name Resolution/Enable for _Transport Layer", NULL, GTK_MENU_FUNC(name_resolution_cb), RESOLV_TRANSPORT, "<CheckItem>", NULL,},
2045     {"/View/Colorize Packet List", NULL, colorize_cb, 0, "<CheckItem>", NULL,},
2046 #ifdef HAVE_LIBPCAP
2047     {"/View/Auto Scroll in Li_ve Capture", NULL, GTK_MENU_FUNC(auto_scroll_live_cb), 0, "<CheckItem>", NULL,},
2048 #endif
2049     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2050     {"/View/_Zoom In", "<control>plus", GTK_MENU_FUNC(view_zoom_in_cb),
2051                              0, "<StockItem>", GTK_STOCK_ZOOM_IN,},
2052     {"/View/Zoom _Out", "<control>minus", GTK_MENU_FUNC(view_zoom_out_cb),
2053                              0, "<StockItem>", GTK_STOCK_ZOOM_OUT,},
2054     {"/View/_Normal Size", "<control>equal", GTK_MENU_FUNC(view_zoom_100_cb),
2055                              0, "<StockItem>", GTK_STOCK_ZOOM_100,},
2056     {"/View/Resize All Columns", "<shift><control>R", GTK_MENU_FUNC(new_packet_list_resize_columns_cb),
2057                        0, "<StockItem>", WIRESHARK_STOCK_RESIZE_COLUMNS,},
2058     {"/View/Displayed Columns", NULL, NULL, 0, NULL, NULL,},
2059     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2060     {"/View/E_xpand Subtrees", "<shift>Right", GTK_MENU_FUNC(expand_tree_cb), 0, NULL, NULL,},
2061     {"/View/_Expand All", "<control>Right", GTK_MENU_FUNC(expand_all_cb),
2062                        0, NULL, NULL,},
2063     {"/View/Collapse _All", "<control>Left", GTK_MENU_FUNC(collapse_all_cb),
2064                        0, NULL, NULL,},
2065     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2066     {"/View/Colorize Conversation", NULL, NULL, 0, "<Branch>",NULL,},
2067     {"/View/Colorize Conversation/Color 1", "<control>1",
2068                        GTK_MENU_FUNC(colorize_conversation_cb), 1*256, "<StockItem>", WIRESHARK_STOCK_COLOR1,},
2069     {"/View/Colorize Conversation/Color 2", "<control>2",
2070                        GTK_MENU_FUNC(colorize_conversation_cb), 2*256, "<StockItem>", WIRESHARK_STOCK_COLOR2,},
2071     {"/View/Colorize Conversation/Color 3", "<control>3",
2072                        GTK_MENU_FUNC(colorize_conversation_cb), 3*256, "<StockItem>", WIRESHARK_STOCK_COLOR3,},
2073     {"/View/Colorize Conversation/Color 4", "<control>4",
2074                        GTK_MENU_FUNC(colorize_conversation_cb), 4*256, "<StockItem>", WIRESHARK_STOCK_COLOR4,},
2075     {"/View/Colorize Conversation/Color 5", "<control>5",
2076                        GTK_MENU_FUNC(colorize_conversation_cb), 5*256, "<StockItem>", WIRESHARK_STOCK_COLOR5,},
2077     {"/View/Colorize Conversation/Color 6", "<control>6",
2078                        GTK_MENU_FUNC(colorize_conversation_cb), 6*256, "<StockItem>", WIRESHARK_STOCK_COLOR6,},
2079     {"/View/Colorize Conversation/Color 7", "<control>7",
2080                        GTK_MENU_FUNC(colorize_conversation_cb), 7*256, "<StockItem>", WIRESHARK_STOCK_COLOR7,},
2081     {"/View/Colorize Conversation/Color 8", "<control>8",
2082                        GTK_MENU_FUNC(colorize_conversation_cb), 8*256, "<StockItem>", WIRESHARK_STOCK_COLOR8,},
2083     {"/View/Colorize Conversation/Color 9", "<control>9",
2084                        GTK_MENU_FUNC(colorize_conversation_cb), 9*256, "<StockItem>", WIRESHARK_STOCK_COLOR9,},
2085     {"/View/Colorize Conversation/Color 10", "<control>0",
2086                        GTK_MENU_FUNC(colorize_conversation_cb), 10*256, "<StockItem>", WIRESHARK_STOCK_COLOR0,},
2087     {"/View/Colorize Conversation/<separator>", NULL,
2088                        NULL, 0, "<Separator>",NULL,},
2089     {"/View/Colorize Conversation/New Coloring Rule...", NULL,
2090                        GTK_MENU_FUNC(colorize_conversation_cb), 0, "<StockItem>", GTK_STOCK_SELECT_COLOR,},
2091     {"/View/Reset Coloring 1-10", "<control>space",
2092                        GTK_MENU_FUNC(colorize_conversation_cb), 255*256, NULL, NULL,},
2093     {"/View/_Coloring Rules...", NULL, color_display_cb,
2094                        0, "<StockItem>", GTK_STOCK_SELECT_COLOR,},
2095     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2096
2097
2098     {"/View/Show Packet in New _Window", NULL,
2099                        GTK_MENU_FUNC(new_window_cb), 0, NULL, NULL,},
2100     {"/View/_Reload", "<control>R", GTK_MENU_FUNC(file_reload_cmd_cb),
2101                              0, "<StockItem>", GTK_STOCK_REFRESH,},
2102     {"/_Go", NULL, NULL, 0, "<Branch>", NULL,},
2103     {"/Go/_Back", "<alt>Left",
2104                              GTK_MENU_FUNC(history_back_cb), 0, "<StockItem>", GTK_STOCK_GO_BACK,},
2105     {"/Go/_Forward", "<alt>Right",
2106                              GTK_MENU_FUNC(history_forward_cb), 0, "<StockItem>", GTK_STOCK_GO_FORWARD,},
2107     {"/Go/_Go to Packet...", "<control>G",
2108                              GTK_MENU_FUNC(goto_frame_cb), 0, "<StockItem>", GTK_STOCK_JUMP_TO,},
2109     {"/Go/Go to _Corresponding Packet", NULL, GTK_MENU_FUNC(goto_framenum_cb),
2110                        0, NULL, NULL,},
2111     {"/Go/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2112     {"/Go/Previous Packet", "<control>Up",
2113                              GTK_MENU_FUNC(goto_previous_frame_cb), 0, "<StockItem>", GTK_STOCK_GO_UP,},
2114     {"/Go/Next Packet", "<control>Down",
2115                              GTK_MENU_FUNC(goto_next_frame_cb), 0, "<StockItem>", GTK_STOCK_GO_DOWN,},
2116     {"/Go/F_irst Packet", "<control>Home",
2117                              GTK_MENU_FUNC(goto_top_frame_cb), 0, "<StockItem>", GTK_STOCK_GOTO_TOP,},
2118     {"/Go/_Last Packet", "<control>End",
2119                              GTK_MENU_FUNC(goto_bottom_frame_cb), 0, "<StockItem>", GTK_STOCK_GOTO_BOTTOM,},
2120     {"/Go/Previous Packet In Conversation", "<control>comma",
2121                              GTK_MENU_FUNC(goto_previous_frame_conversation_cb), 0, NULL, NULL,},
2122     {"/Go/Next Packet In Conversation", "<control>period",
2123                              GTK_MENU_FUNC(goto_next_frame_conversation_cb), 0, NULL, NULL,},
2124 #ifdef HAVE_LIBPCAP
2125     {"/_Capture", NULL, NULL, 0, "<Branch>", NULL,},
2126     {"/Capture/_Interfaces...", "<control>I",
2127                              GTK_MENU_FUNC(capture_if_cb), 0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_INTERFACES,},
2128     {"/Capture/_Options...", "<control>K",
2129                              GTK_MENU_FUNC(capture_prep_cb), 0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_OPTIONS,},
2130     {"/Capture/_Start", "<control>E",
2131                              GTK_MENU_FUNC(capture_start_cb), 0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_START,},
2132     {"/Capture/S_top", "<control>E", GTK_MENU_FUNC(capture_stop_cb),
2133                              0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_STOP,},
2134     {"/Capture/_Restart", "<control>R", GTK_MENU_FUNC(capture_restart_cb),
2135                              0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_RESTART,},
2136     {"/Capture/Capture _Filters...", NULL, GTK_MENU_FUNC(cfilter_dialog_cb),
2137                        0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_FILTER,},
2138 #endif /* HAVE_LIBPCAP */
2139     {"/_Analyze", NULL, NULL, 0, "<Branch>", NULL,},
2140     {"/Analyze/_Display Filters...", NULL, GTK_MENU_FUNC(dfilter_dialog_cb),
2141                        0, "<StockItem>", WIRESHARK_STOCK_DISPLAY_FILTER,},
2142     {"/Analyze/Display Filter _Macros...", NULL, GTK_MENU_FUNC(macros_dialog_cb), 0, NULL, NULL,},
2143     {"/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2144     {"/Analyze/Apply as Column", NULL, GTK_MENU_FUNC(apply_as_custom_column_cb), 0, NULL, NULL},
2145     {"/Analyze/Appl_y as Filter", NULL, NULL, 0, "<Branch>", NULL,},
2146     {"/Analyze/Apply as Filter/_Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2147                        MATCH_SELECTED_REPLACE|MATCH_SELECTED_APPLY_NOW, NULL, NULL,},
2148     {"/Analyze/Apply as Filter/_Not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2149                        MATCH_SELECTED_NOT|MATCH_SELECTED_APPLY_NOW, NULL, NULL,},
2150     {"/Analyze/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " _and Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2151                        MATCH_SELECTED_AND|MATCH_SELECTED_APPLY_NOW, NULL, NULL,},
2152     {"/Analyze/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " _or Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2153                        MATCH_SELECTED_OR|MATCH_SELECTED_APPLY_NOW, NULL, NULL,},
2154     {"/Analyze/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " a_nd not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2155                        MATCH_SELECTED_AND_NOT|MATCH_SELECTED_APPLY_NOW, NULL, NULL,},
2156     {"/Analyze/Apply as Filter/" UTF8_HORIZONTAL_ELLIPSIS " o_r not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2157                        MATCH_SELECTED_OR_NOT|MATCH_SELECTED_APPLY_NOW, NULL, NULL,},
2158     {"/Analyze/_Prepare a Filter", NULL, NULL, 0, "<Branch>", NULL,},
2159     {"/Analyze/Prepare a Filter/_Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2160                        MATCH_SELECTED_REPLACE, NULL, NULL,},
2161     {"/Analyze/Prepare a Filter/_Not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2162                        MATCH_SELECTED_NOT, NULL, NULL,},
2163     {"/Analyze/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " _and Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2164                        MATCH_SELECTED_AND, NULL, NULL,},
2165     {"/Analyze/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " _or Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2166                        MATCH_SELECTED_OR, NULL, NULL,},
2167     {"/Analyze/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " a_nd not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2168                        MATCH_SELECTED_AND_NOT, NULL, NULL,},
2169     {"/Analyze/Prepare a Filter/" UTF8_HORIZONTAL_ELLIPSIS " o_r not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
2170                        MATCH_SELECTED_OR_NOT, NULL, NULL,},
2171     {"/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2172     {"/Analyze/_Enabled Protocols...", "<shift><control>E", GTK_MENU_FUNC(proto_cb),
2173                        0, "<StockItem>", WIRESHARK_STOCK_CHECKBOX,},
2174     {"/Analyze/Decode _As...", NULL, GTK_MENU_FUNC(decode_as_cb),
2175                        0, "<StockItem>", WIRESHARK_STOCK_DECODE_AS,},
2176     {"/Analyze/_User Specified Decodes...", NULL,
2177                        GTK_MENU_FUNC(decode_show_cb), 0, "<StockItem>", WIRESHARK_STOCK_DECODE_AS,},
2178     {"/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2179     {"/Analyze/_Follow TCP Stream", NULL,
2180                        GTK_MENU_FUNC(follow_tcp_stream_cb), 0, NULL, NULL,},
2181     {"/Analyze/_Follow UDP Stream", NULL,
2182                        GTK_MENU_FUNC(follow_udp_stream_cb), 0, NULL, NULL,},
2183     {"/Analyze/_Follow SSL Stream", NULL,
2184                        GTK_MENU_FUNC(follow_ssl_stream_cb), 0, NULL, NULL,},
2185     {"/_Statistics", NULL, NULL, 0, "<Branch>", NULL,},
2186     {"/Statistics/_Summary", NULL, GTK_MENU_FUNC(summary_open_cb), 0, "<StockItem>", GTK_STOCK_PROPERTIES,},
2187     {"/Statistics/_Protocol Hierarchy", NULL,
2188                        GTK_MENU_FUNC(proto_hier_stats_cb), 0, NULL, NULL,},
2189     {"/Statistics/Conversations", NULL,
2190                        GTK_MENU_FUNC(init_conversation_notebook_cb), 0, "<StockItem>", WIRESHARK_STOCK_CONVERSATIONS,},
2191     {"/Statistics/Endpoints", NULL,
2192                        GTK_MENU_FUNC(init_hostlist_notebook_cb), 0, "<StockItem>", WIRESHARK_STOCK_ENDPOINTS,},
2193     {"/Telephon_y", NULL, NULL, 0, "<Branch>", NULL,},
2194     {"/_Tools", NULL, NULL, 0, "<Branch>", NULL,},
2195     {"/Tools/Firewall ACL Rules", NULL,
2196                        firewall_rule_cb, 0, NULL, NULL,},
2197     {"/_Internals", NULL, NULL, 0, "<Branch>", NULL,},
2198     {"/Internals/_Dissector tables", NULL, GTK_MENU_FUNC(dissector_tables_dlg_cb), 0, NULL, NULL,},
2199     {"/Internals/_Supported Protocols (slow!)", NULL, GTK_MENU_FUNC(supported_cb), 0, NULL, NULL,},
2200     {"/_Help", NULL, NULL, 0, "<Branch>", NULL,},
2201     {"/Help/_Contents", "F1", GTK_MENU_FUNC(topic_menu_cb), HELP_CONTENT, "<StockItem>", GTK_STOCK_HELP,},
2202     {"/Help/Manual Pages", NULL, NULL, 0, "<Branch>", NULL,},
2203     {"/Help/Manual Pages/Wireshark", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_WIRESHARK, NULL, NULL,},
2204     {"/Help/Manual Pages/Wireshark Filter", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_WIRESHARK_FILTER, NULL, NULL,},
2205     {"/Help/Manual Pages/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2206     {"/Help/Manual Pages/TShark", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_TSHARK, NULL, NULL,},
2207     {"/Help/Manual Pages/RawShark", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_RAWSHARK, NULL, NULL,},
2208     {"/Help/Manual Pages/Dumpcap", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_DUMPCAP, NULL, NULL,},
2209     {"/Help/Manual Pages/Mergecap", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_MERGECAP, NULL, NULL,},
2210     {"/Help/Manual Pages/Editcap", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_EDITCAP, NULL, NULL,},
2211     {"/Help/Manual Pages/Text2pcap", NULL, GTK_MENU_FUNC(topic_menu_cb), LOCALPAGE_MAN_TEXT2PCAP, NULL, NULL,},
2212     {"/Help/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2213     {"/Help/Website", NULL, GTK_MENU_FUNC(topic_menu_cb), ONLINEPAGE_HOME, "<StockItem>", GTK_STOCK_HOME,},
2214     {"/Help/FAQ's", NULL, GTK_MENU_FUNC(topic_menu_cb), ONLINEPAGE_FAQ, NULL, NULL,},
2215     {"/Help/Downloads", NULL, GTK_MENU_FUNC(topic_menu_cb), ONLINEPAGE_DOWNLOAD, NULL, NULL,},
2216     {"/Help/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2217     {"/Help/Wiki", NULL, GTK_MENU_FUNC(topic_menu_cb), ONLINEPAGE_WIKI, "<StockItem>", WIRESHARK_STOCK_WIKI,},
2218     {"/Help/Sample Captures", NULL, GTK_MENU_FUNC(topic_menu_cb), ONLINEPAGE_SAMPLE_FILES, NULL, NULL,},
2219     {"/Help/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
2220     {"/Help/_About Wireshark", NULL, GTK_MENU_FUNC(about_wireshark_cb),
2221                        0, "<StockItem>", WIRESHARK_STOCK_ABOUT}
2222 };
2223
2224 /* calculate the number of menu_items */
2225 static int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
2226 #endif /* MAIN_MENU_USE_UIMANAGER */
2227
2228
2229 static void
2230 select_bytes_view_cb (GtkRadioAction *action, GtkRadioAction *current _U_, gpointer user_data _U_)
2231 {
2232         gint value;
2233
2234         value = gtk_radio_action_get_current_value (action);
2235         /* Fix me */
2236         select_bytes_view( NULL, NULL, value);
2237 }
2238
2239 static void
2240 sort_ascending_cb(GtkAction *action _U_, gpointer user_data)
2241 {
2242         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortAscending");
2243         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_SORT_ASCENDING);
2244 }
2245
2246 static void
2247 sort_descending_cb(GtkAction *action _U_, gpointer user_data)
2248 {
2249         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortDescending");
2250         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_SORT_DESCENDING);
2251 }
2252
2253 static void
2254 no_sorting_cb(GtkAction *action _U_, gpointer user_data)
2255 {
2256         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/NoSorting");
2257         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_SORT_NONE);
2258 }
2259
2260 static void
2261 packet_list_heading_show_resolved_cb(GtkAction *action _U_, gpointer user_data _U_)
2262 {
2263         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ShowResolved");
2264
2265         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_TOGGLE_RESOLVED);
2266 }
2267
2268 static void
2269 packet_list_heading_align_left_cb(GtkAction *action _U_, gpointer user_data)
2270 {
2271         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/AlignLeft");
2272         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_ALIGN_LEFT);
2273 }
2274
2275 static void
2276 packet_list_heading_align_center_cb(GtkAction *action _U_, gpointer user_data)
2277 {
2278         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/AlignCenter");
2279         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_ALIGN_CENTER);
2280 }
2281
2282 static void
2283 packet_list_heading_align_right_cb(GtkAction *action _U_, gpointer user_data)
2284 {
2285         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/AlignRight");
2286         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_ALIGN_RIGHT);
2287 }
2288
2289 static void
2290 packet_list_heading_col_pref_cb(GtkAction *action _U_, gpointer user_data)
2291 {
2292         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ColumnPreferences");
2293         prefs_page_cb( widget , user_data, PREFS_PAGE_COLUMNS);
2294 }
2295
2296 static void
2297 packet_list_heading_resize_col_cb(GtkAction *action _U_, gpointer user_data)
2298 {
2299         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ResizeColumn");
2300         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_RESIZE);
2301 }
2302
2303 static void
2304 packet_list_heading_change_col_cb(GtkAction *action _U_, gpointer user_data)
2305 {
2306         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/EditColumnDetails");
2307         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_CHANGE);
2308 }
2309
2310 static void
2311 packet_list_heading_activate_all_columns_cb(GtkAction *action _U_, gpointer user_data _U_)
2312 {
2313         new_packet_list_set_all_columns_visible ();
2314 }
2315
2316 static void
2317 packet_list_heading_hide_col_cb(GtkAction *action _U_, gpointer user_data)
2318 {
2319         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/HideColumn");
2320         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_HIDE);
2321 }
2322
2323 static void
2324 packet_list_heading_remove_col_cb(GtkAction *action _U_, gpointer user_data)
2325 {
2326         GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/RemoveColumn");
2327         new_packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_REMOVE);
2328 }
2329
2330 static void
2331 packet_list_menu_set_ref_time_cb(GtkAction *action _U_, gpointer user_data)
2332 {
2333         reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_TOGGLE);
2334 }
2335
2336
2337 static void
2338 packet_list_menu_apply_selected_cb(GtkAction *action _U_, gpointer user_data)
2339 {
2340         match_selected_plist_cb( NULL /* widget _U_ */, user_data, MATCH_SELECTED_REPLACE|MATCH_SELECTED_APPLY_NOW);
2341 }
2342
2343 static void
2344 packet_list_menu_apply_not_selected_cb(GtkAction *action _U_, gpointer user_data)
2345 {
2346         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_NOT|MATCH_SELECTED_APPLY_NOW);
2347 }
2348
2349 static void
2350 packet_list_menu_apply_and_selected_cb(GtkAction *action _U_, gpointer user_data)
2351 {
2352         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_AND|MATCH_SELECTED_APPLY_NOW);
2353 }
2354
2355 static void
2356 packet_list_menu_apply_or_selected_cb(GtkAction *action _U_, gpointer user_data)
2357 {
2358         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_OR|MATCH_SELECTED_APPLY_NOW);
2359 }
2360
2361 static void
2362 packet_list_menu_apply_and_not_selected_cb(GtkAction *action _U_, gpointer user_data)
2363 {
2364         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_AND_NOT|MATCH_SELECTED_APPLY_NOW);
2365 }
2366
2367 static void
2368 packet_list_menu_apply_or_not_selected_cb(GtkAction *action _U_, gpointer user_data)
2369 {
2370         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data,MATCH_SELECTED_OR_NOT|MATCH_SELECTED_APPLY_NOW);
2371 }
2372 /* Prepare a filter */
2373 static void
2374 packet_list_menu_prepare_selected_cb(GtkAction *action _U_, gpointer user_data)
2375 {
2376         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_REPLACE);
2377 }
2378
2379 static void
2380 packet_list_menu_prepare_not_selected_cb(GtkAction *action _U_, gpointer user_data)
2381 {
2382         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_NOT);
2383 }
2384
2385 static void
2386 packet_list_menu_prepare_and_selected_cb(GtkAction *action _U_, gpointer user_data)
2387 {
2388         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_AND);
2389 }
2390
2391 static void
2392 packet_list_menu_prepare_or_selected_cb(GtkAction *action _U_, gpointer user_data)
2393 {
2394         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_OR);
2395 }
2396
2397 static void
2398 packet_list_menu_prepare_and_not_selected_cb(GtkAction *action _U_, gpointer user_data)
2399 {
2400         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_AND_NOT);
2401 }
2402
2403 static void
2404 packet_list_menu_prepare_or_not_selected_cb(GtkAction *action _U_, gpointer user_data)
2405 {
2406         match_selected_plist_cb(  NULL /* widget _U_ */ , user_data, MATCH_SELECTED_OR_NOT);
2407 }
2408
2409 static void
2410 packet_list_menu_conversation_ethernet_cb(GtkAction *action, gpointer user_data)
2411 {
2412         conversation_cb(  action, user_data, CONV_ETHER);
2413 }
2414
2415 static void
2416 packet_list_menu_conversation_ip_cb(GtkAction *action _U_, gpointer user_data)
2417 {
2418         conversation_cb( action, user_data, CONV_IP);
2419 }
2420
2421 static void
2422 packet_list_menu_conversation_tcp_cb(GtkAction *action _U_, gpointer user_data)
2423 {
2424         conversation_cb(  action, user_data, CONV_TCP);
2425 }
2426
2427 static void
2428 packet_list_menu_conversation_udp_cb(GtkAction *action _U_, gpointer user_data)
2429 {
2430         conversation_cb(  action, user_data, CONV_UDP);
2431 }
2432
2433 static void
2434 packet_list_menu_conversation_pn_cba_cb(GtkAction *action _U_, gpointer user_data)
2435 {
2436         conversation_cb(  action, user_data, CONV_CBA);
2437 }
2438
2439 /* Ethernet */
2440
2441 static void
2442 packet_list_menu_color_conv_ethernet_color1_cb(GtkAction *action _U_, gpointer user_data)
2443 {
2444         colorize_conversation_cb( NULL /* widget _U_ */, user_data, CONV_ETHER+1*256);
2445 }
2446
2447 static void
2448 packet_list_menu_color_conv_ethernet_color2_cb(GtkAction *action _U_, gpointer user_data)
2449 {
2450         colorize_conversation_cb( NULL/* widget _U_ */ , user_data, CONV_ETHER+1*256);
2451 }
2452
2453 static void
2454 packet_list_menu_color_conv_ethernet_color3_cb(GtkAction *action _U_, gpointer user_data)
2455 {
2456         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+3*256);
2457 }
2458
2459 static void
2460 packet_list_menu_color_conv_ethernet_color4_cb(GtkAction *action _U_, gpointer user_data)
2461 {
2462         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+4*256);
2463 }
2464
2465 static void
2466 packet_list_menu_color_conv_ethernet_color5_cb(GtkAction *action _U_, gpointer user_data)
2467 {
2468         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+5*256);
2469 }
2470
2471 static void
2472 packet_list_menu_color_conv_ethernet_color6_cb(GtkAction *action _U_, gpointer user_data)
2473 {
2474         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+6*256);
2475 }
2476
2477 static void
2478 packet_list_menu_color_conv_ethernet_color7_cb(GtkAction *action _U_, gpointer user_data)
2479 {
2480         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+7*256);
2481 }
2482
2483 static void
2484 packet_list_menu_color_conv_ethernet_color8_cb(GtkAction *action _U_, gpointer user_data)
2485 {
2486         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+8*256);
2487 }
2488
2489 static void
2490 packet_list_menu_color_conv_ethernet_color9_cb(GtkAction *action _U_, gpointer user_data)
2491 {
2492         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+9*256);
2493 }
2494
2495 static void
2496 packet_list_menu_color_conv_ethernet_color10_cb(GtkAction *action _U_, gpointer user_data)
2497 {
2498         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER+10*256);
2499 }
2500
2501 static void
2502 packet_list_menu_color_conv_ethernet_new_rule_cb(GtkAction *action _U_, gpointer user_data)
2503 {
2504         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_ETHER);
2505 }
2506
2507 /* IP */
2508
2509 static void
2510 packet_list_menu_color_conv_ip_color1_cb(GtkAction *action _U_, gpointer user_data)
2511 {
2512         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+1*256);
2513 }
2514
2515 static void
2516 packet_list_menu_color_conv_ip_color2_cb(GtkAction *action _U_, gpointer user_data)
2517 {
2518         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+1*256);
2519 }
2520
2521 static void
2522 packet_list_menu_color_conv_ip_color3_cb(GtkAction *action _U_, gpointer user_data)
2523 {
2524         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+3*256);
2525 }
2526
2527 static void
2528 packet_list_menu_color_conv_ip_color4_cb(GtkAction *action _U_, gpointer user_data)
2529 {
2530         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+4*256);
2531 }
2532
2533 static void
2534 packet_list_menu_color_conv_ip_color5_cb(GtkAction *action _U_, gpointer user_data)
2535 {
2536         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+5*256);
2537 }
2538
2539 static void
2540 packet_list_menu_color_conv_ip_color6_cb(GtkAction *action _U_, gpointer user_data)
2541 {
2542         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+6*256);
2543 }
2544
2545 static void
2546 packet_list_menu_color_conv_ip_color7_cb(GtkAction *action _U_, gpointer user_data)
2547 {
2548         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+7*256);
2549 }
2550
2551 static void
2552 packet_list_menu_color_conv_ip_color8_cb(GtkAction *action _U_, gpointer user_data)
2553 {
2554         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+8*256);
2555 }
2556
2557 static void
2558 packet_list_menu_color_conv_ip_color9_cb(GtkAction *action _U_, gpointer user_data)
2559 {
2560         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+9*256);
2561 }
2562
2563 static void
2564 packet_list_menu_color_conv_ip_color10_cb(GtkAction *action _U_, gpointer user_data)
2565 {
2566         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_IP+10*256);
2567 }
2568
2569 static void
2570 packet_list_menu_color_conv_ip_new_rule_cb(GtkAction *action _U_, gpointer user_data)
2571 {
2572         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP);
2573 }
2574
2575 /* TCP */
2576
2577 static void
2578 packet_list_menu_color_conv_tcp_color1_cb(GtkAction *action _U_, gpointer user_data)
2579 {
2580         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+1*256);
2581 }
2582
2583 static void
2584 packet_list_menu_color_conv_tcp_color2_cb(GtkAction *action _U_, gpointer user_data)
2585 {
2586         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+1*256);
2587 }
2588
2589 static void
2590 packet_list_menu_color_conv_tcp_color3_cb(GtkAction *action _U_, gpointer user_data)
2591 {
2592         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+3*256);
2593 }
2594
2595 static void
2596 packet_list_menu_color_conv_tcp_color4_cb(GtkAction *action _U_, gpointer user_data)
2597 {
2598         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+4*256);
2599 }
2600
2601 static void
2602 packet_list_menu_color_conv_tcp_color5_cb(GtkAction *action _U_, gpointer user_data)
2603 {
2604         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+5*256);
2605 }
2606
2607 static void
2608 packet_list_menu_color_conv_tcp_color6_cb(GtkAction *action _U_, gpointer user_data)
2609 {
2610         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+6*256);
2611 }
2612
2613 static void
2614 packet_list_menu_color_conv_tcp_color7_cb(GtkAction *action _U_, gpointer user_data)
2615 {
2616         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+7*256);
2617 }
2618
2619 static void
2620 packet_list_menu_color_conv_tcp_color8_cb(GtkAction *action _U_, gpointer user_data)
2621 {
2622         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+8*256);
2623 }
2624
2625 static void
2626 packet_list_menu_color_conv_tcp_color9_cb(GtkAction *action _U_, gpointer user_data)
2627 {
2628         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+9*256);
2629 }
2630
2631 static void
2632 packet_list_menu_color_conv_tcp_color10_cb(GtkAction *action _U_, gpointer user_data)
2633 {
2634         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP+10*256);
2635 }
2636
2637 static void
2638 packet_list_menu_color_conv_tcp_new_rule_cb(GtkAction *action _U_, gpointer user_data)
2639 {
2640         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_TCP);
2641 }
2642
2643 /* UDP */
2644
2645 static void
2646 packet_list_menu_color_conv_udp_color1_cb(GtkAction *action _U_, gpointer user_data)
2647 {
2648         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+1*256);
2649 }
2650
2651 static void
2652 packet_list_menu_color_conv_udp_color2_cb(GtkAction *action _U_, gpointer user_data)
2653 {
2654         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+1*256);
2655 }
2656
2657 static void
2658 packet_list_menu_color_conv_udp_color3_cb(GtkAction *action _U_, gpointer user_data)
2659 {
2660         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+3*256);
2661 }
2662
2663 static void
2664 packet_list_menu_color_conv_udp_color4_cb(GtkAction *action _U_, gpointer user_data)
2665 {
2666         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+4*256);
2667 }
2668
2669 static void
2670 packet_list_menu_color_conv_udp_color5_cb(GtkAction *action _U_, gpointer user_data)
2671 {
2672         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+5*256);
2673 }
2674
2675 static void
2676 packet_list_menu_color_conv_udp_color6_cb(GtkAction *action _U_, gpointer user_data)
2677 {
2678         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+6*256);
2679 }
2680
2681 static void
2682 packet_list_menu_color_conv_udp_color7_cb(GtkAction *action _U_, gpointer user_data)
2683 {
2684         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+7*256);
2685 }
2686
2687 static void
2688 packet_list_menu_color_conv_udp_color8_cb(GtkAction *action _U_, gpointer user_data)
2689 {
2690         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+8*256);
2691 }
2692
2693 static void
2694 packet_list_menu_color_conv_udp_color9_cb(GtkAction *action _U_, gpointer user_data)
2695 {
2696         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+9*256);
2697 }
2698
2699 static void
2700 packet_list_menu_color_conv_udp_color10_cb(GtkAction *action _U_, gpointer user_data)
2701 {
2702         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP+10*256);
2703 }
2704
2705 static void
2706 packet_list_menu_color_conv_udp_new_rule_cb(GtkAction *action _U_, gpointer user_data)
2707 {
2708         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_UDP);
2709 }
2710
2711 /* CONV_CBA */
2712
2713 static void
2714 packet_list_menu_color_conv_cba_color1_cb(GtkAction *action _U_, gpointer user_data)
2715 {
2716         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+1*256);
2717 }
2718
2719 static void
2720 packet_list_menu_color_conv_cba_color2_cb(GtkAction *action _U_, gpointer user_data)
2721 {
2722         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+1*256);
2723 }
2724
2725 static void
2726 packet_list_menu_color_conv_cba_color3_cb(GtkAction *action _U_, gpointer user_data)
2727 {
2728         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+3*256);
2729 }
2730
2731 static void
2732 packet_list_menu_color_conv_cba_color4_cb(GtkAction *action _U_, gpointer user_data)
2733 {
2734         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+4*256);
2735 }
2736
2737 static void
2738 packet_list_menu_color_conv_cba_color5_cb(GtkAction *action _U_, gpointer user_data)
2739 {
2740         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+5*256);
2741 }
2742
2743 static void
2744 packet_list_menu_color_conv_cba_color6_cb(GtkAction *action _U_, gpointer user_data)
2745 {
2746         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+6*256);
2747 }
2748
2749 static void
2750 packet_list_menu_color_conv_cba_color7_cb(GtkAction *action _U_, gpointer user_data)
2751 {
2752         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+7*256);
2753 }
2754
2755 static void
2756 packet_list_menu_color_conv_cba_color8_cb(GtkAction *action _U_, gpointer user_data)
2757 {
2758         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+8*256);
2759 }
2760
2761 static void
2762 packet_list_menu_color_conv_cba_color9_cb(GtkAction *action _U_, gpointer user_data)
2763 {
2764         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+9*256);
2765 }
2766
2767 static void
2768 packet_list_menu_color_conv_cba_color10_cb(GtkAction *action _U_, gpointer user_data)
2769 {
2770         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA+10*256);
2771 }
2772
2773 static void
2774 packet_list_menu_color_conv_cba_new_rule_cb(GtkAction *action _U_, gpointer user_data)
2775 {
2776         colorize_conversation_cb( NULL /* widget _U_ */ , user_data, CONV_CBA);
2777 }
2778
2779 static void
2780 packet_list_menu_copy_sum_txt(GtkAction *action _U_, gpointer user_data)
2781 {
2782         new_packet_list_copy_summary_cb( NULL /* widget _U_ */ , user_data, CS_TEXT);
2783 }
2784
2785 static void
2786 packet_list_menu_copy_sum_csv(GtkAction *action _U_, gpointer user_data)
2787 {
2788         new_packet_list_copy_summary_cb( NULL /* widget _U_ */ , user_data, CS_CSV);
2789 }
2790
2791 static void
2792 packet_list_menu_copy_as_flt(GtkAction *action _U_, gpointer user_data)
2793 {
2794         match_selected_plist_cb( NULL /* widget _U_ */ , user_data, MATCH_SELECTED_REPLACE|MATCH_SELECTED_COPY_ONLY);
2795 }
2796
2797 static void
2798 packet_list_menu_copy_bytes_oht_cb(GtkAction *action _U_, gpointer user_data)
2799 {
2800         copy_hex_cb( NULL /* widget _U_ */ , user_data,  CD_ALLINFO | CD_FLAGS_SELECTEDONLY);
2801 }
2802
2803 static void
2804 packet_list_menu_copy_bytes_oh_cb(GtkAction *action _U_, gpointer user_data)
2805 {
2806         copy_hex_cb( NULL /* widget _U_ */ , user_data, CD_HEXCOLUMNS | CD_FLAGS_SELECTEDONLY);
2807 }
2808
2809 static void
2810 packet_list_menu_copy_bytes_text_cb(GtkAction *action _U_, gpointer user_data)
2811 {
2812         copy_hex_cb( NULL /* widget _U_ */ , user_data, CD_TEXTONLY | CD_FLAGS_SELECTEDONLY);
2813 }
2814
2815 static void
2816 packet_list_menu_copy_bytes_hex_strm_cb(GtkAction *action _U_, gpointer user_data)
2817 {
2818         copy_hex_cb( NULL /* widget _U_ */ , user_data,  CD_HEX | CD_FLAGS_SELECTEDONLY);
2819 }
2820
2821 static void
2822 packet_list_menu_copy_bytes_bin_strm_cb(GtkAction *action _U_, gpointer user_data)
2823 {
2824         copy_hex_cb( NULL /* widget _U_ */ , user_data, CD_BINARY | CD_FLAGS_SELECTEDONLY);
2825 }
2826
2827 /* tree */
2828
2829 static void
2830 tree_view_menu_color_with_flt_color1_cb(GtkAction *action _U_, gpointer user_data)
2831 {
2832         colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 1);
2833 }
2834