From 7bc6c1014e316a67fc6528c402d6a1e7bd2a6dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Sun, 22 Nov 2015 00:01:36 +0100 Subject: 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 Petri-Dish: Alexis La Goutte Reviewed-by: Anders Broman (cherry picked from commit a02fc3b094628f504a13012f4cf5bb7ca61ff17f) Reviewed-on: https://code.wireshark.org/review/12035 --- ui/qt/main_window.cpp | 7 +++---- ui/qt/main_window.h | 2 +- ui/qt/main_window_slots.cpp | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 1743bc8e8e..940a63c5c5 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -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(); } } diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 6cddf1b9b2..62f4e43114 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -183,7 +183,7 @@ private: void initTimePrecisionFormatMenu(); void initFreezeActions(); - void setTitlebarForSelectedTreeRow(); + void setDefaultWindowTitle(); void setTitlebarForCaptureFile(); void setTitlebarForCaptureInProgress(); void setMenusForCaptureFile(bool force_disable = false); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 5db040b0ec..b492c3aa6f 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -732,7 +732,8 @@ void MainWindow::captureFileClosed() { main_ui_->statusBar->popFileStatus(); - setTitlebarForSelectedTreeRow(); + setDefaultWindowTitle(); + setWindowIcon(wsApp->normalIcon()); setMenusForSelectedPacket(); setMenusForSelectedTreeRow(); -- cgit v1.2.1