diff --git a/macosx/NSMenuAdditions.h b/macosx/NSMenuAdditions.h index d28cbe6fe..760b37545 100644 --- a/macosx/NSMenuAdditions.h +++ b/macosx/NSMenuAdditions.h @@ -26,6 +26,6 @@ @interface NSMenu (NSMenuAdditions) -- (void) moveItemsToEndFromMenu: (NSMenu *) oldMenu inRange: (NSRange) range; +- (void) appendItemsFromMenu: (NSMenu *) menu atIndexes: (NSIndexSet *) indexes; @end diff --git a/macosx/NSMenuAdditions.m b/macosx/NSMenuAdditions.m index 17a2d4c99..92be8a1b4 100644 --- a/macosx/NSMenuAdditions.m +++ b/macosx/NSMenuAdditions.m @@ -26,15 +26,17 @@ @implementation NSMenu (NSMenuAdditions) -- (void) moveItemsToEndFromMenu: (NSMenu *) oldMenu inRange: (NSRange) range +- (void) appendItemsFromMenu: (NSMenu *) menu atIndexes: (NSIndexSet *) indexes { + int bottom = [self numberOfItems]; + NSMenuItem * item; - int i; - for (i=0; i