Author: ericwa Date: Sat Mar 22 19:35:29 2014 New Revision: 10609 URL: http://svn.gna.org/viewcvs/etoile?rev=10609&view=rev Log: ProjectDemo: Outliner: include item labels in most of the commit descriptors
Modified: trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/English.lproj/Commits/org.etoile.ProjectDemo.json trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/OutlineController.m Modified: trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/English.lproj/Commits/org.etoile.ProjectDemo.json URL: http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/English.lproj/Commits/org.etoile.ProjectDemo.json?rev=10609&r1=10608&r2=10609&view=diff ============================================================================== --- trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/English.lproj/Commits/org.etoile.ProjectDemo.json (original) +++ trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/English.lproj/Commits/org.etoile.ProjectDemo.json Sat Mar 22 19:35:29 2014 @@ -39,25 +39,25 @@ "add-item": { "type": "creation", - "shortDescription": "Add item" + "shortDescription": "Add item '%@'" }, "add-child-item": { "type": "creation", - "shortDescription": "Add child item" + "shortDescription": "Add child item '%@' to '%@'" }, "shift-left": { "type": "modification", - "shortDescription": "Shift left" + "shortDescription": "Shift item '%@' left" }, "shift-right": { "type": "modification", - "shortDescription": "Shift right" + "shortDescription": "Shift item '%@' right" }, "revert": @@ -81,13 +81,13 @@ "delete": { "type": "deletion", - "shortDescription": "Deleted one or several objects" + "shortDescription": "Delete '%@'" }, "rename": { "type": "renaming", - "shortDescription": "Rename outline item" + "shortDescription": "Rename outline item '%@' to '%@'" }, "duplicate": Modified: trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/OutlineController.m URL: http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/OutlineController.m?rev=10609&r1=10608&r2=10609&view=diff ============================================================================== --- trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/OutlineController.m (original) +++ trunk/Etoile/Frameworks/CoreObject/Samples/ProjectDemo/OutlineController.m Sat Mar 22 19:35:29 2014 @@ -123,8 +123,7 @@ [outlineView expandItem: dest]; - [self commitWithIdentifier: @"add-item"]; - // TODO: pass [item label] to commit description + [self commitWithIdentifier: @"add-item" descriptionArguments: @[item.label]]; } - (IBAction) addChildItem: (id)sender; @@ -138,7 +137,7 @@ [outlineView expandItem: dest]; - [self commitWithIdentifier: @"add-child-item"]; + [self commitWithIdentifier: @"add-child-item" descriptionArguments: @[item.label, dest.label]]; } } @@ -155,7 +154,7 @@ [parent removeItemAtIndex: indexOfItemInParent]; [grandparent addItem: item atIndex: [[grandparent contents] indexOfObject: parent] + 1]; - [self commitWithIdentifier: @"shift-left"]; + [self commitWithIdentifier: @"shift-left" descriptionArguments: @[item.label]]; [outlineView selectRowIndexes: [NSIndexSet indexSetWithIndex:[outlineView rowForItem: item]] byExtendingSelection: NO]; @@ -179,7 +178,7 @@ [parent removeItemAtIndex: [[parent contents] indexOfObject: item]]; [newParent addItem: item]; - [self commitWithIdentifier: @"shift-right"]; // TODO: Pass [item label] + [self commitWithIdentifier: @"shift-right" descriptionArguments: @[item.label]]; [outlineView expandItem: newParent]; @@ -208,10 +207,10 @@ { NSInteger index = [[[itemToDelete parent] contents] indexOfObject: itemToDelete]; assert(index != NSNotFound); - NSString *label = [itemToDelete label]; + [[itemToDelete parent] removeItemAtIndex: index]; - [self commitWithIdentifier: @"delete"]; + [self commitWithIdentifier: @"delete" descriptionArguments: @[itemToDelete.label]]; } } @@ -339,7 +338,7 @@ NSString *oldLabel = [item label]; [item setLabel: object]; - [self commitWithIdentifier: @"rename"]; // TODO: Use [item label] in description + [self commitWithIdentifier: @"rename" descriptionArguments: @[oldLabel, object]]; } } _______________________________________________ Etoile-cvs mailing list Etoile-cvs@gna.org https://mail.gna.org/listinfo/etoile-cvs