From 51881a8ae93b14ac7a3007bcd66bad670e91ba49 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 1 Jul 2010 06:22:02 +0000 Subject: =?UTF-8?q?=E2=80=A2=20after=20opening=20spfs=20file=20reset=20tab?= =?UTF-8?q?Bar=20by=20looking=20at=20setting=20for=20SPAlwaysShowWindowTab?= =?UTF-8?q?Bar=20=E2=80=A2=20fixed=20CSV=20Import=20file=20display=20in=20?= =?UTF-8?q?NSPathControl=20if=20SP=20runs=20localized=20-=20the=20problem?= =?UTF-8?q?=20is=20very=20likely=20a=20bug=20in=20[NSPathControl=20setURL:?= =?UTF-8?q?];=20that's=20why=20create=20a=20new=20temporary=20NSPathContro?= =?UTF-8?q?l=20and=20set=20the=20GUI's=20NSPathControl=20via=20[NSPathCont?= =?UTF-8?q?rol=20setPathComponentCells:[tempPathControl=20pathComponentCel?= =?UTF-8?q?ls]]=20-=20this=20should=20fix=20i751=20=E2=80=A2=20resized=20s?= =?UTF-8?q?ome=20components=20in=20CSV=20Import=20sheet=20to=20fit=20for?= =?UTF-8?q?=20localizations=20a=20bit=20better?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 6 +++++- Source/SPFieldMapperController.m | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 46709aac..2d719c95 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -406,8 +406,12 @@ // Select active tab [newWindowController selectTabAtIndex:[[window objectForKey:@"selectedTabIndex"] intValue]]; + // Reset setHideForSingleTab - [newWindowController setHideForSingleTab:YES]; + if([[NSUserDefaults standardUserDefaults] objectForKey:SPAlwaysShowWindowTabBar]) + [newWindowController setHideForSingleTab:[[NSUserDefaults standardUserDefaults] boolForKey:SPAlwaysShowWindowTabBar]]; + else + [newWindowController setHideForSingleTab:YES]; } diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m index d6f8185e..9f77398d 100644 --- a/Source/SPFieldMapperController.m +++ b/Source/SPFieldMapperController.m @@ -82,7 +82,13 @@ { // Set source path - [fileSourcePath setURL:[NSURL fileURLWithPath:sourcePath]]; + // Note: [fileSourcePath setURL:[NSURL fileWithPath:sourcePath]] does NOT work + // if Sequel Pro runs localized. Reason unknown, it seems to be a NSPathControl bug. + // Ask HansJB for more info. + NSPathControl *pc = [[[NSPathControl alloc] initWithFrame:NSZeroRect] autorelease]; + [pc setURL:[NSURL fileURLWithPath:sourcePath]]; + if([pc pathComponentCells]) + [fileSourcePath setPathComponentCells:[pc pathComponentCells]]; [fileSourcePath setDoubleAction:@selector(goBackToFileChooser:)]; [onupdateTextView setDelegate:theDelegate]; -- cgit v1.2.3