aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2008-04-12 19:18:26 +0000
committerUlf Lamping <ulf.lamping@web.de>2008-04-12 19:18:26 +0000
commitb51da2eb7784da6bbfba376d52fc11402baa6b3b (patch)
tree6026e43fcf3f5403aea5661b530b02c617f00246
parentd147ebbd2ecd065af346ed2693aef507cb06d981 (diff)
rename menu -> main_menu
remove old (and unused and confusing) ../menu.h svn path=/trunk/; revision=24947
-rw-r--r--gtk/Makefile.am2
-rw-r--r--gtk/Makefile.common2
-rw-r--r--gtk/capture_dlg.c4
-rw-r--r--gtk/capture_file_dlg.c2
-rw-r--r--gtk/drag_and_drop.c2
-rw-r--r--gtk/fileset_dlg.c2
-rw-r--r--gtk/main.c3
-rw-r--r--gtk/main.h2
-rw-r--r--gtk/main_menu.c (renamed from gtk/menu.c)9
-rw-r--r--gtk/main_menu.h (renamed from gtk/menu.h)36
-rw-r--r--gtk/main_toolbar.c2
-rw-r--r--gtk/nameres_prefs.c2
-rw-r--r--gtk/packet_history.c2
-rw-r--r--gtk/packet_list.c2
-rw-r--r--gtk/packet_win.c2
-rw-r--r--gtk/proto_draw.c2
-rw-r--r--gtk/recent.c2
-rw-r--r--gtk/uat_gui.c1
-rw-r--r--gtk/win32-file-dlg.c2
-rw-r--r--menu.h64
20 files changed, 51 insertions, 94 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 89a821d4f4..24ba41f2b6 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -89,10 +89,10 @@ noinst_HEADERS = \
layout_prefs.h \
macros_dlg.h \
main.h \
+ main_menu.h \
main_statusbar.h \
main_toolbar.h \
main_welcome.h \
- menu.h \
mtp3_stat.h \
nameres_prefs.h \
packet_history.h \
diff --git a/gtk/Makefile.common b/gtk/Makefile.common
index 24bcf76d5b..11f4efd9c2 100644
--- a/gtk/Makefile.common
+++ b/gtk/Makefile.common
@@ -82,10 +82,10 @@ WIRESHARK_GTK_SRC = \
layout_prefs.c \
macros_dlg.c \
main.c \
+ main_menu.c \
main_statusbar.c \
main_toolbar.c \
main_welcome.c \
- menu.c \
nameres_prefs.c \
packet_history.c \
packet_list.c \
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index 6a2892aba9..0f17aec1e3 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -34,14 +34,14 @@
#include <string.h>
#include <gtk/gtk.h>
-#include <stdio.h> /* menu.h needs FILE */
-#include <gtk/menu.h>
+#include <stdio.h> /* main_menu.h needs FILE XXX - true?*/
#include <epan/packet.h>
#include "capture.h"
#include "globals.h"
#include <epan/addr_resolv.h>
#include "main.h"
+#include "main_menu.h"
#include "gui_utils.h"
#include "capture_dlg.h"
#include "capture_errs.h"
diff --git a/gtk/capture_file_dlg.c b/gtk/capture_file_dlg.c
index 0b17c5fceb..fd7b61d1e5 100644
--- a/gtk/capture_file_dlg.c
+++ b/gtk/capture_file_dlg.c
@@ -41,12 +41,12 @@
#include "gui_utils.h"
#include "alert_box.h"
#include "simple_dialog.h"
-#include "menu.h"
#include "dlg_utils.h"
#include "file_dlg.h"
#include "capture_file_dlg.h"
#include "drag_and_drop.h"
#include "main.h"
+#include "main_menu.h"
#include <epan/prefs.h>
#include "recent.h"
#include "color.h"
diff --git a/gtk/drag_and_drop.c b/gtk/drag_and_drop.c
index 69634c980f..1aa5dba51c 100644
--- a/gtk/drag_and_drop.c
+++ b/gtk/drag_and_drop.c
@@ -37,11 +37,11 @@
#include "gtkglobals.h"
#include "util.h"
#include "capture_file_dlg.h"
-#include "../menu.h"
#include "file.h"
#include "simple_dialog.h"
#include "drag_and_drop.h"
#include "main.h"
+#include "main_menu.h"
#ifdef HAVE_LIBPCAP
#include "capture.h"
#endif
diff --git a/gtk/fileset_dlg.c b/gtk/fileset_dlg.c
index 77c4a1d568..979de59c81 100644
--- a/gtk/fileset_dlg.c
+++ b/gtk/fileset_dlg.c
@@ -43,7 +43,7 @@
#include "dlg_utils.h"
#include "main.h"
-#include "menu.h"
+#include "main_menu.h"
#include "help_dlg.h"
#include <epan/filesystem.h>
diff --git a/gtk/main.c b/gtk/main.c
index 33e2df929a..221b6de04e 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -126,12 +126,11 @@
#include "color_dlg.h"
#include "main.h"
+#include "main_menu.h"
#include "main_statusbar.h"
#include "main_toolbar.h"
#include "main_welcome.h"
-#include "menu.h"
#include "../main_window.h"
-#include "../menu.h"
#include "drag_and_drop.h"
#include "capture_file_dlg.h"
#include <epan/column.h>
diff --git a/gtk/main.h b/gtk/main.h
index be01352966..6d53b39b60 100644
--- a/gtk/main.h
+++ b/gtk/main.h
@@ -37,7 +37,7 @@
digraph main_dependencies {
node [shape=record, fontname=Helvetica, fontsize=10];
main [ label="main window" URL="\ref main.h"];
- menu [ label="menubar" URL="\ref menu.h"];
+ menu [ label="menubar" URL="\ref main_menu.h"];
toolbar [ label="toolbar" URL="\ref toolbar.h"];
packet_list [ label="packet list pane" URL="\ref packet_list.h"];
proto_draw [ label="packet details & bytes panes" URL="\ref proto_draw.h"];
diff --git a/gtk/menu.c b/gtk/main_menu.c
index 3070fc8c09..0e33a841bd 100644
--- a/gtk/menu.c
+++ b/gtk/main_menu.c
@@ -1,5 +1,5 @@
-/* menu.c
- * Menu routines
+/* main_menu.c
+ * Main menu routines
*
* $Id$
*
@@ -31,10 +31,11 @@
#include <string.h>
#include "main.h"
+#include "main_menu.h"
#include "main_toolbar.h"
-#include "menu.h"
#include "../stat_menu.h"
#include "gui_stat_menu.h"
+
#include <epan/packet.h>
#include <epan/addr_resolv.h>
#include <epan/prefs.h>
@@ -72,7 +73,6 @@
#include "stock_icons.h"
#include "gtkglobals.h"
#include "register.h"
-#include "../menu.h"
#include "packet_list.h"
#include "recent.h"
#include "../ui_util.h"
@@ -86,7 +86,6 @@
#include "firewall_dlg.h"
#include "u3.h"
#include "macros_dlg.h"
-
#include "export_object.h"
diff --git a/gtk/menu.h b/gtk/main_menu.h
index a72489fe92..c0503b093d 100644
--- a/gtk/menu.h
+++ b/gtk/main_menu.h
@@ -1,5 +1,5 @@
-/* menu.h
- * Menu definitions
+/* main_menu.h
+ * Main menu definitions
*
* $Id$
*
@@ -22,13 +22,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __GTKGUIMENU_H__
-#define __GTKGUIMENU_H__
+#ifndef __MAIN_MENU_H__
+#define __MAIN_MENU_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+/* Add a new recent capture filename to the "Recent Files" submenu
+ (duplicates will be ignored) */
extern void add_menu_recent_capture_file(gchar *cf_name);
/** @file
@@ -102,8 +104,32 @@ extern void set_menus_for_file_set(gboolean file_set, gboolean previous_file, gb
/** The popup menu. */
extern GtkWidget *popup_menu_object;
+
+/* Enable or disable menu items based on whether a tree row is selected
+ and and on whether a "Match Selected" can be done. */
+void set_menus_for_selected_tree_row(capture_file *cf);
+
+
+/* Enable or disable menu items based on whether you have a capture file
+ you've finished reading and, if you have one, whether it's been saved
+ and whether it could be saved except by copying the raw packet data. */
+void set_menus_for_capture_file(capture_file *);
+
+
+/* Enable or disable menu items based on whether there's a capture in
+ progress. */
+void set_menus_for_capture_in_progress(gboolean);
+
+/* Enable or disable menu items based on whether you have some captured
+ packets. */
+void set_menus_for_captured_packets(gboolean);
+
+/* Enable or disable menu items based on whether a packet is selected. */
+void set_menus_for_selected_packet(capture_file *cf);
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* __GTKGUIMENU_H__ */
+#endif /* __MAIN_MENU_H__ */
diff --git a/gtk/main_toolbar.c b/gtk/main_toolbar.c
index 5efb7ccd9f..5b54ba1199 100644
--- a/gtk/main_toolbar.c
+++ b/gtk/main_toolbar.c
@@ -45,6 +45,7 @@
#include <epan/prefs.h>
#include "prefs_dlg.h"
#include "main.h"
+#include "main_menu.h"
#include "main_toolbar.h"
#include "help_dlg.h"
#include "gtkglobals.h"
@@ -54,7 +55,6 @@
#include "packet_history.h"
#include "packet_list.h"
#include "color_filters.h"
-#include "menu.h"
diff --git a/gtk/nameres_prefs.c b/gtk/nameres_prefs.c
index ab30e5e1ac..3f5f988251 100644
--- a/gtk/nameres_prefs.c
+++ b/gtk/nameres_prefs.c
@@ -37,7 +37,7 @@
#include "prefs_dlg.h"
#include "gui_utils.h"
#include "main.h"
-#include "menu.h"
+#include "main_menu.h"
#define M_RESOLVE_KEY "m_resolve"
#define N_RESOLVE_KEY "n_resolve"
diff --git a/gtk/packet_history.c b/gtk/packet_history.c
index 7594bf4760..1004ae65a5 100644
--- a/gtk/packet_history.c
+++ b/gtk/packet_history.c
@@ -33,7 +33,7 @@
#include "file.h"
#include "globals.h"
-#include "menu.h"
+#include "main_menu.h"
#include "packet_history.h"
diff --git a/gtk/packet_list.c b/gtk/packet_list.c
index bbb7a25dbd..782c56114a 100644
--- a/gtk/packet_list.c
+++ b/gtk/packet_list.c
@@ -37,8 +37,8 @@
#include "../ui_util.h"
#include "gui_utils.h"
#include "main.h"
+#include "main_menu.h"
#include "main_statusbar.h"
-#include "menu.h"
#include "colors.h"
#include <epan/column.h>
#include "epan/column_info.h"
diff --git a/gtk/packet_win.c b/gtk/packet_win.c
index 2e840d1c98..fbc1712447 100644
--- a/gtk/packet_win.c
+++ b/gtk/packet_win.c
@@ -50,8 +50,6 @@
#include "summary.h"
#include "file.h"
#include <epan/prefs.h>
-#include "menu.h"
-#include "../menu.h"
#include <epan/column.h>
#include "print.h"
#include <epan/addr_resolv.h>
diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c
index 0fff1c6d50..de7870995d 100644
--- a/gtk/proto_draw.c
+++ b/gtk/proto_draw.c
@@ -49,9 +49,9 @@
#include "isprint.h"
#include "main.h"
+#include "main_menu.h"
#include <epan/packet.h>
#include <epan/charsets.h>
-#include "menu.h"
#include "keys.h"
#include <epan/prefs.h>
diff --git a/gtk/recent.c b/gtk/recent.c
index 15ef58643f..36e39217b6 100644
--- a/gtk/recent.c
+++ b/gtk/recent.c
@@ -35,8 +35,8 @@
#include "recent.h"
#include <epan/epan.h>
#include <epan/filesystem.h>
-#include "menu.h"
#include "main.h"
+#include "main_menu.h"
#include <epan/prefs.h>
#include <epan/prefs-int.h>
#include "gui_utils.h"
diff --git a/gtk/uat_gui.c b/gtk/uat_gui.c
index ec27701315..672bd55250 100644
--- a/gtk/uat_gui.c
+++ b/gtk/uat_gui.c
@@ -51,7 +51,6 @@
#include "gui_utils.h"
#include "dlg_utils.h"
#include "help_dlg.h"
-#include "menu.h"
#include "stock_icons.h"
#include <epan/proto.h>
#include <epan/packet.h>
diff --git a/gtk/win32-file-dlg.c b/gtk/win32-file-dlg.c
index 39bfaf2b69..f9e07f7240 100644
--- a/gtk/win32-file-dlg.c
+++ b/gtk/win32-file-dlg.c
@@ -59,7 +59,7 @@
#include "file_dlg.h"
#include "capture_file_dlg.h"
#include "main.h"
-#include "menu.h"
+#include "main_menu.h"
#include "drag_and_drop.h"
#if 0
#include "dlg_utils.h"
diff --git a/menu.h b/menu.h
deleted file mode 100644
index 686834addc..0000000000
--- a/menu.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* menu.h
- * Definitions for menu routines with toolkit-independent APIs but
- * toolkit-dependent implementations.
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __MENU_H__
-#define __MENU_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/* Add a new recent capture filename to the "Recent Files" submenu
- (duplicates will be ignored) */
-void add_menu_recent_capture_file(gchar *file);
-
-/* Routines to enable or disable sets of menu items. */
-
-/* Enable or disable menu items based on whether you have a capture file
- you've finished reading and, if you have one, whether it's been saved
- and whether it could be saved except by copying the raw packet data. */
-void set_menus_for_capture_file(capture_file *);
-
-/* Enable or disable menu items based on whether there's a capture in
- progress. */
-void set_menus_for_capture_in_progress(gboolean);
-
-/* Enable or disable menu items based on whether you have some captured
- packets. */
-void set_menus_for_captured_packets(gboolean);
-
-/* Enable or disable menu items based on whether a packet is selected. */
-void set_menus_for_selected_packet(capture_file *cf);
-
-/* Enable or disable menu items based on whether a tree row is selected
- and and on whether a "Match Selected" can be done. */
-void set_menus_for_selected_tree_row(capture_file *cf);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __MENU_H__ */