Behave correctly when dock icon clicked and no windows are open. From David Haas (haasd@cae.wisc.edu)

This commit is contained in:
pinkerton%netscape.com 2002-05-03 19:17:28 +00:00
Родитель 367fdf02e3
Коммит b96d3aa698
4 изменённых файлов: 80 добавлений и 0 удалений

Просмотреть файл

@ -487,4 +487,24 @@ static PRBool gSetupSmoothTextMenu = PR_FALSE;
return image;
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApp hasVisibleWindows:(BOOL)flag
{
// If AppKit knows what to do, let it.
if (flag)
return YES;
// If window available, wake it up. |mainWindow| should always be null.
NSWindow* mainWindow = [mApplication mainWindow];
if (!mainWindow)
[self newWindow:self];
else { // Don't think this will ever happen, but just in case
if ([[mainWindow windowController]respondsToSelector:@selector(showWindow:)])
[[mainWindow windowController] showWindow:self];
else
[self newWindow:self];
}
return NO;
}
@end

Просмотреть файл

@ -487,4 +487,24 @@ static PRBool gSetupSmoothTextMenu = PR_FALSE;
return image;
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApp hasVisibleWindows:(BOOL)flag
{
// If AppKit knows what to do, let it.
if (flag)
return YES;
// If window available, wake it up. |mainWindow| should always be null.
NSWindow* mainWindow = [mApplication mainWindow];
if (!mainWindow)
[self newWindow:self];
else { // Don't think this will ever happen, but just in case
if ([[mainWindow windowController]respondsToSelector:@selector(showWindow:)])
[[mainWindow windowController] showWindow:self];
else
[self newWindow:self];
}
return NO;
}
@end

Просмотреть файл

@ -487,4 +487,24 @@ static PRBool gSetupSmoothTextMenu = PR_FALSE;
return image;
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApp hasVisibleWindows:(BOOL)flag
{
// If AppKit knows what to do, let it.
if (flag)
return YES;
// If window available, wake it up. |mainWindow| should always be null.
NSWindow* mainWindow = [mApplication mainWindow];
if (!mainWindow)
[self newWindow:self];
else { // Don't think this will ever happen, but just in case
if ([[mainWindow windowController]respondsToSelector:@selector(showWindow:)])
[[mainWindow windowController] showWindow:self];
else
[self newWindow:self];
}
return NO;
}
@end

Просмотреть файл

@ -487,4 +487,24 @@ static PRBool gSetupSmoothTextMenu = PR_FALSE;
return image;
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApp hasVisibleWindows:(BOOL)flag
{
// If AppKit knows what to do, let it.
if (flag)
return YES;
// If window available, wake it up. |mainWindow| should always be null.
NSWindow* mainWindow = [mApplication mainWindow];
if (!mainWindow)
[self newWindow:self];
else { // Don't think this will ever happen, but just in case
if ([[mainWindow windowController]respondsToSelector:@selector(showWindow:)])
[[mainWindow windowController] showWindow:self];
else
[self newWindow:self];
}
return NO;
}
@end