[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/kioslave/svn/ksvnd
From: John Tapsell <john.tapsell () kdemail ! net>
Date: 2005-05-06 21:56:11
Message-ID: 1115416571.333099.16937.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 410167 by johnflux:
Rework the menu options
M +30 -10 trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp
--- trunk/KDE/kdesdk/kioslave/svn/ksvnd/ksvnd.cpp #410166:410167
@@ -248,27 +248,47 @@
QStringList KSvnd::getActionMenu ( const KURL::List &list ) {
QStringList result;
- if ( AreAllFilesNotInSvn( list ) ) {
+ int listStatus = getStatus( list );
+
+ if ( list.size() == 1 &&
+ (listStatus & SomeAreFolders) &&
+ !(listStatus & SomeAreInParentsEntries) &&
+ !(listStatus & SomeAreExternalToParent) &&
+ !(listStatus & SomeHaveSvn) ) {
+ // A folder not in svn. Parent may or not be.
+ result << "Checkout";
+ }
+
+
+
+// i! (listStatus & AllInSVN) )
+
+ if ( (listStatus & SomeParentsHaveSvn) &&
+ !(listStatus & AllAreInParentsEntries ) ) {
result << "Add";
}
- if ( AreAllFilesInSvn( list ) ) {
- result << "Rename";
- result << "Revert";
+
+ if ( list.size() ==1 &&
+ ((listStatus & AllAreInParentsEntries)) || (listStatus | AllAreExternalToParent)) {
+ result << "Rename"; //Can you rename an external to parent folder?
+ }
+
+ if ( (listStatus & AllAreInParentsEntries)) {
result << "Delete";
- result << "Revert"; //FIXME should be for a folder only
+ if(listStatus & AllAreFolders )
+ result << "Revert";
result << "Import";
-
}
+
return result;
}
QStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
QStringList result;
- if ( AreAllFilesNotInSvn( list ) ) {
- result << "Checkout";
- }
- if ( AreAllFilesInSvn( list ) ) {
+ int listStatus = getStatus( list );
+
+ if ( listStatus & AllParentsHaveSvn ) {
result << "Update";
result << "Commit";
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic