Fix bug 307775: when running a 2nd copy of camino, dimissing the dialog would cause it to just come up again, because the ProgressDlgController would instantiate another copy of the PreferencesManager on quit. r=kreeger.

This commit is contained in:
smfr%smfr.org 2005-09-10 00:22:31 +00:00
Родитель 7c7704b82f
Коммит 3b11594f75
3 изменённых файлов: 11 добавлений и 2 удалений

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

@ -334,7 +334,10 @@ const int kReuseWindowOnAE = 2;
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
return [[ProgressDlgController sharedDownloadController] allowTerminate];
ProgressDlgController* progressWindowController = [ProgressDlgController existingSharedDownloadController];
if (progressWindowController)
return [progressWindowController allowTerminate];
return NSTerminateNow;
}
-(void)applicationWillTerminate: (NSNotification*)aNotification

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

@ -89,7 +89,8 @@
int mSelectionPivotIndex;
}
+(ProgressDlgController *)sharedDownloadController;
+(ProgressDlgController *)sharedDownloadController; // creates if necessary
+(ProgressDlgController *)existingSharedDownloadController; // doesn't create
-(IBAction)cancel:(id)sender;
-(IBAction)remove:(id)sender;

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

@ -74,6 +74,11 @@ static id gSharedProgressController = nil;
return gSharedProgressController;
}
+(ProgressDlgController *)existingSharedDownloadController
{
return gSharedProgressController;
}
-(id)init
{
if ((self == [super initWithWindowNibName:@"ProgressDialog"])) {