comparison 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
comparison
equal deleted inserted replaced
324:306ffd913071 325:5fa5c908ca00
182 bool FileStates::supportsActivity(State s, Activity a) 182 bool FileStates::supportsActivity(State s, Activity a)
183 { 183 {
184 return activitiesSupportedBy(s).contains(a); 184 return activitiesSupportedBy(s).contains(a);
185 } 185 }
186 186
187 int FileStates::activityGroup(Activity a)
188 {
189 switch (a) {
190 case Annotate: case Diff: return 0;
191 case Commit: case Revert: return 1;
192 case Add: case Remove: return 2;
193 case RedoMerge: case MarkResolved: return 3;
194 case Ignore: case UnIgnore: return 4;
195 }
196 }
197
187 bool FileStates::supportsActivity(QString file, Activity a) const 198 bool FileStates::supportsActivity(QString file, Activity a) const
188 { 199 {
189 return supportsActivity(stateOf(file), a); 200 return supportsActivity(stateOf(file), a);
190 } 201 }
191 202