aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-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
-rw-r--r--ui/qt/capture_file_dialog.cpp20
-rw-r--r--ui/qt/import_text_dialog.cpp2
-rw-r--r--ui/qt/summary_dialog.cpp4
10 files changed, 30 insertions, 29 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);
diff --git a/ui/qt/capture_file_dialog.cpp b/ui/qt/capture_file_dialog.cpp
index 2ff11b190a..6b452352ed 100644
--- a/ui/qt/capture_file_dialog.cpp
+++ b/ui/qt/capture_file_dialog.cpp
@@ -334,7 +334,7 @@ QString CaptureFileDialog::fileType(int ft, bool extension_globs)
QString filter;
GSList *extensions_list;
- filter = wtap_file_type_string(ft);
+ filter = wtap_file_type_subtype_string(ft);
if (!extension_globs) {
return filter;
@@ -672,7 +672,7 @@ int CaptureFileDialog::merge(QString &file_name) {
QStringList CaptureFileDialog::buildFileSaveAsTypeList(bool must_support_all_comments) {
QStringList filters;
guint32 required_comment_types;
- GArray *savable_file_types;
+ GArray *savable_file_types_subtypes;
guint i;
type_hash_.clear();
@@ -684,25 +684,25 @@ QStringList CaptureFileDialog::buildFileSaveAsTypeList(bool must_support_all_com
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(cap_file_->cd_t,
- cap_file_->linktypes,
- required_comment_types);
+ savable_file_types_subtypes = wtap_get_savable_file_types_subtypes(cap_file_->cd_t,
+ cap_file_->linktypes,
+ required_comment_types);
- if (savable_file_types != NULL) {
+ if (savable_file_types_subtypes != NULL) {
QString file_type;
int ft;
/* 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 */
file_type = fileType(ft);
filters << file_type;
type_hash_[file_type] = ft;
}
- g_array_free(savable_file_types, TRUE);
+ g_array_free(savable_file_types_subtypes, TRUE);
}
return filters;
@@ -777,7 +777,7 @@ void CaptureFileDialog::preview(const QString & path)
}
// Format
- preview_format_.setText(QString::fromUtf8(wtap_file_type_string(wtap_file_type(wth))));
+ preview_format_.setText(QString::fromUtf8(wtap_file_type_subtype_string(wtap_file_type_subtype(wth))));
// Size
preview_size_.setText(QString(tr("%1 bytes")).arg(wtap_file_size(wth, &err)));
diff --git a/ui/qt/import_text_dialog.cpp b/ui/qt/import_text_dialog.cpp
index eafaf80cb0..a38d19b7c8 100644
--- a/ui/qt/import_text_dialog.cpp
+++ b/ui/qt/import_text_dialog.cpp
@@ -122,7 +122,7 @@ void ImportTextDialog::convertTextFile() {
import_file_fd = create_tempfile(&tmpname, "import");
capfile_name_.append(tmpname);
- import_info_.wdh = wtap_dump_fdopen(import_file_fd, WTAP_FILE_PCAP, import_info_.encapsulation, import_info_.max_frame_length, FALSE, &err);
+ import_info_.wdh = wtap_dump_fdopen(import_file_fd, WTAP_FILE_TYPE_SUBTYPE_PCAP, import_info_.encapsulation, import_info_.max_frame_length, FALSE, &err);
qDebug() << capfile_name_ << ":" << import_info_.wdh << import_info_.encapsulation << import_info_.max_frame_length;
if (import_info_.wdh == NULL) {
open_failure_alert_box(capfile_name_.toUtf8().constData(), err, TRUE);
diff --git a/ui/qt/summary_dialog.cpp b/ui/qt/summary_dialog.cpp
index 8c688b2936..f0ccf60455 100644
--- a/ui/qt/summary_dialog.cpp
+++ b/ui/qt/summary_dialog.cpp
@@ -134,7 +134,7 @@ QString SummaryDialog::SummaryToString()
out << "\t" << tr("Name:\t\t%1\n").arg(summary_.filename);
out << "\t" << tr("Length:\t\t%1 bytes\n").arg(summary_.file_length);
out << "\t" << tr("Format:\t\t%1%2\n")
- .arg(wtap_file_type_string(summary_.file_type))
+ .arg(wtap_file_type_subtype_string(summary_.file_type))
.arg(summary_.iscompressed? tr(" (gzip compressed)") : "");
out << "\t" << tr("Encapsulation:\t\t%1\n").arg(ui->lEncapsulation->text());
@@ -281,7 +281,7 @@ void SummaryDialog::UpdateValues()
ui->lLength->setText(QString(tr("%1 bytes (%2 Mbytes)")).arg((ulong)summary_.file_length).arg((float)summary_.file_length/1048576));
/* format */
- ui->lFormat->setText(QString("%1%2").arg(wtap_file_type_string(summary_.file_type), summary_.iscompressed? tr(" (gzip compressed)") : ""));
+ ui->lFormat->setText(QString("%1%2").arg(wtap_file_type_subtype_string(summary_.file_type), summary_.iscompressed? tr(" (gzip compressed)") : ""));
/* encapsulation */
if (summary_.file_encap_type == WTAP_ENCAP_PER_PACKET)