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
This commit is contained in:
Anders Broman 2012-02-12 14:56:06 +00:00
parent c36b0f1b03
commit f78145ca9f
5 changed files with 96 additions and 2 deletions

View File

@ -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

View File

@ -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 \

View File

@ -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");
}

View File

@ -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__ */

View File

@ -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) },