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>
This commit is contained in:
Gerald Combs 2015-10-29 11:47:41 -07:00
parent db760bf52e
commit 81bf8edc52
2 changed files with 6 additions and 0 deletions

View File

@ -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();

View File

@ -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);