[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/vcs/cvsclient
From: Tobias Gläßer <tobi.web () gmx ! de>
Date: 2004-06-30 18:50:36
Message-ID: 20040630185036.C983F9963 () office ! kde ! org
[Download RAW message or body]
CVS commit by tobgle:
Fixed isValidDirectory() function. The 'CVS' context menu is only shown now, if the \
current project really has CVS support.
M +11 -4 cvspart.cpp 1.75
--- kdevelop/vcs/cvsclient/cvspart.cpp #1.74:1.75
@@ -331,4 +331,10 @@ void CvsPart::createNewProject( const QS
void CvsPart::contextMenu( QPopupMenu *popup, const Context *context )
{
+
+// If the current project doesn't support CVS, we don't
+// want to confuse the user with a CVS popup menu.
+if(!isValidDirectory(project()->projectDirectory()))
+ return;
+
if (context->hasType( Context::FileContext ))
{
@@ -1086,8 +1092,9 @@ void CvsPart::slotProjectClosed()
bool CvsPart::isValidDirectory( const QString &dirPath ) const
{
- QDir cvsdir( dirPath );
- QString entriesFileName = dirPath + QDir::separator() + "Entries";
- QString rootFileName = dirPath + QDir::separator() + "Entries";
- QString repoFileName = dirPath + QDir::separator() + "Repository";
+ QString cvs = "/CVS/";
+ QDir cvsdir( dirPath + cvs );
+ QString entriesFileName = dirPath + cvs + "Entries";
+ QString rootFileName = dirPath + cvs + "Root";
+ QString repoFileName = dirPath + cvs + "Repository";
return cvsdir.exists() &&
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic