diff options
-rw-r--r-- | doc/wireshark.pod.template | 10 | ||||
-rw-r--r-- | ui/commandline.c | 2 | ||||
-rw-r--r-- | ui/preference_utils.h | 2 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 4 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 1 | ||||
-rw-r--r-- | wireshark-qt.cpp | 16 |
6 files changed, 27 insertions, 8 deletions
diff --git a/doc/wireshark.pod.template b/doc/wireshark.pod.template index 90f11dffe6..ca0d1ff143 100644 --- a/doc/wireshark.pod.template +++ b/doc/wireshark.pod.template @@ -446,10 +446,12 @@ List the data link types supported by the interface and exit. =item -m E<lt>fontE<gt> -Set the name of the font used by B<Wireshark> for most text. B<Wireshark> -will construct the name of the bold font used for the data in the byte -view pane that corresponds to the field selected in the packet details -pane from the name of the main text font. +GTK+ only. Deprecated. + +Set the name of the monospace font used in the packet list, packet detail, +packet bytes, and other views. This option is deprecated and will be removed +in a future version of Wireshark. Use B<-o gui.qt.font_name> or +B<-o gui.gtk2.font_name> instead. =item -n diff --git a/ui/commandline.c b/ui/commandline.c index 9381ed1a6b..109952c42c 100644 --- a/ui/commandline.c +++ b/ui/commandline.c @@ -468,7 +468,7 @@ void commandline_other_options(int argc, char *argv[], commandline_param_info_t* arg_error = TRUE; #endif break; - case 'm': /* Fixed-width font for the display */ + case 'm': /* Fixed-width font for the display. GTK+ only. */ g_free(param_info->prefs_p->gui_gtk2_font_name); param_info->prefs_p->gui_gtk2_font_name = g_strdup(optarg); break; diff --git a/ui/preference_utils.h b/ui/preference_utils.h index d85a4ea9e1..e31db19fcc 100644 --- a/ui/preference_utils.h +++ b/ui/preference_utils.h @@ -70,7 +70,7 @@ extern void reset_stashed_pref(pref_t *pref); /** If autoscroll in live captures is active or not */ -extern gboolean auto_scroll_live; /* GTK+ only. */ +extern gboolean auto_scroll_live; /** Fill in capture options with values from the preferences */ diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 617e184835..4d81268241 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -1027,9 +1027,9 @@ void MainWindow::mergeCaptureFile() gchar *err_msg; if (!dfilter_compile(read_filter.toUtf8().constData(), &rfcode, &err_msg)) { - /* Not valid. Tell the user, and go back and run the file + /* Not valid. Tell the user, and go back and run the file selection box again once they dismiss the alert. */ - //bad_dfilter_alert_box(top_level, read_filter->str); + // Similar to commandline_info.jfilter section in main(). QMessageBox::warning(this, tr("Invalid Read Filter"), QString(tr("The filter expression %1 isn't a valid read filter. (%2).").arg(read_filter, err_msg)), QMessageBox::Ok); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 017eaa5d02..ac7bc0d972 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -1537,6 +1537,7 @@ void MainWindow::setFeaturesEnabled(bool enabled) if(enabled) { main_ui_->statusBar->clearMessage(); + main_ui_->actionGoAutoScroll->setChecked(auto_scroll_live); } else { diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 16fc62dc2e..cf73e5deb9 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -796,6 +796,22 @@ int main(int argc, char *argv[]) /* Jump to the specified frame number, kept for backward compatibility. */ cf_goto_frame(CaptureFile::globalCapFile(), commandline_info.go_to_packet); + } else if (commandline_info.jfilter != NULL) { + dfilter_t *jump_to_filter = NULL; + /* try to compile given filter */ + if (!dfilter_compile(commandline_info.jfilter, &jump_to_filter, &err_msg)) { + // Similar code in MainWindow::mergeCaptureFile(). + QMessageBox::warning(main_w, QObject::tr("Invalid Display Filter"), + QObject::tr("The filter expression %1 isn't a valid display filter. (%2).") + .arg(commandline_info.jfilter, err_msg), + QMessageBox::Ok); + g_free(err_msg); + } else { + /* Filter ok, jump to the first packet matching the filter + conditions. Default search direction is forward, but if + option d was given, search backwards */ + cf_find_packet_dfilter(CaptureFile::globalCapFile(), jump_to_filter, commandline_info.jump_backwards); + } } } } |