diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-25 14:39:43 -0700 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-26 18:37:35 +0000 |
commit | 0953c36ec94622e3b901ff840c361d79bdbd327f (patch) | |
tree | 5e4dac0cb5a08d3455de3b3b1b561d1357694e66 /ui/qt/capture_interfaces_dialog.cpp | |
parent | 66c738817c8d2f857bd5fed2e3cfa325e712d791 (diff) | |
download | wireshark-0953c36ec94622e3b901ff840c361d79bdbd327f.tar.gz |
Qt: tweaks to Capture Interfaces dialog
- Add option to stop capture after X files are created
- Increase the max value for number of packets / files / bytes / seconds from 1000 to INT_MAX
- Fix capture name file selection
Change-Id: I9fb8eeaa925e5bd5380bb654686575f41126546a
Reviewed-on: https://code.wireshark.org/review/9162
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui/qt/capture_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index d144aac65b..13c035b799 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -152,7 +152,7 @@ CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget *parent) : connect(this, SIGNAL(interfacesChanged()), ui->allFilterComboBox, SIGNAL(interfacesChanged())); connect(this, SIGNAL(ifsChanged()), this, SLOT(refreshInterfaceList())); connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(updateLocalInterfaces())); - connect(ui->browseButton, SIGNAL(clicked()), this, SLOT(on_browseButton_clicked())); + connect(ui->browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked())); } void CaptureInterfacesDialog::allFilterChanged() @@ -262,7 +262,7 @@ void CaptureInterfacesDialog::on_capturePromModeCheckBox_toggled(bool checked) } } -void CaptureInterfacesDialog::on_browseButton_clicked() +void CaptureInterfacesDialog::browseButtonClicked() { char *open_dir = NULL; @@ -277,7 +277,7 @@ void CaptureInterfacesDialog::on_browseButton_clicked() open_dir = prefs.gui_fileopen_dir; break; } - QString file_name = QFileDialog::getOpenFileName(this, tr("Specify a Capture File"), open_dir); + QString file_name = QFileDialog::getSaveFileName(this, tr("Specify a Capture File"), open_dir); ui->lineEdit->setText(file_name); } @@ -434,6 +434,11 @@ void CaptureInterfacesDialog::updateInterfaces() ui->stopPktSpinBox->setValue(global_capture_opts.autostop_packets); } + if (global_capture_opts.has_autostop_files) { + ui->stopFilesCheckBox->setChecked(true); + ui->stopFilesSpinBox->setValue(global_capture_opts.autostop_files); + } + ui->cbUpdatePacketsRT->setChecked(global_capture_opts.real_time_mode); ui->cbAutoScroll->setChecked(true); ui->cbExtraCaptureInfo->setChecked(global_capture_opts.show_info); @@ -736,6 +741,11 @@ bool CaptureInterfacesDialog::saveOptionsToPreferences() global_capture_opts.autostop_packets = ui->stopPktSpinBox->value(); } + global_capture_opts.has_autostop_files = ui->stopFilesCheckBox->isChecked(); + if (global_capture_opts.has_autostop_files) { + global_capture_opts.autostop_files = ui->stopFilesSpinBox->value(); + } + for (int col = col_link_; col <= col_filter_; col++){ if (ui->interfaceTree->isColumnHidden(col)) { continue; |