From ab291dc44df12179661cdb29f49dfad27c860566 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 24 Oct 2006 21:04:40 +0000 Subject: [PATCH] proper title in prefs window --- macosx/PrefsController.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index e6f54710f..85c229684 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -916,13 +916,20 @@ int difference = [view frame].size.height - [[window contentView] frame].size.height; windowRect.origin.y -= difference; windowRect.size.height += difference; - - [window setTitle: [fToolbar selectedItemIdentifier]]; [view setHidden: YES]; [window setContentView: view]; [window setFrame: windowRect display: YES animate: YES]; [view setHidden: NO]; + + NSToolbarItem * item; + NSEnumerator * enumerator = [[fToolbar items] objectEnumerator]; + while ((item = [enumerator nextObject])) + if ([[item itemIdentifier] isEqualToString: [fToolbar selectedItemIdentifier]]) + { + [window setTitle: [item label]]; + break; + } } - (void) folderSheetClosed: (NSOpenPanel *) openPanel returnCode: (int) code contextInfo: (void *) info