diff filestates.cpp @ 325:5fa5c908ca00 filelist_right_button_menu

Add right-button menus (not yet functional, but hopefully with the right things in them)
author Chris Cannam
date Thu, 10 Mar 2011 21:04:58 +0000
parents 306ffd913071
children 6e1fdda1dff2
line wrap: on
line diff
--- a/filestates.cpp	Thu Mar 10 18:45:50 2011 +0000
+++ b/filestates.cpp	Thu Mar 10 21:04:58 2011 +0000
@@ -184,6 +184,17 @@
     return activitiesSupportedBy(s).contains(a);
 }
 
+int FileStates::activityGroup(Activity a)
+{
+    switch (a) {
+    case Annotate: case Diff: return 0;
+    case Commit: case Revert: return 1;
+    case Add: case Remove: return 2;
+    case RedoMerge: case MarkResolved: return 3;
+    case Ignore: case UnIgnore: return 4;
+    }
+}
+
 bool FileStates::supportsActivity(QString file, Activity a) const
 {
     return supportsActivity(stateOf(file), a);