diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-01-12 15:01:45 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-01-14 07:27:36 +0000 |
commit | 91c166867d0d25749b5185e895693a2067703fa9 (patch) | |
tree | 6666dcbaf790eb6641f1de95dc531c0a7aee021a /ui | |
parent | b255696c601a12f36116ae1f0b04aee5e969663b (diff) | |
download | wireshark-91c166867d0d25749b5185e895693a2067703fa9.tar.gz |
Qt: Add back setWindowFilePath
With support for prepend and append to the window title.
Change-Id: I2215a080b85d36ceb47495bbb94617743fc3f83e
Reviewed-on: https://code.wireshark.org/review/13031
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 5135d332c4..7a2aea93f8 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -1858,19 +1858,19 @@ void MainWindow::setTitlebarForCaptureFile() NULL, NULL, NULL); - QFileInfo fi(utf8_filename); - if (utf8_filename == NULL) { - // So what the heck else can we do here? - setWSWindowTitle(tr("(File name can't be mapped to UTF-8)")); - } else { + if (utf8_filename) { + QFileInfo fi(utf8_filename); setWSWindowTitle(fi.fileName()); + setWindowFilePath(utf8_filename); g_free(utf8_filename); + } else { + // So what the heck else can we do here? + setWSWindowTitle(tr("(File name can't be mapped to UTF-8)")); } } setWindowModified(cf_has_unsaved_data(capture_file_.capFile())); } else { /* We have no capture file. */ - setWindowFilePath(NULL); setWSWindowTitle(); } } @@ -1891,11 +1891,11 @@ void MainWindow::setWSWindowTitle(QString title) } setWindowTitle(title); + setWindowFilePath(NULL); } void MainWindow::setTitlebarForCaptureInProgress() { - setWindowFilePath(NULL); if (capture_file_.capFile()) { setWSWindowTitle(tr("Capturing from %1").arg(cf_get_tempfile_source(capture_file_.capFile()))); } else { |