[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesdk/kbabel/catalogmanager
From: Stanislav Višňovský
Date: 2003-11-26 21:37:42
[Download RAW message or body]
CVS commit by nanulo:
Fix automatic adding files and directories into CVS. Hmmm, can't find the
bug number ATM :-(
M +8 -4 catalogmanagerview.cpp 1.88
M +26 -0 catmanlistitem.cpp 1.24
M +8 -0 catmanlistitem.h 1.12
--- kdesdk/kbabel/catalogmanager/catalogmanagerview.cpp #1.87:1.88
@@ -999,6 +999,9 @@ void CatalogManagerView::doCVSCommand( C
QString cvsItem;
CatManListItem * item = (CatManListItem*)currentItem( );
- if ( item->isDir( ) ) {
- cvsItem = basedir + item->packageDir( );
+ if ( cmd == CVS::Commit && item->isDir( ) ) {
+ // all children including directories
+ QStringList cvsItems = item->allChildrenFileList ();
+ if ( !cvsItems.isEmpty( ) )
+ cvshandler->execCVSCommand(cmd, cvsItems, templates);
} else {
if ( templates && item->hasPot( ) )
@@ -1006,7 +1009,8 @@ void CatalogManagerView::doCVSCommand( C
else if ( !templates && item->hasPo( ) )
cvsItem = item->poFile( );
- }
+
if ( !cvsItem.isEmpty( ) )
cvshandler->execCVSCommand(cmd, cvsItem, templates);
+ }
}
}
--- kdesdk/kbabel/catalogmanager/catmanlistitem.cpp #1.23:1.24
@@ -196,4 +196,30 @@ QStringList CatManListItem::allChildrenL
+QStringList CatManListItem::allChildrenFileList(bool onlyFiles) const
+{
+ QStringList childrenList;
+
+ CatManListItem * myChild = (CatManListItem*)firstChild();
+ while( myChild )
+ {
+ if(myChild->isFile() && myChild->hasPo())
+ {
+ childrenList.append(myChild->poFile());
+ }
+ else if(myChild->isDir())
+ {
+ if(!onlyFiles)
+ childrenList.append(myChild->name());
+
+ childrenList+=myChild->allChildrenFileList(onlyFiles);
+ }
+
+ myChild = (CatManListItem*)myChild->nextSibling();
+ }
+
+ return childrenList;
+}
+
+
QStringList CatManListItem::contentsList(bool onlyFiles) const
{
--- kdesdk/kbabel/catalogmanager/catmanlistitem.h #1.11:1.12
@@ -69,4 +69,12 @@ public:
QStringList allChildrenList(bool onlyFiles=false) const;
+ /**
+ * returns the relative file names of all children of this item
+ * (including all subdirectries)
+ * @param onlyFiles flag, if only the names of files should be returned
+ * @see CatManListItem::contentsList
+ */
+ QStringList allChildrenFileList(bool onlyFiles=false) const;
+
void setMarked(bool on);
bool marked() const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic