aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-06-24 12:59:07 -0700
committerGerald Combs <gerald@wireshark.org>2016-06-24 21:23:11 +0000
commitfe6856684b9c48edd093dbe3b9931630d9325ce6 (patch)
tree65f64457df2dc1f55e3f950c4069dac3474244df
parentcc007e59082ed710b46c75a346ec8defde9574d5 (diff)
Qt: Fix "-l" behavior.
gbcae998 didn't completely fix the missing "-l" behavior. Bug: 12311 Change-Id: Iee3c844013ac137e94848aaafca7aeb3de43e080 Reviewed-on: https://code.wireshark.org/review/16128 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r--ui/qt/main_window.cpp5
-rw-r--r--ui/qt/main_window.h2
-rw-r--r--ui/qt/main_window_slots.cpp6
3 files changed, 3 insertions, 10 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 137aae78a8..2c3853b422 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -1728,7 +1728,6 @@ void MainWindow::initMainToolbarIcons()
main_ui_->actionGoAutoScroll->setIcon(StockIcon("x-stay-last"));
main_ui_->actionViewColorizePacketList->setIcon(StockIcon("x-colorize-packets"));
-// main_ui_->actionViewAutoScroll->setIcon(StockIcon("x-stay-last"));
QList<QKeySequence> zi_seq = main_ui_->actionViewZoomIn->shortcuts();
zi_seq << QKeySequence(Qt::CTRL + Qt::Key_Equal);
@@ -2184,7 +2183,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
}
/* Update main window items based on whether there's a capture in progress. */
-void MainWindow::setForCaptureInProgress(gboolean capture_in_progress)
+void MainWindow::setForCaptureInProgress(bool capture_in_progress)
{
setMenusForCaptureInProgress(capture_in_progress);
@@ -2192,7 +2191,7 @@ void MainWindow::setForCaptureInProgress(gboolean capture_in_progress)
#ifdef HAVE_LIBPCAP
packet_list_->setCaptureInProgress(capture_in_progress);
-// set_toolbar_for_capture_in_progress(capture_in_progress);
+ packet_list_->setVerticalAutoScroll(capture_in_progress && main_ui_->actionGoAutoScroll->isChecked());
// set_capture_if_dialog_for_capture_in_progress(capture_in_progress);
#endif
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index 63295d28d2..67163415d7 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -212,7 +212,7 @@ private:
void externalMenuHelper(ext_menu_t * menu, QMenu * subMenu, gint depth);
- void setForCaptureInProgress(gboolean capture_in_progress = false);
+ void setForCaptureInProgress(bool capture_in_progress = false);
QMenu* findOrAddMenu(QMenu *parent_menu, QString& menu_text);
void recursiveCopyProtoTreeItems(QTreeWidgetItem *item, QString &clip, int ident_level);
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 0c1aa4c152..d2af1ca3d3 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -859,9 +859,6 @@ void MainWindow::startCapture() {
capture_options *capture_opts = cap_session_.capture_opts;
GString *interface_names;
- /* enable autoscroll timer as needed. */
- packet_list_->setVerticalAutoScroll(main_ui_->actionGoAutoScroll->isChecked());
-
/* Add "interface name<live capture in progress>" on main status bar */
interface_names = get_iface_list_string(capture_opts, 0);
if (strlen (interface_names->str) > 0) {
@@ -989,9 +986,6 @@ void MainWindow::stopCapture() {
/* Pop the "<live capture in progress>" message off the status bar. */
main_ui_->statusBar->setFileName(capture_file_);
-
- /* disable autoscroll timer if any. */
- packet_list_->setVerticalAutoScroll(false);
}
// Keep focus rects from showing through the welcome screen. Primarily for