зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
7c7704b82f
Коммит
3b11594f75
|
@ -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"])) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче