From 412c166c2a20dcef7016f65f085a55356e13df42 Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Wed, 9 Nov 2005 08:01:36 +0000 Subject: [PATCH] fix bug in which the pause button disappears when customizing the toolbar. b=315578 sr=smfr git-svn-id: svn://10.0.0.236/trunk@184341 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/camino/src/download/ProgressDlgController.mm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mozilla/camino/src/download/ProgressDlgController.mm b/mozilla/camino/src/download/ProgressDlgController.mm index 88ef1412017..1e43ba8ad55 100644 --- a/mozilla/camino/src/download/ProgressDlgController.mm +++ b/mozilla/camino/src/download/ProgressDlgController.mm @@ -801,12 +801,16 @@ static id gSharedProgressController = nil; - (BOOL)setPauseResumeToolbarItem:(NSToolbarItem*)theItem { + // since this is also the method that gets called when the customize dialog is run + // set the default value of the label, tooltip, icon, and pallete label to pause + // only set the action of the selector to pause if we validate properly + [theItem setLabel:NSLocalizedString(@"dlPauseButtonLabel", nil)]; + [theItem setToolTip:NSLocalizedString(@"dlPauseButtonTooltip", nil)]; + [theItem setPaletteLabel:NSLocalizedString(@"dlPauseButtonLabel", nil)]; + [theItem setImage:[NSImage imageNamed:@"dl_pause.tif"]]; + if ([self shouldAllowPauseAction]) { - [theItem setToolTip:NSLocalizedString(@"dlPauseButtonTooltip", nil)]; - [theItem setLabel:NSLocalizedString(@"dlPauseButtonLabel", nil)]; - [theItem setPaletteLabel:NSLocalizedString(@"dlPauseButtonLabel", nil)]; [theItem setAction:@selector(pause:)]; - [theItem setImage:[NSImage imageNamed:@"dl_pause.tif"]]; return [[self window] isKeyWindow]; // if not key window, dont enable }