зеркало из https://github.com/mozilla/pjs.git
Fix bug 196235: if a copy of Camino is already running, clicking on the Dock icon of the second copy will put a dialog for each click. Fixed by checking for an existing prefs manager.
This commit is contained in:
Родитель
1ace8a3ff8
Коммит
0c99614933
|
@ -1475,6 +1475,12 @@ Otherwise, we return the URL we originally got. Right now this supports .url and
|
|||
|
||||
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApp hasVisibleWindows:(BOOL)flag
|
||||
{
|
||||
// we might be sitting there with the "there is another copy of camino running" dialog up
|
||||
// (which means we're in a modal loop in [PreferenceManager init]). So if we haven't
|
||||
// finished initting prefs yet, just bail.
|
||||
if (![PreferenceManager sharedInstanceDontCreate])
|
||||
return NO;
|
||||
|
||||
// ignore |hasVisibleWindows| because we always want to show a browser window when
|
||||
// the user clicks on the app icon, even if, say, prefs or the d/l window are open.
|
||||
// If there is no browser, create one. If there is one, unminimize it if it's in the dock.
|
||||
|
|
|
@ -54,6 +54,7 @@ class nsIPref;
|
|||
}
|
||||
|
||||
+ (PreferenceManager *)sharedInstance;
|
||||
+ (PreferenceManager *)sharedInstanceDontCreate;
|
||||
|
||||
- (id) init;
|
||||
- (void) dealloc;
|
||||
|
|
|
@ -70,8 +70,6 @@ static const PRInt32 kCurrentPrefsVersion = 1;
|
|||
|
||||
@interface PreferenceManager(PreferenceManagerPrivate)
|
||||
|
||||
+ (PreferenceManager *) sharedInstanceDontCreate;
|
||||
|
||||
- (void)registerNotificationListener;
|
||||
|
||||
- (void)termEmbedding: (NSNotification*)aNotification;
|
||||
|
|
Загрузка…
Ссылка в новой задаче