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:
smfr%smfr.org 2005-07-17 04:46:23 +00:00
Родитель 1ace8a3ff8
Коммит 0c99614933
3 изменённых файлов: 7 добавлений и 2 удалений

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

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