diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-02-12 14:56:06 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-02-12 14:56:06 +0000 |
commit | f78145ca9f8d404ea1fc6cfc724ac7556135cef3 (patch) | |
tree | c8f5c9c05825709a09d9bbfdf3613756e25bd28d | |
parent | c36b0f1b0375db5ef69c5cfd8b2a77d95cff3feb (diff) |
Add the edit packet comment menu entry and the empty files
to actually handel the menu to edit the comments.
svn path=/trunk/; revision=40980
-rw-r--r-- | ui/gtk/CMakeLists.txt | 1 | ||||
-rw-r--r-- | ui/gtk/Makefile.common | 1 | ||||
-rw-r--r-- | ui/gtk/edit_packet_comment_dlg.c | 59 | ||||
-rw-r--r-- | ui/gtk/edit_packet_comment_dlg.h | 30 | ||||
-rw-r--r-- | ui/gtk/main_menubar.c | 7 |
5 files changed, 96 insertions, 2 deletions
diff --git a/ui/gtk/CMakeLists.txt b/ui/gtk/CMakeLists.txt index 5ca9e7ffda..6cbe7a8f76 100644 --- a/ui/gtk/CMakeLists.txt +++ b/ui/gtk/CMakeLists.txt @@ -42,6 +42,7 @@ set(WIRESHARK_GTK_SRC dissector_tables_dlg.c dlg_utils.c drag_and_drop.c + edit_packet_comment_dlg.c expert_comp_table.c export_object.c export_object_dicom.c diff --git a/ui/gtk/Makefile.common b/ui/gtk/Makefile.common index 945e469ccd..6d024e2feb 100644 --- a/ui/gtk/Makefile.common +++ b/ui/gtk/Makefile.common @@ -70,6 +70,7 @@ WIRESHARK_GTK_SRC = \ dissector_tables_dlg.c \ dlg_utils.c \ drag_and_drop.c \ + edit_packet_comment_dlg.c \ expert_comp_table.c \ export_object.c \ export_object_dicom.c \ diff --git a/ui/gtk/edit_packet_comment_dlg.c b/ui/gtk/edit_packet_comment_dlg.c new file mode 100644 index 0000000000..3ab76a8561 --- /dev/null +++ b/ui/gtk/edit_packet_comment_dlg.c @@ -0,0 +1,59 @@ +/* edit_packet_comment_dlg.c + * Dialog box for editing or adding packet comments. + * + * $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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#include <string.h> + +#include <gtk/gtk.h> + +#include "ui/simple_dialog.h" + +#include "ui/gtk/dlg_utils.h" +#include "ui/gtk/gui_utils.h" +#include "ui/gtk/help_dlg.h" +#include "ui/gtk/main.h" +#include "ui/gtk/menus.h" +#include "ui/gtk/edit_packet_comment_dlg.h" +#include "ui/gtk/old-gtk-compat.h" + +GtkWidget *edit_or_add_pkt_comment_dlg = NULL; + + + +void +edit_packet_comment_dlg (GtkAction *action _U_, gpointer data) +{ + + GtkWidget *dialog = simple_dialog (ESD_TYPE_ERROR, ESD_BTN_OK, + "Not implemented yet"); + + + +} diff --git a/ui/gtk/edit_packet_comment_dlg.h b/ui/gtk/edit_packet_comment_dlg.h new file mode 100644 index 0000000000..9cba910908 --- /dev/null +++ b/ui/gtk/edit_packet_comment_dlg.h @@ -0,0 +1,30 @@ +/* edit_packet_comment_dlg.h + * Dialog box for editing or adding packet comments. + * + * $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 __EDIT_PACKET_COMMENTS_H__ +#define __EDIT_PACKET_COMMENTS_H__ + +void edit_packet_comment_dlg (GtkAction *action, gpointer data); + +#endif /* __EDIT_PACKET_COMMENTS_H__ */ diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index d574d8223d..0b6aaf4543 100644 --- a/ui/gtk/main_menubar.c +++ b/ui/gtk/main_menubar.c @@ -105,6 +105,7 @@ #include "ui/gtk/utf8_entities.h" #include "ui/gtk/expert_comp_dlg.h" #include "ui/gtk/time_shift_dlg.h" +#include "ui/gtk/edit_packet_comment_dlg.h" #include "ui/gtk/new_packet_list.h" @@ -1551,7 +1552,7 @@ static const GtkActionEntry main_menu_bar_entries[] = { { "/Edit/Un-TimeReferenceAllPackets",NULL, "Un-Time Reference All Packets", "<alt><control>T", NULL, G_CALLBACK(new_packet_list_untime_reference_all_frames_cb) }, { "/Edit/FindNextTimeReference", NULL, "Find Next Time Reference", "<alt><control>N", NULL, G_CALLBACK(find_next_ref_time_cb) }, { "/Edit/FindPreviousTimeReference", NULL, "Find Previous Time Reference", "<alt><control>B", NULL, G_CALLBACK(find_previous_ref_time_cb) }, - { "/Edit/TimeShift", WIRESHARK_STOCK_TIME, "Time Shift...", "<shift><control>T", NULL, G_CALLBACK(time_shift_cb) }, + { "/Edit/TimeShift", WIRESHARK_STOCK_TIME, "Time Shift...", "<shift><control>T", NULL, G_CALLBACK(time_shift_cb) }, { "/Edit/ConfigurationProfiles", NULL, "_Configuration Profiles...", "<shift><control>A", NULL, G_CALLBACK(profile_dialog_cb) }, { "/Edit/Preferences", GTK_STOCK_PREFERENCES, "_Preferences...", "<shift><control>P", NULL, G_CALLBACK(menus_prefs_cb) }, @@ -2603,6 +2604,7 @@ static const char *ui_desc_packet_list_menu_popup = " <menuitem name='IgnorePacket' action='/IgnorePacket'/>\n" " <menuitem name='SetTimeReference' action='/Set Time Reference'/>\n" " <menuitem name='TimeShift' action='/TimeShift'/>\n" +" <menuitem name='AddEditPktComment' action='/Edit/AddEditPktComment'/>\n" " <separator/>\n" " <menuitem name='ManuallyResolveAddress' action='/ManuallyResolveAddress'/>\n" " <separator/>\n" @@ -2729,9 +2731,10 @@ static const GtkActionEntry packet_list_menu_popup_action_entries[] = { { "/MarkPacket", NULL, "Mark Packet (toggle)", NULL, NULL, G_CALLBACK(new_packet_list_mark_frame_cb) }, { "/IgnorePacket", NULL, "Ignore Packet (toggle)", NULL, NULL, G_CALLBACK(new_packet_list_ignore_frame_cb) }, { "/Set Time Reference", WIRESHARK_STOCK_TIME, "Set Time Reference (toggle)", NULL, NULL, G_CALLBACK(packet_list_menu_set_ref_time_cb) }, - { "/TimeShift", WIRESHARK_STOCK_TIME, "Time Shift...", NULL, NULL, G_CALLBACK(time_shift_cb) }, + { "/TimeShift", WIRESHARK_STOCK_TIME, "Time Shift...", NULL, NULL, G_CALLBACK(time_shift_cb) }, { "/ManuallyResolveAddress", NULL, "Manually Resolve Address", NULL, NULL, G_CALLBACK(manual_addr_resolv_dlg) }, { "/Apply as Filter", NULL, "Apply as Filter", NULL, NULL, NULL }, + { "/Edit/AddEditPktComment", WIRESHARK_STOCK_EDIT, "Edit or Add packet Comment", NULL, NULL, G_CALLBACK(edit_packet_comment_dlg) }, { "/Apply as Filter/Selected", NULL, "_Selected" , NULL, NULL, G_CALLBACK(packet_list_menu_apply_selected_cb) }, { "/Apply as Filter/Not Selected", NULL, "_Not Selected", NULL, NULL, G_CALLBACK(packet_list_menu_apply_not_selected_cb) }, |