aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/capture_file_dlg.c19
-rw-r--r--ui/gtk/drag_and_drop.c2
-rw-r--r--ui/gtk/export_pdu_dlg.c2
-rw-r--r--ui/gtk/file_import_dlg.c2
-rw-r--r--ui/gtk/gsm_map_summary.c2
-rw-r--r--ui/gtk/mtp3_summary.c2
-rw-r--r--ui/gtk/summary_dlg.c4
7 files changed, 17 insertions, 16 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c
index 72e7e79194..76690c1f9b 100644
--- a/ui/gtk/capture_file_dlg.c
+++ b/ui/gtk/capture_file_dlg.c
@@ -162,7 +162,7 @@ preview_set_filename(GtkWidget *prev, const gchar *cf_name)
gtk_label_set_text(GTK_LABEL(label), string_buff);
/* type */
- g_strlcpy(string_buff, wtap_file_type_string(wtap_file_type(wth)), PREVIEW_STR_MAX);
+ g_strlcpy(string_buff, wtap_file_type_subtype_string(wtap_file_type_subtype(wth)), PREVIEW_STR_MAX);
label = (GtkWidget *)g_object_get_data(G_OBJECT(prev), PREVIEW_FORMAT_KEY);
gtk_label_set_text(GTK_LABEL(label), string_buff);
@@ -1483,7 +1483,7 @@ set_file_type_list(GtkWidget *combo_box, capture_file *cf,
gboolean must_support_all_comments)
{
guint32 required_comment_types;
- GArray *savable_file_types;
+ GArray *savable_file_types_subtypes;
guint i;
int ft;
int default_ft = -1;
@@ -1495,22 +1495,23 @@ set_file_type_list(GtkWidget *combo_box, capture_file *cf,
required_comment_types = 0; /* none of them */
/* What types of file can we save this file as? */
- savable_file_types = wtap_get_savable_file_types(cf->cd_t, cf->linktypes,
- required_comment_types);
+ savable_file_types_subtypes = wtap_get_savable_file_types_subtypes(cf->cd_t,
+ cf->linktypes,
+ required_comment_types);
- if (savable_file_types != NULL) {
+ if (savable_file_types_subtypes != NULL) {
/* OK, we have at least one file type we can save this file as.
(If we didn't, we shouldn't have gotten here in the first
place.) Add them all to the combo box. */
- for (i = 0; i < savable_file_types->len; i++) {
- ft = g_array_index(savable_file_types, int, i);
+ for (i = 0; i < savable_file_types_subtypes->len; i++) {
+ ft = g_array_index(savable_file_types_subtypes, int, i);
if (default_ft == -1)
default_ft = ft; /* first file type is the default */
ws_combo_box_append_text_and_pointer(GTK_COMBO_BOX(combo_box),
- wtap_file_type_string(ft),
+ wtap_file_type_subtype_string(ft),
GINT_TO_POINTER(ft));
}
- g_array_free(savable_file_types, TRUE);
+ g_array_free(savable_file_types_subtypes, TRUE);
}
return default_ft;
diff --git a/ui/gtk/drag_and_drop.c b/ui/gtk/drag_and_drop.c
index cb12955316..93e438a698 100644
--- a/ui/gtk/drag_and_drop.c
+++ b/ui/gtk/drag_and_drop.c
@@ -215,7 +215,7 @@ dnd_open_file_cmd(gchar *cf_names_freeme)
/* merge the files in chronological order */
tmpname = NULL;
if (cf_merge_files(&tmpname, in_file_count, in_filenames,
- WTAP_FILE_PCAP, FALSE) == CF_OK) {
+ WTAP_FILE_TYPE_SUBTYPE_PCAP, FALSE) == CF_OK) {
/* Merge succeeded; close the currently-open file and try
to open the merged capture file. */
cf_close(&cfile);
diff --git a/ui/gtk/export_pdu_dlg.c b/ui/gtk/export_pdu_dlg.c
index a8799a7dc7..046bd5483e 100644
--- a/ui/gtk/export_pdu_dlg.c
+++ b/ui/gtk/export_pdu_dlg.c
@@ -180,7 +180,7 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data)
g_array_append_val(idb_inf->interface_data, int_data);
- exp_pdu_tap_data->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_PCAPNG, WTAP_ENCAP_WIRESHARK_UPPER_PDU, WTAP_MAX_PACKET_SIZE, FALSE, shb_hdr, idb_inf, &err);
+ exp_pdu_tap_data->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_TYPE_SUBTYPE_PCAPNG, WTAP_ENCAP_WIRESHARK_UPPER_PDU, WTAP_MAX_PACKET_SIZE, FALSE, shb_hdr, idb_inf, &err);
if (exp_pdu_tap_data->wdh == NULL) {
open_failure_alert_box(capfile_name, err, TRUE);
goto end;
diff --git a/ui/gtk/file_import_dlg.c b/ui/gtk/file_import_dlg.c
index 68990f4f7d..0ab5a4c5c6 100644
--- a/ui/gtk/file_import_dlg.c
+++ b/ui/gtk/file_import_dlg.c
@@ -516,7 +516,7 @@ file_import_open(text_import_info_t *info)
g_array_append_val(idb_inf->interface_data, int_data);
- info->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_PCAPNG, info->encapsulation, info->max_frame_length, FALSE, shb_hdr, idb_inf, &err);
+ info->wdh = wtap_dump_fdopen_ng(import_file_fd, WTAP_FILE_TYPE_SUBTYPE_PCAPNG, info->encapsulation, info->max_frame_length, FALSE, shb_hdr, idb_inf, &err);
if (info->wdh == NULL) {
open_failure_alert_box(capfile_name, err, TRUE);
fclose(info->import_text_file);
diff --git a/ui/gtk/gsm_map_summary.c b/ui/gtk/gsm_map_summary.c
index c3fdcf5c30..8635083838 100644
--- a/ui/gtk/gsm_map_summary.c
+++ b/ui/gtk/gsm_map_summary.c
@@ -114,7 +114,7 @@ void gsm_map_stat_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_)
add_string_to_box(string_buff, file_box);
/* format */
- g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", wtap_file_type_string(summary.file_type));
+ g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", wtap_file_type_subtype_string(summary.file_type));
add_string_to_box(string_buff, file_box);
if (summary.has_snap) {
diff --git a/ui/gtk/mtp3_summary.c b/ui/gtk/mtp3_summary.c
index ed3ff11d57..72686c16c2 100644
--- a/ui/gtk/mtp3_summary.c
+++ b/ui/gtk/mtp3_summary.c
@@ -316,7 +316,7 @@ mtp3_sum_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_)
add_string_to_box(string_buff, file_box);
/* format */
- file_type = wtap_file_type_string(summary.file_type);
+ file_type = wtap_file_type_subtype_string(summary.file_type);
g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", (file_type ? file_type : "N/A"));
add_string_to_box(string_buff, file_box);
diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c
index 4b706eb394..8941976739 100644
--- a/ui/gtk/summary_dlg.c
+++ b/ui/gtk/summary_dlg.c
@@ -269,7 +269,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
/* format */
g_snprintf(string_buff, SUM_STR_MAX, "%s%s",
- wtap_file_type_string(summary.file_type),
+ wtap_file_type_subtype_string(summary.file_type),
summary.iscompressed? " (gzip compressed)" : "");
add_string_to_grid(grid, &row, "Format:", string_buff);
@@ -716,7 +716,7 @@ summary_to_texbuff(GtkTextBuffer *buffer)
/* format */
g_snprintf(string_buff, SUM_STR_MAX, INDENT "Format: %s%s",
- wtap_file_type_string(summary.file_type),
+ wtap_file_type_subtype_string(summary.file_type),
summary.iscompressed? " (gzip compressed)\n" : "\n");
gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1);