diff options
-rw-r--r-- | ui/qt/capture_options_dialog.cpp | 9 | ||||
-rw-r--r-- | ui/qt/capture_options_dialog.ui | 41 |
2 files changed, 49 insertions, 1 deletions
diff --git a/ui/qt/capture_options_dialog.cpp b/ui/qt/capture_options_dialog.cpp index 78a4f90d21..dae7e6375c 100644 --- a/ui/qt/capture_options_dialog.cpp +++ b/ui/qt/capture_options_dialog.cpp @@ -223,6 +223,7 @@ CaptureOptionsDialog::CaptureOptionsDialog(QWidget *parent) : ui->filenameLineEdit->setPlaceholderText(tr("Leave blank to use a temporary file")); ui->rbCompressionNone->setChecked(true); + ui->rbTimeNum->setChecked(true); ui->tempDirLineEdit->setPlaceholderText(g_get_tmp_dir()); ui->tempDirLineEdit->setText(global_capture_opts.temp_dir); @@ -1266,6 +1267,14 @@ bool CaptureOptionsDialog::saveOptionsToPreferences() global_capture_opts.compress_type = NULL; } + if (ui->rbTimeNum->isChecked() ) { + global_capture_opts.has_nametimenum = true; + } else if (ui->rbNumTime->isChecked() ) { + global_capture_opts.has_nametimenum = false; + } else { + global_capture_opts.has_nametimenum = false; + } + prefs_main_write(); return true; } diff --git a/ui/qt/capture_options_dialog.ui b/ui/qt/capture_options_dialog.ui index b34ecb6af8..381ea728c6 100644 --- a/ui/qt/capture_options_dialog.ui +++ b/ui/qt/capture_options_dialog.ui @@ -483,7 +483,7 @@ For example, use 1 hour to have a new file created every hour on the hour.</stri <property name="title"> <string>compression</string> </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> + <layout class="QVBoxLayout" name="verticalLayout_4"> <item> <widget class="QRadioButton" name="rbCompressionNone"> <property name="text"> @@ -507,6 +507,44 @@ For example, use 1 hour to have a new file created every hour on the hour.</stri </layout> </widget> </item> + <item row="5" column="1" colspan="2"> + <widget class="QGroupBox" name="nameTemplateGB"> + <property name="title"> + <string>File infix pattern</string> + </property> + <property name="toolTip"> + <string><html><head/><body><p>In multiple file mode, the date and time and file index number are inserted between filename template and any suffix. Select their order.</p></body></html></string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QRadioButton" name="rbTimeNum"> + <property name="text"> + <string>YYYYmmDDHHMMSS_NNNNN</string> + </property> + <property name="toolTip"> + <string><html><head/><body><p>Date and time before the file index number. This causes files to sort in creation time order, and keeps files from the same batch closely ordered.</p></body></html></string> + </property> + <attribute name="buttonGroup"> + <string notr="true">nameTimeNumBG</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="rbNumTime"> + <property name="text"> + <string>NNNNN_YYYYmmDDHHMMSS</string> + </property> + <property name="toolTip"> + <string><html><head/><body><p>File index number before the date and time. This is the historic Wireshark ordering.</p></body></html></string> + </property> + <attribute name="buttonGroup"> + <string notr="true">nameTimeNumBG</string> + </attribute> + </widget> + </item> + </layout> + </widget> + </item> <item row="0" column="3" rowspan="4"> <spacer name="horizontalSpacer_8"> <property name="orientation"> @@ -982,5 +1020,6 @@ For example, use 1 hour to have a new file created every hour on the hour.</stri <connections/> <buttongroups> <buttongroup name="buttonGroup"/> + <buttongroup name="nameTimeNumBG"/> </buttongroups> </ui> |