From d1cf6c418855004a249d44fd383c889cbd1e7662 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 27 Nov 2016 04:50:53 +0100 Subject: Change window title Set window title to Tabname and dir if the current tab is changed. --- shemovcleaner.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shemovcleaner.cpp') diff --git a/shemovcleaner.cpp b/shemovcleaner.cpp index 80f2cd3..1e886a1 100644 --- a/shemovcleaner.cpp +++ b/shemovcleaner.cpp @@ -136,16 +136,21 @@ void ShemovCleaner::configure(){ } void ShemovCleaner::tabChanged(int idx){ + QString winTitle; if(idx == Torrents){ setDuration("00:00:00"); updateFreeSpace(mTorrentTab->currentDir()); + winTitle = QString(tr("%1 Torrents [%2]")).arg(qApp->applicationName()).arg(mTorrentTab->currentDir()); }else if(idx == Videos){ mFileTab->fileView()->setFocus(); updateFreeSpace(mFileTab->currentDir()); + winTitle = QString(tr("%1 Files [%2]")).arg(qApp->applicationName()).arg(mFileTab->currentDir()); }else if(idx == Actors){ mActorTab->actorView()->setFocus(); updateFreeSpace(mFileTab->currentDir()); + winTitle = tr("%1 Actors").arg(qApp->applicationName()); } + setWindowTitle(winTitle); } void ShemovCleaner::closeEvent(QCloseEvent *e){ -- cgit v1.2.3-70-g09d2