summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-17 15:00:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-17 15:00:52 +0000
commit0f157e7d6c4be48f213ea022cb2d6d1316c423c8 (patch)
treeff4ad271b50a39e23d5a50a54f4bff37342cdc1c /ui
parentAdding debian version 4.2.4-1. (diff)
downloadwireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.tar.xz
wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.zip
Merging upstream version 4.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/logray/logray_main_window_slots.cpp2
-rw-r--r--ui/qt/export_dissection_dialog.cpp6
-rw-r--r--ui/qt/models/column_list_model.cpp2
-rw-r--r--ui/qt/models/packet_list_model.cpp69
-rw-r--r--ui/qt/packet_list.cpp2
-rw-r--r--ui/qt/packet_range_group_box.cpp19
-rw-r--r--ui/qt/rtp_player_dialog.cpp6
-rw-r--r--ui/qt/sequence_dialog.cpp50
-rw-r--r--ui/qt/sequence_dialog.h5
-rw-r--r--ui/qt/tcp_stream_dialog.cpp16
-rw-r--r--ui/qt/utils/data_printer.cpp48
-rw-r--r--ui/qt/voip_calls_dialog.cpp3
-rw-r--r--ui/qt/wireshark_de.ts4
-rw-r--r--ui/qt/wireshark_en.ts4
-rw-r--r--ui/qt/wireshark_es.ts4
-rw-r--r--ui/qt/wireshark_fr.ts4
-rw-r--r--ui/qt/wireshark_it.ts4
-rw-r--r--ui/qt/wireshark_ja_JP.ts4
-rw-r--r--ui/qt/wireshark_ko.ts4
-rw-r--r--ui/qt/wireshark_main_window_slots.cpp2
-rw-r--r--ui/qt/wireshark_pl.ts24
-rw-r--r--ui/qt/wireshark_ru.ts4
-rw-r--r--ui/qt/wireshark_sv.ts4
-rw-r--r--ui/qt/wireshark_tr_TR.ts4
-rw-r--r--ui/qt/wireshark_uk.ts4
-rw-r--r--ui/qt/wireshark_zh_CN.ts4
-rw-r--r--ui/win32/file_dlg_win32.cpp152
-rw-r--r--ui/win32/file_dlg_win32.h31
28 files changed, 390 insertions, 95 deletions
diff --git a/ui/logray/logray_main_window_slots.cpp b/ui/logray/logray_main_window_slots.cpp
index f0882ed5..bf9c05bc 100644
--- a/ui/logray/logray_main_window_slots.cpp
+++ b/ui/logray/logray_main_window_slots.cpp
@@ -2057,7 +2057,7 @@ void LograyMainWindow::editTimeShift()
connect(this, SIGNAL(setCaptureFile(capture_file*)),
ts_dialog, SLOT(setCaptureFile(capture_file*)));
- connect(ts_dialog, SIGNAL(timeShifted()), packet_list_, SLOT(applyTimeShift()));
+ connect(ts_dialog, &TimeShiftDialog::timeShifted, packet_list_, &PacketList::applyTimeShift, Qt::QueuedConnection);
ts_dialog->setWindowModality(Qt::ApplicationModal);
ts_dialog->setAttribute(Qt::WA_DeleteOnClose);
diff --git a/ui/qt/export_dissection_dialog.cpp b/ui/qt/export_dissection_dialog.cpp
index 7f2664ec..5b09efcd 100644
--- a/ui/qt/export_dissection_dialog.cpp
+++ b/ui/qt/export_dissection_dialog.cpp
@@ -172,6 +172,12 @@ void ExportDissectionDialog::show()
void ExportDissectionDialog::dialogAccepted(const QStringList &selected)
{
if (selected.length() > 0) {
+ /* writing might take a while, so hide ourselves so the user
+ * can't click on anything here (this dialog will be closed
+ * and deleted once this function is done), but can access
+ * the ProgressDialog in the main window to cancel the export.
+ */
+ hide();
cf_print_status_t status;
QString file_name = selected[0];
diff --git a/ui/qt/models/column_list_model.cpp b/ui/qt/models/column_list_model.cpp
index a0e5c8ba..102ffc31 100644
--- a/ui/qt/models/column_list_model.cpp
+++ b/ui/qt/models/column_list_model.cpp
@@ -278,7 +278,7 @@ void ColumnListModel::populate()
QVariant ColumnListModel::data(const QModelIndex &index, int role) const
{
- if (! index.isValid() || index.column() >= store_.count())
+ if (! index.isValid() || index.row() >= store_.count())
return QVariant();
ListElement ne = store_.at(index.row());
diff --git a/ui/qt/models/packet_list_model.cpp b/ui/qt/models/packet_list_model.cpp
index 0ed61d74..8cc00691 100644
--- a/ui/qt/models/packet_list_model.cpp
+++ b/ui/qt/models/packet_list_model.cpp
@@ -186,26 +186,74 @@ void PacketListModel::clear() {
void PacketListModel::invalidateAllColumnStrings()
{
+ // https://bugreports.qt.io/browse/QTBUG-58580
+ // https://bugreports.qt.io/browse/QTBUG-124173
+ // https://codereview.qt-project.org/c/qt/qtbase/+/285280
+ //
+ // In Qt 6, QAbstractItemView::dataChanged determines how much of the
+ // viewport rectangle is covered by the changed indices and only updates
+ // that much. Unfortunately, if the number of indices is very large,
+ // computing the union of the intersecting rectangle takes much longer
+ // than unconditionally updating the entire viewport. It increases linearly
+ // with the total number of packets in the list, unlike updating the
+ // viewport, which scales with the size of the viewport but is unaffected
+ // by undisplayed packets.
+ //
+ // In particular, if the data for all of the model is invalidated, we
+ // know we want to update the entire viewport and very much do not
+ // want to waste time calculating the affected area. (This can take
+ // 1 s with 1.4 M packets, 9 s with 12 M packets.)
+ //
+ // Issuing layoutAboutToBeChanged() and layoutChanged() causes the
+ // QTreeView to clear all the information for each of the view items,
+ // but without clearing the current and selected items (unlike
+ // [begin|end]ResetModel.)
+ //
+ // Theoretically this is less efficient because dataChanged() has a list
+ // of what roles changed and the other signals do not; in practice,
+ // neither QTreeView::dataChanged nor QAbstractItemView::dataChanged
+ // actually use the roles parameter, and just reset everything.
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutAboutToBeChanged();
+#endif
PacketListRecord::invalidateAllRecords();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutChanged();
+#else
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1),
QVector<int>() << Qt::DisplayRole);
+#endif
}
void PacketListModel::resetColumns()
{
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutAboutToBeChanged();
+#endif
if (cap_file_) {
PacketListRecord::resetColumns(&cap_file_->cinfo);
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutChanged();
+#else
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
+#endif
emit headerDataChanged(Qt::Horizontal, 0, columnCount() - 1);
}
void PacketListModel::resetColorized()
{
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutAboutToBeChanged();
+#endif
PacketListRecord::resetColorization();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutChanged();
+#else
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1),
QVector<int>() << Qt::BackgroundRole << Qt::ForegroundRole);
+#endif
}
void PacketListModel::toggleFrameMark(const QModelIndexList &indeces)
@@ -239,6 +287,9 @@ void PacketListModel::toggleFrameMark(const QModelIndexList &indeces)
void PacketListModel::setDisplayedFrameMark(gboolean set)
{
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutAboutToBeChanged();
+#endif
foreach (PacketListRecord *record, visible_rows_) {
if (set) {
cf_mark_frame(cap_file_, record->frameData());
@@ -246,8 +297,12 @@ void PacketListModel::setDisplayedFrameMark(gboolean set)
cf_unmark_frame(cap_file_, record->frameData());
}
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutChanged();
+#else
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1),
QVector<int>() << Qt::BackgroundRole << Qt::ForegroundRole);
+#endif
}
void PacketListModel::toggleFrameIgnore(const QModelIndexList &indeces)
@@ -281,6 +336,9 @@ void PacketListModel::toggleFrameIgnore(const QModelIndexList &indeces)
void PacketListModel::setDisplayedFrameIgnore(gboolean set)
{
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutAboutToBeChanged();
+#endif
foreach (PacketListRecord *record, visible_rows_) {
if (set) {
cf_ignore_frame(cap_file_, record->frameData());
@@ -288,8 +346,12 @@ void PacketListModel::setDisplayedFrameIgnore(gboolean set)
cf_unignore_frame(cap_file_, record->frameData());
}
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutChanged();
+#else
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1),
QVector<int>() << Qt::BackgroundRole << Qt::ForegroundRole << Qt::DisplayRole);
+#endif
}
void PacketListModel::toggleFrameRefTime(const QModelIndex &rt_index)
@@ -302,6 +364,9 @@ void PacketListModel::toggleFrameRefTime(const QModelIndex &rt_index)
frame_data *fdata = record->frameData();
if (!fdata) return;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutAboutToBeChanged();
+#endif
if (fdata->ref_time) {
fdata->ref_time=0;
cap_file_->ref_time_count--;
@@ -332,7 +397,11 @@ void PacketListModel::unsetAllFrameRefTime()
cap_file_->ref_time_count = 0;
cf_reftime_packets(cap_file_);
PacketListRecord::resetColumns(&cap_file_->cinfo);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ emit layoutChanged();
+#else
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
+#endif
}
void PacketListModel::addFrameComment(const QModelIndexList &indices, const QByteArray &comment)
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index a065eacc..ae6f0f51 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -1038,6 +1038,8 @@ void PacketList::setRecentColumnWidth(int col)
void PacketList::drawCurrentPacket()
{
+ // XXX - Update for multi-select? If more than one packet is Selected,
+ // this changes it so that only the Current packet is Selected.
QModelIndex current_index = currentIndex();
if (selectionModel() && current_index.isValid()) {
selectionModel()->clearSelection();
diff --git a/ui/qt/packet_range_group_box.cpp b/ui/qt/packet_range_group_box.cpp
index 143da613..dab44333 100644
--- a/ui/qt/packet_range_group_box.cpp
+++ b/ui/qt/packet_range_group_box.cpp
@@ -113,12 +113,23 @@ void PacketRangeGroupBox::updateCounts() {
pr_ui_->selectedDisplayedLabel->setEnabled(displayed_checked);
if (range_->include_dependents) {
- pr_ui_->selectedCapturedLabel->setText(QString::number(range_->selected_plus_depends_cnt));
- pr_ui_->selectedDisplayedLabel->setText(QString::number(range_->displayed_selected_plus_depends_cnt));
+ label_count = range_->selected_plus_depends_cnt;
} else {
- pr_ui_->selectedCapturedLabel->setText(QString::number(range_->selection_range_cnt));
- pr_ui_->selectedDisplayedLabel->setText(QString::number(range_->displayed_selection_range_cnt));
+ label_count = range_->selection_range_cnt;
}
+ if (range_->remove_ignored) {
+ label_count -= range_->ignored_selection_range_cnt;
+ }
+ pr_ui_->selectedCapturedLabel->setText(QString::number(label_count));
+ if (range_->include_dependents) {
+ label_count = range_->displayed_selected_plus_depends_cnt;
+ } else {
+ label_count = range_->displayed_selection_range_cnt;
+ }
+ if (range_->remove_ignored) {
+ label_count -= range_->displayed_ignored_selection_range_cnt;
+ }
+ pr_ui_->selectedDisplayedLabel->setText(QString::number(label_count));
} else {
if (range_->process == range_process_selected) {
pr_ui_->allButton->setChecked(true);
diff --git a/ui/qt/rtp_player_dialog.cpp b/ui/qt/rtp_player_dialog.cpp
index 7d0ad62d..60418cc8 100644
--- a/ui/qt/rtp_player_dialog.cpp
+++ b/ui/qt/rtp_player_dialog.cpp
@@ -393,13 +393,13 @@ RtpPlayerDialog::~RtpPlayerDialog()
{
std::lock_guard<std::mutex> lock(init_mutex_);
if (pinstance_ != nullptr) {
- cleanupMarkerStream();
for (int row = 0; row < ui->streamTreeWidget->topLevelItemCount(); row++) {
QTreeWidgetItem *ti = ui->streamTreeWidget->topLevelItem(row);
RtpAudioStream *audio_stream = ti->data(stream_data_col_, Qt::UserRole).value<RtpAudioStream*>();
if (audio_stream)
delete audio_stream;
}
+ cleanupMarkerStream();
delete ui;
pinstance_ = nullptr;
}
@@ -1288,7 +1288,9 @@ void RtpPlayerDialog::playFinished(RtpAudioStream *stream, QAudio::Error error)
}
playing_streams_.removeOne(stream);
if (playing_streams_.isEmpty()) {
- marker_stream_->stop();
+ if (marker_stream_) {
+ marker_stream_->stop();
+ }
updateWidgets();
}
}
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp
index 2f5b5ede..e5fb7b87 100644
--- a/ui/qt/sequence_dialog.cpp
+++ b/ui/qt/sequence_dialog.cpp
@@ -66,14 +66,14 @@ typedef struct {
SequenceInfo *info;
} sequence_items_t;
-SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info) :
+SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info, bool voipFeatures) :
WiresharkDialog(parent, cf),
ui(new Ui::SequenceDialog),
info_(info),
num_items_(0),
packet_num_(0),
sequence_w_(1),
- voipFeaturesEnabled(false)
+ voipFeaturesEnabled(voipFeatures)
{
QAction *action;
@@ -189,6 +189,11 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
close_bt->setDefault(true);
}
+ enableVoIPFeatures();
+
+ // Enable or disable VoIP features before adding the ProgressFrame,
+ // because the layout position depends on whether player_button_ is
+ // visible.
ProgressFrame::addToButtonBox(ui->buttonBox, &parent);
loadGeometry(parent.width(), parent.height() * 4 / 5);
@@ -200,10 +205,7 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(diagramClicked(QMouseEvent*)));
connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*)));
connect(sp, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheeled(QWheelEvent*)));
-
- // Button must be enabled by VoIP dialogs
- player_button_->setVisible(false);
- player_button_->setEnabled(false);
+ connect(sp, &QCustomPlot::afterLayout, this, &SequenceDialog::layoutAxisLabels);
}
SequenceDialog::~SequenceDialog()
@@ -214,10 +216,10 @@ SequenceDialog::~SequenceDialog()
void SequenceDialog::enableVoIPFeatures()
{
- voipFeaturesEnabled = true;
- player_button_->setVisible(true);
- ui->actionSelectRtpStreams->setVisible(true);
- ui->actionDeselectRtpStreams->setVisible(true);
+ player_button_->setVisible(voipFeaturesEnabled);
+ ui->actionSelectRtpStreams->setVisible(voipFeaturesEnabled);
+ ui->actionDeselectRtpStreams->setVisible(voipFeaturesEnabled);
+ // Buttons and actions are enabled when valid call selected
}
void SequenceDialog::updateWidgets()
@@ -535,12 +537,20 @@ void SequenceDialog::panAxes(int x_pixels, int y_pixels)
double v_pan = 0.0;
h_pan = sp->xAxis2->range().size() * x_pixels / sp->xAxis2->axisRect()->width();
+ // The nodes are placed on integer x values from 0 to num_nodes - 1.
+ // We allow 0.5 of margin around a node (also reflected in the
+ // horizontalScrollBar range.)
if (h_pan < 0) {
h_pan = qMax(h_pan, min_left_ - sp->xAxis2->range().lower);
} else {
- h_pan = qMin(h_pan, info_->sainfo()->num_nodes - sp->xAxis2->range().upper);
+ h_pan = qMin(h_pan, info_->sainfo()->num_nodes - 0.5 - sp->xAxis2->range().upper);
}
+ if (sp->yAxis->rangeReversed()) {
+ // For reversed axes, lower still references the mathemathetically
+ // smaller number than upper, so reverse the direction.
+ y_pixels = -y_pixels;
+ }
v_pan = sp->yAxis->range().size() * y_pixels / sp->yAxis->axisRect()->height();
if (v_pan < 0) {
v_pan = qMax(v_pan, min_top_ - sp->yAxis->range().lower);
@@ -548,7 +558,7 @@ void SequenceDialog::panAxes(int x_pixels, int y_pixels)
v_pan = qMin(v_pan, num_items_ - sp->yAxis->range().upper);
}
- if (h_pan && !(sp->xAxis2->range().contains(min_left_) && sp->xAxis2->range().contains(info_->sainfo()->num_nodes))) {
+ if (h_pan && !(sp->xAxis2->range().contains(min_left_) && sp->xAxis2->range().contains(info_->sainfo()->num_nodes - 0.5))) {
sp->xAxis2->moveRange(h_pan);
sp->replot();
}
@@ -586,13 +596,21 @@ void SequenceDialog::resetAxes(bool keep_lower)
ui->verticalScrollBar->setRange((rmin - 1.0) * 100, (num_items_ - 0.5 - rmin) * 100);
yAxisChanged(sp->yAxis->range());
+ sp->replot(QCustomPlot::rpQueuedReplot);
+}
+
+void SequenceDialog::layoutAxisLabels()
+{
// It would be exceedingly handy if we could do one or both of the
// following:
// - Position an axis label above its axis inline with the tick labels.
// - Anchor a QCPItemText to one of the corners of a QCPAxis.
- // Neither of those appear to be possible, so we first call replot in
- // order to lay out our X axes, place our labels, the call replot again.
- sp->replot(QCustomPlot::rpQueuedReplot);
+ // Neither of those appear to be possible, so we place our labels using
+ // absolute positioning immediately after the layout size and positions
+ // are set, and right before the replot (or print) draw step occurs,
+ // using the new QCustomPlot 2.1.0 QCustomPlot::afterLayout signal.
+
+ QCustomPlot *sp = ui->sequencePlot;
QRect axis_rect = sp->axisRect()->rect();
@@ -606,8 +624,6 @@ void SequenceDialog::resetAxes(bool keep_lower)
+ sp->yAxis2->tickLabelPadding()
+ sp->yAxis2->offset(),
axis_rect.top() / 2);
-
- sp->replot(QCustomPlot::rpRefreshHint);
}
void SequenceDialog::resetView()
diff --git a/ui/qt/sequence_dialog.h b/ui/qt/sequence_dialog.h
index 8c321907..f9935d5b 100644
--- a/ui/qt/sequence_dialog.h
+++ b/ui/qt/sequence_dialog.h
@@ -49,9 +49,8 @@ class SequenceDialog : public WiresharkDialog
Q_OBJECT
public:
- explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL);
+ explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL, bool voipFeatures = false);
~SequenceDialog();
- void enableVoIPFeatures();
protected:
void showEvent(QShowEvent *event);
@@ -78,6 +77,7 @@ private slots:
void fillDiagram();
void resetView();
void exportDiagram();
+ void layoutAxisLabels();
void on_buttonBox_clicked(QAbstractButton *button);
void on_actionGoToPacket_triggered();
@@ -123,6 +123,7 @@ private:
QPointer<RtpStreamDialog> rtp_stream_dialog_; // Singleton pattern used
bool voipFeaturesEnabled;
+ void enableVoIPFeatures();
void zoomXAxis(bool in);
void panAxes(int x_pixels, int y_pixels);
void resetAxes(bool keep_lower = false);
diff --git a/ui/qt/tcp_stream_dialog.cpp b/ui/qt/tcp_stream_dialog.cpp
index 88f6b757..8d668f62 100644
--- a/ui/qt/tcp_stream_dialog.cpp
+++ b/ui/qt/tcp_stream_dialog.cpp
@@ -45,6 +45,8 @@
// - ACK & RWIN segment ticks in tcptrace graph
// - Add missing elements (retrans, URG, SACK, etc) to tcptrace. It probably makes
// sense to subclass QCPGraph for this.
+// - Allow switching the tracer between graphs when there are two / selecting
+// the other graph, at the very least if base_graph_ is disabled.
// The GTK+ version computes a 20 (or 21!) segment moving average. Comment
// out the line below to use that. By default we use a 1 second MA.
@@ -73,6 +75,7 @@ const QString segment_length_label_ = QObject::tr("Segment Length (B)");
const QString sequence_number_label_ = QObject::tr("Sequence Number (B)");
const QString time_s_label_ = QObject::tr("Time (s)");
const QString window_size_label_ = QObject::tr("Window Size (B)");
+const QString cwnd_label_ = QObject::tr("Unacked (Outstanding) Bytes (B)");
QCPErrorBarsNotSelectable::QCPErrorBarsNotSelectable(QCPAxis *keyAxis, QCPAxis *valueAxis) :
QCPErrorBars(keyAxis, valueAxis)
@@ -292,7 +295,7 @@ TCPStreamDialog::TCPStreamDialog(QWidget *parent, capture_file *cf, tcp_graph_ty
sack2_eb_->setDataPlottable(sack2_graph_);
// RWin graph - displays upper extent of RWIN advertised on reverse packets
- rwin_graph_ = sp->addGraph();
+ rwin_graph_ = sp->addGraph(sp->xAxis, sp->yAxis2);
rwin_graph_->setPen(QPen(QBrush(graph_color_3), pen_width));
rwin_graph_->setLineStyle(QCPGraph::lsStepLeft);
@@ -1579,9 +1582,18 @@ void TCPStreamDialog::fillWindowScale()
}
}
}
+ /* base_graph_ is the one that the tracer is on and allows selecting
+ * segments. XXX - Is the congestion window more interesting to see
+ * the exact value and select?
+ */
base_graph_->setData(cwnd_time, cwnd_size);
rwin_graph_->setData(rel_time, win_size);
- sp->yAxis->setLabel(window_size_label_);
+ sp->yAxis->setLabel(cwnd_label_);
+
+ sp->yAxis2->setLabel(window_size_label_);
+ sp->yAxis2->setLabelColor(QColor(graph_color_3));
+ sp->yAxis2->setTickLabelColor(QColor(graph_color_3));
+ sp->yAxis2->setVisible(true);
}
QString TCPStreamDialog::streamDescription()
diff --git a/ui/qt/utils/data_printer.cpp b/ui/qt/utils/data_printer.cpp
index a96e1ed4..3c3e910a 100644
--- a/ui/qt/utils/data_printer.cpp
+++ b/ui/qt/utils/data_printer.cpp
@@ -38,13 +38,45 @@ void DataPrinter::toClipboard(DataPrinter::DumpType type, IDataPrintable * print
// Beginning quote
clipboard_text += QString("\"");
for (int i = 0; i < printData.length(); i++) {
- /* ASCII printable */
- int ch = printData[i];
- if (ch >= 32 && ch <= 126) {
- clipboard_text += QChar(ch);
- }
- else {
- clipboard_text += QString("\\x%1").arg((uint8_t) printData[i], 2, 16, QChar('0'));
+ // backslash and double quote are printable but
+ // must be escaped in a C string.
+ char ch = printData[i];
+ switch (ch) {
+ case '\"':
+ clipboard_text += QString("\\\"");
+ break;
+ case '\\':
+ clipboard_text += QString("\\\\");
+ break;
+ case '\a':
+ clipboard_text += QString("\\a");
+ break;
+ case '\b':
+ clipboard_text += QString("\\b");
+ break;
+ case '\f':
+ clipboard_text += QString("\\f");
+ break;
+ case '\n':
+ clipboard_text += QString("\\n");
+ break;
+ case '\r':
+ clipboard_text += QString("\\r");
+ break;
+ case '\t':
+ clipboard_text += QString("\\t");
+ break;
+ case '\v':
+ clipboard_text += QString("\\v");
+ break;
+ default:
+ // ASCII printable
+ if (ch >= 32 && ch <= 126) {
+ clipboard_text += QChar(ch);
+ }
+ else {
+ clipboard_text += QString("\\%1").arg((uint8_t) printData[i], 3, 8, QChar('0'));
+ }
}
}
// End quote
@@ -57,6 +89,8 @@ void DataPrinter::toClipboard(DataPrinter::DumpType type, IDataPrintable * print
case DP_PrintableText:
for (int i = 0; i < printData.length(); i++) {
QChar ch(printData[i]);
+ // This interprets ch as Latin-1. We might want to use ASCII
+ // printable only.
if (ch.isSpace() || ch.isPrint()) {
clipboard_text += ch;
}
diff --git a/ui/qt/voip_calls_dialog.cpp b/ui/qt/voip_calls_dialog.cpp
index b8a54bd7..dd5910f8 100644
--- a/ui/qt/voip_calls_dialog.cpp
+++ b/ui/qt/voip_calls_dialog.cpp
@@ -603,7 +603,7 @@ void VoipCallsDialog::showSequence()
cur_ga_item = gxx_list_next(cur_ga_item);
}
- SequenceDialog *sequence_dialog = new SequenceDialog(parent_, cap_file_, sequence_info_);
+ SequenceDialog *sequence_dialog = new SequenceDialog(parent_, cap_file_, sequence_info_, true);
// Bypass this dialog and forward signals to parent
connect(sequence_dialog, SIGNAL(rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *>)), &parent_, SLOT(rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *>)));
connect(sequence_dialog, SIGNAL(rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *>)), &parent_, SLOT(rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *>)));
@@ -612,7 +612,6 @@ void VoipCallsDialog::showSequence()
connect(sequence_dialog, SIGNAL(rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *>)), &parent_, SLOT(rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *>)));
sequence_dialog->setAttribute(Qt::WA_DeleteOnClose);
- sequence_dialog->enableVoIPFeatures();
sequence_dialog->show();
}
diff --git a/ui/qt/wireshark_de.ts b/ui/qt/wireshark_de.ts
index 28d3c38b..a42e3c32 100644
--- a/ui/qt/wireshark_de.ts
+++ b/ui/qt/wireshark_de.ts
@@ -8086,6 +8086,10 @@ Um zum Beispiel eine neue Datei zu jeder vollen Stunde zu haben, 1 Stunde angebe
<translation>Window Größe (B)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[keine Mitschnittdatei]</translation>
</message>
diff --git a/ui/qt/wireshark_en.ts b/ui/qt/wireshark_en.ts
index 2dab6ca4..4478363c 100644
--- a/ui/qt/wireshark_en.ts
+++ b/ui/qt/wireshark_en.ts
@@ -8025,6 +8025,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation type="unfinished"></translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation type="unfinished"></translation>
</message>
diff --git a/ui/qt/wireshark_es.ts b/ui/qt/wireshark_es.ts
index 3f5a016c..dc082029 100644
--- a/ui/qt/wireshark_es.ts
+++ b/ui/qt/wireshark_es.ts
@@ -8006,6 +8006,10 @@ Por ejemplo, use 1 hora para tener creado un nuevo archivo cada hora en punto.</
<translation type="unfinished"></translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[no hay archivo de captura]</translation>
</message>
diff --git a/ui/qt/wireshark_fr.ts b/ui/qt/wireshark_fr.ts
index 29e8c5ac..7c63477f 100644
--- a/ui/qt/wireshark_fr.ts
+++ b/ui/qt/wireshark_fr.ts
@@ -8034,6 +8034,10 @@ Pas exemple, inquiquez 1 heure pour avoir un nouveau fichier créé toutes les h
<translation>Taille de fenetres (b)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[pas de fichier de capture]</translation>
</message>
diff --git a/ui/qt/wireshark_it.ts b/ui/qt/wireshark_it.ts
index 772d32cd..18daca04 100644
--- a/ui/qt/wireshark_it.ts
+++ b/ui/qt/wireshark_it.ts
@@ -8086,6 +8086,10 @@ Ad esempio, usa 1 ora per fare in modo che un nuovo file sia creato ogni ora.</t
<translation>Dimensione della finestra (B)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation>Byte senza ack (eccezionali) (B)</translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[nessun file di cattura]</translation>
</message>
diff --git a/ui/qt/wireshark_ja_JP.ts b/ui/qt/wireshark_ja_JP.ts
index 0d1e1f7f..610d74df 100644
--- a/ui/qt/wireshark_ja_JP.ts
+++ b/ui/qt/wireshark_ja_JP.ts
@@ -8062,6 +8062,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>ウインドウサイズ(バイト)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation>ACKされていない(未処理の)バイト(B)</translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[キャプチャファイルなし]</translation>
</message>
diff --git a/ui/qt/wireshark_ko.ts b/ui/qt/wireshark_ko.ts
index 94c1648f..8a2f795f 100644
--- a/ui/qt/wireshark_ko.ts
+++ b/ui/qt/wireshark_ko.ts
@@ -8059,6 +8059,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>윈도 크기(바이트)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[캡처 파일 없음]</translation>
</message>
diff --git a/ui/qt/wireshark_main_window_slots.cpp b/ui/qt/wireshark_main_window_slots.cpp
index 74943adc..a348bd47 100644
--- a/ui/qt/wireshark_main_window_slots.cpp
+++ b/ui/qt/wireshark_main_window_slots.cpp
@@ -2235,7 +2235,7 @@ void WiresharkMainWindow::editTimeShift()
connect(this, SIGNAL(setCaptureFile(capture_file*)),
ts_dialog, SLOT(setCaptureFile(capture_file*)));
- connect(ts_dialog, SIGNAL(timeShifted()), packet_list_, SLOT(applyTimeShift()));
+ connect(ts_dialog, &TimeShiftDialog::timeShifted, packet_list_, &PacketList::applyTimeShift, Qt::QueuedConnection);
ts_dialog->setWindowModality(Qt::ApplicationModal);
ts_dialog->setAttribute(Qt::WA_DeleteOnClose);
diff --git a/ui/qt/wireshark_pl.ts b/ui/qt/wireshark_pl.ts
index efd144dc..65abbd71 100644
--- a/ui/qt/wireshark_pl.ts
+++ b/ui/qt/wireshark_pl.ts
@@ -1262,7 +1262,7 @@
</message>
<message>
<source>Show and hide interfaces, add comments, and manage pipes and remote interfaces.</source>
- <translation>Pokaż lub ukryj interfejsy, dodaj komentarze i zarządzaj interfejsami pipe oraz zdalnymi.</translation>
+ <translation>Pokaż lub ukryj interfejsy, dodaj komentarze i zarządzaj potokami oraz zdalnymi interfejsami.</translation>
</message>
<message>
<source>Manage Interfaces…</source>
@@ -4885,7 +4885,7 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
</message>
<message>
<source>Pipe</source>
- <translation type="unfinished"></translation>
+ <translation>Potok</translation>
</message>
<message>
<source>STDIN</source>
@@ -5013,7 +5013,7 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
</message>
<message>
<source>Local Pipe Path</source>
- <translation type="unfinished"></translation>
+ <translation>Ścieżka lokalnego potoku</translation>
</message>
<message>
<source>Comment</source>
@@ -6676,19 +6676,19 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Add a pipe to capture from or remove an existing pipe from the list.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dodaj lub usuń rurę z listy.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dodaj lub usuń potok z listy.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Pipes</source>
- <translation>Rury</translation>
+ <translation>Potoki</translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Add a new pipe using default settings.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dodaj nową rurę używając domyślnych ustawień.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dodaj nowy potok używając domyślnych ustawień.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Remove the selected pipe from the list.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Usuń wybraną rurę z listy.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Usuń wybrany potok z listy.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Remote Interfaces</source>
@@ -6716,7 +6716,7 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
</message>
<message>
<source>This version of Wireshark does not save pipe settings.</source>
- <translation>Ta wersja Wiresharka nie obsługuje ustawień rur.</translation>
+ <translation>Ta wersja programu Wireshark nie obsługuje ustawień potoków.</translation>
</message>
<message>
<source>This version of Wireshark does not save remote settings.</source>
@@ -6728,7 +6728,7 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
</message>
<message>
<source>New Pipe</source>
- <translation>Nowa rura</translation>
+ <translation>Nowy potok</translation>
</message>
</context>
<context>
@@ -7323,7 +7323,7 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<name>PathSelectionDelegate</name>
<message>
<source>Open a pipe</source>
- <translation type="unfinished"></translation>
+ <translation>Otwórz potok</translation>
</message>
</context>
<context>
@@ -8102,6 +8102,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>Rozmiar okna (B)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[nie załadowano pliku przechytywania]</translation>
</message>
diff --git a/ui/qt/wireshark_ru.ts b/ui/qt/wireshark_ru.ts
index 20dc0e3a..870d0df6 100644
--- a/ui/qt/wireshark_ru.ts
+++ b/ui/qt/wireshark_ru.ts
@@ -8055,6 +8055,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>Размер окна (Б)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[нет файла захвата]</translation>
</message>
diff --git a/ui/qt/wireshark_sv.ts b/ui/qt/wireshark_sv.ts
index abe7fef8..d9936d05 100644
--- a/ui/qt/wireshark_sv.ts
+++ b/ui/qt/wireshark_sv.ts
@@ -8035,6 +8035,10 @@ Till exempel, använd 1 timma för att en ny fil skall skapas varje timma vid he
<translation>Fönsterstorlek (B)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[ingen fångstfil]</translation>
</message>
diff --git a/ui/qt/wireshark_tr_TR.ts b/ui/qt/wireshark_tr_TR.ts
index 06f0cafa..1328942d 100644
--- a/ui/qt/wireshark_tr_TR.ts
+++ b/ui/qt/wireshark_tr_TR.ts
@@ -8015,6 +8015,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>Pencere Boyutu (B)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[yakalama dosyası yok]</translation>
</message>
diff --git a/ui/qt/wireshark_uk.ts b/ui/qt/wireshark_uk.ts
index 12517ff4..4720152d 100644
--- a/ui/qt/wireshark_uk.ts
+++ b/ui/qt/wireshark_uk.ts
@@ -7996,6 +7996,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>Розмір Вікна (Б)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation type="unfinished"></translation>
</message>
diff --git a/ui/qt/wireshark_zh_CN.ts b/ui/qt/wireshark_zh_CN.ts
index 38dfcbbd..13b953b6 100644
--- a/ui/qt/wireshark_zh_CN.ts
+++ b/ui/qt/wireshark_zh_CN.ts
@@ -8010,6 +8010,10 @@ For example, use 1 hour to have a new file created every hour on the hour.</sour
<translation>窗口大小 (B)</translation>
</message>
<message>
+ <source>Unacked (Outstanding) Bytes (B)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>[no capture file]</source>
<translation>[无捕获文件]</translation>
</message>
diff --git a/ui/win32/file_dlg_win32.cpp b/ui/win32/file_dlg_win32.cpp
index a301912e..6261c915 100644
--- a/ui/win32/file_dlg_win32.cpp
+++ b/ui/win32/file_dlg_win32.cpp
@@ -1383,7 +1383,8 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
bool filtered_active = false;
TCHAR static_val[STATIC_LABEL_CHARS];
uint32_t ignored_cnt = 0, displayed_ignored_cnt = 0;
- uint32_t displayed_cnt;
+ uint32_t depended_cnt = 0, displayed_depended_cnt = 0;
+ uint32_t label_cnt;
bool range_valid = true;
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_DISPLAYED_BTN);
@@ -1393,43 +1394,50 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
/* RANGE_SELECT_ALL */
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_ALL_PKTS_CAP);
EnableWindow(cur_ctrl, !filtered_active);
+ label_cnt = g_cf->count;
if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), g_cf->count - range->ignored_cnt);
- } else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), g_cf->count);
+ label_cnt -= range->ignored_cnt;
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), label_cnt);
SetWindowText(cur_ctrl, static_val);
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_ALL_PKTS_DISP);
EnableWindow(cur_ctrl, filtered_active);
if (range->include_dependents)
- displayed_cnt = range->displayed_plus_dependents_cnt;
+ label_cnt = range->displayed_plus_dependents_cnt;
else
- displayed_cnt = range->displayed_cnt;
+ label_cnt = range->displayed_cnt;
if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), displayed_cnt - range->displayed_ignored_cnt);
- } else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), displayed_cnt);
+ label_cnt -= range->displayed_ignored_cnt;
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), label_cnt);
SetWindowText(cur_ctrl, static_val);
/* RANGE_SELECT_CURR */
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_SEL_PKT_CAP);
EnableWindow(cur_ctrl, range->selection_range_cnt > 0 && !filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), range->selection_range_cnt - range->ignored_selection_range_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->selected_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), range->selection_range_cnt);
+ label_cnt = range->selection_range_cnt;
}
+ if (range->remove_ignored) {
+ label_cnt -= range->ignored_selection_range_cnt;
+ }
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_SEL_PKT_DISP);
EnableWindow(cur_ctrl, range->displayed_selection_range_cnt > 0 && filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), range->displayed_selection_range_cnt - range->displayed_ignored_selection_range_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->displayed_selected_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), range->displayed_selection_range_cnt);
+ label_cnt = range->displayed_selection_range_cnt;
+ }
+ if (range->remove_ignored) {
+ label_cnt -= range->displayed_ignored_selection_range_cnt;
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
/* RANGE_SELECT_MARKED */
@@ -1438,20 +1446,28 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_MARKED_CAP);
EnableWindow(cur_ctrl, g_cf->marked_count && !filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), g_cf->marked_count - range->ignored_marked_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->marked_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), g_cf->marked_count);
+ label_cnt = g_cf->marked_count;
+ }
+ if (range->remove_ignored) {
+ label_cnt -= range->ignored_marked_cnt;
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_MARKED_DISP);
EnableWindow(cur_ctrl, g_cf->marked_count && filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->displayed_marked_cnt - range->displayed_ignored_marked_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->displayed_marked_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->displayed_marked_cnt);
+ label_cnt = range->displayed_marked_cnt;
+ }
+ if (range->remove_ignored) {
+ label_cnt -= range->displayed_ignored_marked_cnt;
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
/* RANGE_SELECT_MARKED_RANGE */
@@ -1460,20 +1476,28 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_FIRST_LAST_CAP);
EnableWindow(cur_ctrl, range->mark_range_cnt && !filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->mark_range_cnt - range->ignored_mark_range_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->mark_range_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->mark_range_cnt);
+ label_cnt = range->mark_range_cnt;
+ }
+ if (range->remove_ignored) {
+ label_cnt -= range->ignored_mark_range_cnt;
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_FIRST_LAST_DISP);
EnableWindow(cur_ctrl, range->displayed_mark_range_cnt && filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->displayed_mark_range_cnt - range->displayed_ignored_mark_range_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->displayed_mark_range_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->displayed_mark_range_cnt);
+ label_cnt = range->displayed_mark_range_cnt;
}
+ if (range->remove_ignored) {
+ label_cnt -= range->displayed_ignored_mark_range_cnt;
+ }
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
/* RANGE_SELECT_USER */
@@ -1484,20 +1508,29 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_RANGE_CAP);
EnableWindow(cur_ctrl, !filtered_active);
- if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->user_range_cnt - range->ignored_user_range_cnt);
+ if (range->include_dependents) {
+ label_cnt = range->user_range_plus_depends_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->user_range_cnt);
+ label_cnt = range->user_range_cnt;
}
+ if (range->remove_ignored) {
+ label_cnt -= range->ignored_user_range_cnt;
+ }
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), label_cnt);
SetWindowText(cur_ctrl, static_val);
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_RANGE_DISP);
EnableWindow(cur_ctrl, filtered_active);
+ if (range->include_dependents) {
+ label_cnt = range->displayed_user_range_plus_depends_cnt;
+ } else {
+ label_cnt = range->displayed_user_range_cnt;
+ }
if (range->remove_ignored) {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->displayed_user_range_cnt - range->displayed_ignored_user_range_cnt);
+ label_cnt -= range->displayed_ignored_user_range_cnt;
} else {
- StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->displayed_user_range_cnt);
}
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), label_cnt);
SetWindowText(cur_ctrl, static_val);
break;
case CVT_SYNTAX_ERROR:
@@ -1562,6 +1595,49 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), displayed_ignored_cnt);
SetWindowText(cur_ctrl, static_val);
+ /* RANGE_REMOVE_IGNORED_PACKETS */
+ switch(range->process) {
+ case(range_process_all):
+ depended_cnt = 0;
+ displayed_depended_cnt = range->displayed_plus_dependents_cnt - range->displayed_cnt;
+ break;
+ case(range_process_selected):
+ depended_cnt = range->selected_plus_depends_cnt - range->selection_range_cnt;
+ displayed_depended_cnt = range->displayed_selected_plus_depends_cnt - range->displayed_selection_range_cnt;
+ break;
+ case(range_process_marked):
+ depended_cnt = range->marked_plus_depends_cnt - range->cf->marked_count;
+ displayed_depended_cnt = range->displayed_marked_plus_depends_cnt - range->displayed_marked_cnt;
+ break;
+ case(range_process_marked_range):
+ depended_cnt = range->mark_range_plus_depends_cnt - range->mark_range_cnt;
+ displayed_depended_cnt = range->displayed_mark_range_plus_depends_cnt - range->displayed_mark_range_cnt;
+ break;
+ case(range_process_user_range):
+ depended_cnt = range->user_range_plus_depends_cnt - range->user_range_cnt;
+ displayed_depended_cnt = range->displayed_user_range_plus_depends_cnt - range->displayed_user_range_cnt;
+ break;
+ default:
+ ws_assert_not_reached();
+ }
+
+ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_INCLUDE_DPD_CB);
+ if (filtered_active) {
+ EnableWindow(cur_ctrl, displayed_depended_cnt);
+ } else {
+ EnableWindow(cur_ctrl, depended_cnt);
+ }
+
+ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_DEPENDED_CAP);
+ EnableWindow(cur_ctrl, depended_cnt && !filtered_active);
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), depended_cnt);
+ SetWindowText(cur_ctrl, static_val);
+
+ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_DEPENDED_DISP);
+ EnableWindow(cur_ctrl, displayed_depended_cnt && filtered_active);
+ StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), displayed_depended_cnt);
+ SetWindowText(cur_ctrl, static_val);
+
cur_ctrl = GetDlgItem(GetParent(dlg_hwnd), IDOK);
EnableWindow(cur_ctrl, range_valid);
}
@@ -1610,6 +1686,10 @@ range_handle_wm_initdialog(HWND dlg_hwnd, packet_range_t *range) {
ws_assert_not_reached();
}
SendMessage(cur_ctrl, BM_SETCHECK, true, 0);
+
+ /* Set the include depended upon checkbox */
+ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_INCLUDE_DPD_CB);
+ SendMessage(cur_ctrl, BM_SETCHECK, range->include_dependents, 0);
}
static void
@@ -1678,6 +1758,14 @@ range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t
}
range_update_dynamics(dlg_hwnd, range);
break;
+ case (BN_CLICKED << 16) | EWFD_INCLUDE_DPD_CB:
+ if (SendMessage(ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) {
+ range->include_dependents = true;
+ } else {
+ range->include_dependents = false;
+ }
+ range_update_dynamics(dlg_hwnd, range);
+ break;
}
}
diff --git a/ui/win32/file_dlg_win32.h b/ui/win32/file_dlg_win32.h
index 0edee0bb..2bb2fb4d 100644
--- a/ui/win32/file_dlg_win32.h
+++ b/ui/win32/file_dlg_win32.h
@@ -142,20 +142,23 @@ void win32_export_file (HWND h_wnd, const wchar_t *title, capture_file *cf, expo
#define EWFD_RANGE_BTN 1006
#define EWFD_RANGE_EDIT 1007
#define EWFD_REMOVE_IGN_CB 1008
-
-#define EWFD_ALL_PKTS_CAP 1009
-#define EWFD_SEL_PKT_CAP 1010
-#define EWFD_MARKED_CAP 1011
-#define EWFD_FIRST_LAST_CAP 1012
-#define EWFD_RANGE_CAP 1013
-#define EWFD_IGNORED_CAP 1014
-
-#define EWFD_ALL_PKTS_DISP 1015
-#define EWFD_SEL_PKT_DISP 1016
-#define EWFD_MARKED_DISP 1017
-#define EWFD_FIRST_LAST_DISP 1018
-#define EWFD_RANGE_DISP 1019
-#define EWFD_IGNORED_DISP 1020
+#define EWFD_INCLUDE_DPD_CB 1009
+
+#define EWFD_ALL_PKTS_CAP 1010
+#define EWFD_SEL_PKT_CAP 1011
+#define EWFD_MARKED_CAP 1012
+#define EWFD_FIRST_LAST_CAP 1013
+#define EWFD_RANGE_CAP 1014
+#define EWFD_IGNORED_CAP 1015
+#define EWFD_DEPENDED_CAP 1016
+
+#define EWFD_ALL_PKTS_DISP 1017
+#define EWFD_SEL_PKT_DISP 1018
+#define EWFD_MARKED_DISP 1019
+#define EWFD_FIRST_LAST_DISP 1020
+#define EWFD_RANGE_DISP 1021
+#define EWFD_IGNORED_DISP 1022
+#define EWFD_DEPENDED_DISP 1023
/* Merge dialog defines. Overlays Open dialog defines above. */
#define EWFD_MERGE_PREPEND_BTN 1050