aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/capture_file_dlg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gtk/capture_file_dlg.c')
-rw-r--r--ui/gtk/capture_file_dlg.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c
index 573057d6d8..cabbd712e3 100644
--- a/ui/gtk/capture_file_dlg.c
+++ b/ui/gtk/capture_file_dlg.c
@@ -1291,7 +1291,6 @@ static check_savability_t
check_save_with_comments(capture_file *cf)
{
guint32 comment_types;
- GArray *savable_file_types;
GtkWidget *msg_dialog;
gint response;
@@ -1307,11 +1306,7 @@ check_save_with_comments(capture_file *cf)
/* No. Are there formats in which we can write this file that
supports all the comments in this file? */
- savable_file_types = wtap_get_savable_file_types(cf->cd_t, cf->linktypes,
- comment_types);
- if (savable_file_types != NULL) {
- g_array_free(savable_file_types, TRUE);
-
+ if (wtap_dump_can_write(cf->linktypes, comment_types)) {
/* Yes. Offer the user a choice of "Save in a format that
supports comments", "Discard comments and save in the
file's own format", or "Cancel", meaning "don't bother
@@ -1577,7 +1572,6 @@ static check_savability_t
gtk_check_save_as_with_comments(GtkWidget *w, capture_file *cf, int file_type)
{
guint32 comment_types;
- GArray *savable_file_types;
GtkWidget *msg_dialog;
gint response;
@@ -1593,11 +1587,7 @@ gtk_check_save_as_with_comments(GtkWidget *w, capture_file *cf, int file_type)
/* No. Are there formats in which we can write this file that
supports all the comments in this file? */
- savable_file_types = wtap_get_savable_file_types(file_type, cf->linktypes,
- comment_types);
- if (savable_file_types != NULL) {
- g_array_free(savable_file_types, TRUE);
-
+ if (wtap_dump_can_write(cf->linktypes, comment_types)) {
/* Yes. Offer the user a choice of "Save in a format that
supports comments", "Discard comments and save in the
format you selected", or "Cancel", meaning "don't bother