From 24ec4d2f947d2af6004999ed232cf3d2c562bbcf Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 28 Jul 2008 00:49:15 +0000 Subject: [PATCH] the "Cancel" button in the blocklist download sheet resizes to fit the localized string --- macosx/BlocklistDownloader.m | 7 +++++++ macosx/BlocklistStatusWindow.xib | 22 +++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/macosx/BlocklistDownloader.m b/macosx/BlocklistDownloader.m index 8d6a6f30b..65b14feee 100644 --- a/macosx/BlocklistDownloader.m +++ b/macosx/BlocklistDownloader.m @@ -51,6 +51,13 @@ - (void) awakeFromNib { [fButton setTitle: NSLocalizedString(@"Cancel", "Blocklist -> cancel button")]; + + float oldWidth = [fButton frame].size.width; + [fButton sizeToFit]; + NSRect buttonFrame = [fButton frame]; + buttonFrame.origin.x -= buttonFrame.size.width - oldWidth; + [fButton setFrame: buttonFrame]; + [fTextField setStringValue: [NSLocalizedString(@"Connecting to site", "Blocklist -> message") stringByAppendingEllipsis]]; [fProgressBar setUsesThreadedAnimation: YES]; diff --git a/macosx/BlocklistStatusWindow.xib b/macosx/BlocklistStatusWindow.xib index d027f954d..68789b286 100644 --- a/macosx/BlocklistStatusWindow.xib +++ b/macosx/BlocklistStatusWindow.xib @@ -2,13 +2,13 @@ 1050 - 9C7010 - 648 - 949.26 + 9E17 + 670 + 949.33 352.00 YES - + YES @@ -34,6 +34,7 @@ Window NSWindow + {3.40282e+38, 3.40282e+38} 256 @@ -77,7 +78,7 @@ - 1292 + 1290 {{18, 56}, {369, 20}} @@ -86,7 +87,7 @@ - 268 + 257 {{309, 12}, {82, 32}} YES @@ -253,6 +254,7 @@ 1.NSWindowTemplate.visibleAtLaunch 1.WindowOrigin 1.editorWindowContentRectSynchronizationRect + 1.windowTemplate.maxSize 2.IBPluginDependency 4.IBPluginDependency 5.IBPluginDependency @@ -271,6 +273,7 @@ {196, 240} {{202, 428}, {480, 270}} + {3.40282e+38, 3.40282e+38} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -347,13 +350,6 @@ macosx/NSMenuAdditions.h - - NSObject - - IBProjectSource - macosx/IPCController.h - - NSObject