Qt: Set normal window icon when capture file closed.

Also rename and use setDefaultWindowTitle() to set the window title
back to "The Wireshark Network Analyzer".

Change-Id: Ifa87d1a9b9140de4f256effdfca8485f65e2f839
Reviewed-on: https://code.wireshark.org/review/12025
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Stig Bjørlykke 2015-11-22 00:01:36 +01:00 committed by Anders Broman
parent d61c3d592b
commit a02fc3b094
3 changed files with 6 additions and 6 deletions

View File

@ -1896,16 +1896,15 @@ void MainWindow::setTitlebarForCaptureFile()
} else {
/* We have no capture file. */
setWindowFilePath(NULL);
setWindowTitle(tr("The Wireshark Network Analyzer"));
setDefaultWindowTitle();
}
}
void MainWindow::setTitlebarForSelectedTreeRow()
void MainWindow::setDefaultWindowTitle()
{
setWindowTitle(tr("The Wireshark Network Analyzer"));
}
void MainWindow::setTitlebarForCaptureInProgress()
{
gchar *window_name;
@ -1917,7 +1916,7 @@ void MainWindow::setTitlebarForCaptureInProgress()
g_free(window_name);
} else {
/* We have no capture in progress. */
setWindowTitle(tr("The Wireshark Network Analyzer"));
setDefaultWindowTitle();
}
}

View File

@ -183,7 +183,7 @@ private:
void initTimePrecisionFormatMenu();
void initFreezeActions();
void setTitlebarForSelectedTreeRow();
void setDefaultWindowTitle();
void setTitlebarForCaptureFile();
void setTitlebarForCaptureInProgress();
void setMenusForCaptureFile(bool force_disable = false);

View File

@ -723,7 +723,8 @@ void MainWindow::captureFileClosed() {
main_ui_->statusBar->popFileStatus();
setTitlebarForSelectedTreeRow();
setDefaultWindowTitle();
setWindowIcon(wsApp->normalIcon());
setMenusForSelectedPacket();
setMenusForSelectedTreeRow();