aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-10-29 11:47:41 -0700
committerGerald Combs <gerald@wireshark.org>2015-10-29 20:50:13 +0000
commit81bf8edc52f1c8df557bbf4102182bcae93e0a4d (patch)
treeb6b93cfba3bc53c8fb944849f8898fc19ca0b2ad /ui
parentdb760bf52eafe728ab9be0e40760cda5e536572b (diff)
Update the taskbar icon when we start a capture.
Call both QMainWindow::setWindowIcon and QGuiApplication::setWindowIcon when we switch between normal and capture icons. The former sets the window title bar icon and the latter (depending on your OS and Qt version) sets the taskbar or dock icon. Change-Id: Ida523d423bef4df44696f6cd75208986c8787d0f Reviewed-on: https://code.wireshark.org/review/11414 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main_window.cpp5
-rw-r--r--ui/qt/main_window.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 2b47f866c0..a923a533d9 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -1979,6 +1979,11 @@ void MainWindow::setMenusForFileSet(bool enable_list_files) {
main_ui_->actionFileSetPreviousFile->setEnabled(enable_prev);
}
+void MainWindow::setWindowIcon(const QIcon &icon) {
+ wsApp->setWindowIcon(icon);
+ QMainWindow::setWindowIcon(icon);
+}
+
void MainWindow::updateForUnsavedChanges() {
setTitlebarForCaptureFile();
setMenusForCaptureFile();
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index 40c52e7b9a..2fbf527c73 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -185,6 +185,7 @@ private:
void setMenusForCaptureStopping();
void setForCapturedPackets(bool have_captured_packets);
void setMenusForFileSet(bool enable_list_files);
+ void setWindowIcon(const QIcon &icon);
void externalMenuHelper(ext_menu_t * menu, QMenu * subMenu, gint depth);