Summary: | project name should be displayed in window title | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Ga <Gael.de-Chalendar> |
Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ga
2003-08-08 11:37:32 UTC
Subject: kdevelop/src CVS commit by dagerbo: Show project name in window caption. Very useful for those of us who keep ending up with multiple KDevelop windows open.. ;) CCMAIL: 62375-done@bugs.kde.org M +17 -0 mainwindow.cpp 1.69 M +1 -0 mainwindow.h 1.21 --- kdevelop/src/mainwindow.cpp #1.68:1.69 @@ -41,4 +41,5 @@ #include <kiconloader.h> +#include <kdevproject.h> #include "projectmanager.h" #include "partcontroller.h" @@ -1425,3 +1426,19 @@ void MainWindow::setWindowMenu(QPopupMen } +void MainWindow::setCaption( const QString & caption ) +{ + if ( KDevProject * project = API::getInstance()->project() ) + { + QString projectname = project->projectName(); + + QString suffix(".kdevelop"); + if ( projectname.endsWith( suffix ) ) + { + projectname.truncate( projectname.length() - suffix.length() ); + } + + KMdiMainFrm::setCaption( projectname + " - " + caption ); + } +} + #include "mainwindow.moc" --- kdevelop/src/mainwindow.h #1.20:1.21 @@ -88,4 +88,5 @@ public: public slots: + void setCaption( const QString &); void createGUI(KParts::Part *part); void gotoNextWindow(); Thank you Jens, it's quite exactly the solving of my wish. But one case is not treated: when all editor windows are closed, the only caption is "Kdevelop" while it should, for example, "Kdevelop - Project name" or maybe only "Project name" |