Camino only: fix bug in which the pause button disappears when customizing the toolbar. b=315578 sr=smfr

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@184342 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joshmoz%gmail.com
2005-11-09 08:17:36 +00:00
parent 7b9feaf823
commit 0600886246

View File

@@ -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
}