From cdc01b89bf07a5df072d6d0410c4920f857feab7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 16 Jul 2017 20:37:32 -0700 Subject: Rename section comment get/set routines. Rename cf_read_shb_comment() to cf_read_section_comment(); an SHB is a record type in a particular capture file format (pcapng), and not all files that have per-file or per-file-section comments have something called a Section Header Block. Rename cf_update_capture_comment() to cf_update_section_comment(); pcapng, at least, supports multiple sections, although we don't curently support that. This also gives them matching names. Change-Id: Idd8cb0f0fd9125b9626411274aebfb1ec0097665 Reviewed-on: https://code.wireshark.org/review/22659 Reviewed-by: Guy Harris --- ui/gtk/edit_packet_comment_dlg.c | 4 ++-- ui/gtk/main_statusbar.c | 2 +- ui/gtk/summary_dlg.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ui/gtk') diff --git a/ui/gtk/edit_packet_comment_dlg.c b/ui/gtk/edit_packet_comment_dlg.c index fb315e3513..95caa6cc83 100644 --- a/ui/gtk/edit_packet_comment_dlg.c +++ b/ui/gtk/edit_packet_comment_dlg.c @@ -80,7 +80,7 @@ capture_comment_text_buff_ok_cb(GtkWidget *w _U_, GtkWidget *view) new_capture_comment = gtk_text_buffer_get_text (buffer, &start_iter, &end_iter, FALSE /* whether to include invisible text */); /*g_warning("The new comment is '%s'",new_capture_comment);*/ - cf_update_capture_comment(&cfile, new_capture_comment); + cf_update_section_comment(&cfile, new_capture_comment); /* Update the main window as appropriate */ main_update_for_unsaved_changes(&cfile); @@ -209,7 +209,7 @@ edit_capture_comment_dlg_launch (GtkAction *action _U_, gpointer data _U_) gtk_box_pack_start(GTK_BOX (vbox), scroll, TRUE, TRUE, 0); /* Get the comment */ - comment_str = cf_read_shb_comment(&cfile); + comment_str = cf_read_section_comment(&cfile); if(comment_str != NULL){ gtk_text_buffer_set_text (buffer, comment_str, -1); } diff --git a/ui/gtk/main_statusbar.c b/ui/gtk/main_statusbar.c index 53a36c7a16..4974a25e83 100644 --- a/ui/gtk/main_statusbar.c +++ b/ui/gtk/main_statusbar.c @@ -721,7 +721,7 @@ status_capture_comment_update(void) status_capture_comment_hide(FALSE); - comment_str = cf_read_shb_comment(&cfile); + comment_str = cf_read_section_comment(&cfile); /* *comment_str==0x0 -> comment exists, but it's empty */ if(comment_str!=NULL && *comment_str!=0x0){ diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c index e219f6648f..0dbe3a1e93 100644 --- a/ui/gtk/summary_dlg.c +++ b/ui/gtk/summary_dlg.c @@ -141,7 +141,7 @@ summary_ok_cb(GtkWidget *w _U_, GtkWidget *view) new_comment = gtk_text_buffer_get_text (buffer, &start_iter, &end_iter, FALSE /* whether to include invisible text */); - cf_update_capture_comment(&cfile, new_comment); + cf_update_section_comment(&cfile, new_comment); /* Update the main window */ main_update_for_unsaved_changes(&cfile); -- cgit v1.2.3