From 17a8522cb63c9f61992b05a6a65981af0b0453c8 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Mon, 10 Sep 2012 19:48:16 +0000 Subject: update the expert info entries after a packet comment was modified the packet comment window can be opened from the expert infos by clicking on a comment, when a comment is modified in this way, we have to cf_retap_packets() to update the expert infos window https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7690 svn path=/trunk/; revision=44852 --- ui/gtk/edit_packet_comment_dlg.c | 2 ++ ui/gtk/expert_comp_dlg.c | 6 ++++++ ui/gtk/expert_comp_dlg.h | 1 + 3 files changed, 9 insertions(+) diff --git a/ui/gtk/edit_packet_comment_dlg.c b/ui/gtk/edit_packet_comment_dlg.c index 020696f8bd..19ba870234 100644 --- a/ui/gtk/edit_packet_comment_dlg.c +++ b/ui/gtk/edit_packet_comment_dlg.c @@ -40,6 +40,7 @@ #include "ui/simple_dialog.h" #include "ui/gtk/dlg_utils.h" +#include "ui/gtk/expert_comp_dlg.h" #include "ui/gtk/gui_utils.h" #include "ui/gtk/help_dlg.h" #include "ui/gtk/main.h" @@ -67,6 +68,7 @@ pkt_comment_text_buff_ok_cb(GtkWidget *w _U_, GtkWidget *view) /*g_warning("The new comment is '%s'",new_packet_comment);*/ packet_list_update_packet_comment(new_packet_comment); + expert_comp_packet_comment_updated(); window_destroy(edit_or_add_pkt_comment_dlg); diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c index 3448522fdf..2535cf42e2 100644 --- a/ui/gtk/expert_comp_dlg.c +++ b/ui/gtk/expert_comp_dlg.c @@ -962,3 +962,9 @@ register_tap_listener_expert_comp(void) register_stat_cmd_arg("expert_comp", expert_comp_init,NULL); } +void +expert_comp_packet_comment_updated(void) +{ + if (expert_comp_dlg_w) + cf_retap_packets(&cfile); +} diff --git a/ui/gtk/expert_comp_dlg.h b/ui/gtk/expert_comp_dlg.h index 5021a117ba..d7a9240af9 100644 --- a/ui/gtk/expert_comp_dlg.h +++ b/ui/gtk/expert_comp_dlg.h @@ -26,5 +26,6 @@ #define __EXPERT_COMP_DLG_H__ void expert_comp_dlg_launch(void); +void expert_comp_packet_comment_updated(void); #endif /* __EXPERT_COMP_DLG_H__ */ -- cgit v1.2.3