summaryrefslogtreecommitdiff
path: root/ui/gtk/edit_packet_comment_dlg.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-01 20:59:38 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-01 20:59:38 +0000
commit08eb36b5af5da365087ea19194a0a00bd1310ce2 (patch)
treebc8a0b2ba1a0816c79a164025e72873a4cbab715 /ui/gtk/edit_packet_comment_dlg.c
parent6c5e16185dfd4c9e955618f56ac8827ad7eda9e7 (diff)
downloadwireshark-08eb36b5af5da365087ea19194a0a00bd1310ce2.tar.gz
Remove fdata->opt_comment, add pkt_comment to pinfo
Original (read from file) comments can be accessed by pkthdr->opt_comment Keep user comments in seperated BST, add new method for epan session to get it. svn path=/trunk/; revision=51090
Diffstat (limited to 'ui/gtk/edit_packet_comment_dlg.c')
-rw-r--r--ui/gtk/edit_packet_comment_dlg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/gtk/edit_packet_comment_dlg.c b/ui/gtk/edit_packet_comment_dlg.c
index 71652e7096..9cffb6cb67 100644
--- a/ui/gtk/edit_packet_comment_dlg.c
+++ b/ui/gtk/edit_packet_comment_dlg.c
@@ -109,8 +109,7 @@ edit_packet_comment_dlg (GtkAction *action _U_, gpointer data _U_)
GtkWidget *bbox;
GtkWidget *ok_bt, *cancel_bt, *help_bt;
GtkTextBuffer *buffer;
- const gchar *opt_comment;
- gchar *buf_str;
+ gchar *opt_comment;
edit_or_add_pkt_comment_dlg = dlg_window_new ("Edit or Add Packet Comments");
gtk_widget_set_size_request (edit_or_add_pkt_comment_dlg, 500, 160);
@@ -138,9 +137,8 @@ edit_packet_comment_dlg (GtkAction *action _U_, gpointer data _U_)
/*g_warning("Fetched comment '%s'",opt_comment);*/
if(opt_comment){
- buf_str = g_strdup_printf("%s", opt_comment);
- gtk_text_buffer_set_text (buffer, buf_str, -1);
- g_free(buf_str);
+ gtk_text_buffer_set_text(buffer, opt_comment, -1);
+ g_free(opt_comment);
}
/* Button row. */