Add the edit packet comment menu entry and the empty files
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 12 Feb 2012 14:56:06 +0000 (14:56 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 12 Feb 2012 14:56:06 +0000 (14:56 +0000)
to actually handel the menu to edit the comments.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40980 f5534014-38df-0310-8fa8-9805f1628bb7

ui/gtk/CMakeLists.txt
ui/gtk/Makefile.common
ui/gtk/edit_packet_comment_dlg.c [new file with mode: 0644]
ui/gtk/edit_packet_comment_dlg.h [new file with mode: 0644]
ui/gtk/main_menubar.c

index 5ca9e7ffda09ead21912a7f9a1dea0a965c2ed46..6cbe7a8f760c1998ba33b2475494b13db82550f1 100644 (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
index 945e469ccdc0555c26e772f3bf4ea2a08b684001..6d024e2feb9e8a1cb087f8a223e6bac241ba21e9 100644 (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   \
diff --git a/ui/gtk/edit_packet_comment_dlg.c b/ui/gtk/edit_packet_comment_dlg.c
new file mode 100644 (file)
index 0000000..3ab76a8
--- /dev/null
@@ -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 (file)
index 0000000..9cba910
--- /dev/null
@@ -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__ */
index d574d8223df68874fef4d6d285b84494f35f6816..0b6aaf45430a64b203dac219388c5b8d237f53e5 100644 (file)
 #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) },