From ecfca5d0a87f7558fa5030386a51448477e1fb46 Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Tue, 22 Sep 2009 18:29:35 -0400 Subject: fix issue 9346. add binary directory to window title to make it easier to deal with multiple cmake-gui instances --- Source/QtDialog/CMakeSetup.cxx | 3 --- Source/QtDialog/CMakeSetupDialog.cxx | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 756e2c8..4dd33c9 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -151,9 +151,6 @@ int main(int argc, char** argv) app.setWindowIcon(QIcon(":/Icons/CMakeSetup.png")); CMakeSetupDialog dialog; - QString title = QString("CMake %1"); - title = title.arg(cmVersion::GetCMakeVersion()); - dialog.setWindowTitle(title); dialog.show(); cmsys::CommandLineArguments arg; diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 552f84e..d0d0aa8 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -62,6 +62,10 @@ void QCMakeThread::run() CMakeSetupDialog::CMakeSetupDialog() : ExitAfterGenerate(true), CacheModified(false), CurrentState(Interrupting) { + QString title = QString(tr("CMake %1")); + title = title.arg(cmVersion::GetCMakeVersion()); + this->setWindowTitle(title); + // create the GUI QSettings settings; settings.beginGroup("Settings/StartPath"); @@ -513,6 +517,11 @@ void CMakeSetupDialog::onSourceDirectoryChanged(const QString& dir) void CMakeSetupDialog::onBinaryDirectoryChanged(const QString& dir) { + QString title = QString(tr("CMake %1 - %2")); + title = title.arg(cmVersion::GetCMakeVersion()); + title = title.arg(dir); + this->setWindowTitle(title); + this->CacheModified = false; this->CacheValues->cacheModel()->clear(); qobject_cast(this->CacheValues->itemDelegate())->clearChanges(); -- cgit v0.12