зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 155617: make sure we show the location dialog if the user removed the location field from their toolbar. Patch from David Haas.
This commit is contained in:
Родитель
27c5a43c45
Коммит
becd776e28
|
@ -569,16 +569,22 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
- (void)performAppropriateLocationAction
|
- (void)performAppropriateLocationAction
|
||||||
{
|
{
|
||||||
if ( [[[self window] toolbar] isVisible] ) {
|
NSToolbar *toolbar = [[self window] toolbar];
|
||||||
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
if ( [toolbar isVisible] ) {
|
||||||
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
||||||
[self focusURLBar];
|
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
||||||
} else {
|
NSArray *itemsWeCanSee = [toolbar visibleItems];
|
||||||
[self beginLocationSheet];
|
|
||||||
|
for (unsigned int i=0;i<[itemsWeCanSee count];i++) {
|
||||||
|
if ([[[itemsWeCanSee objectAtIndex:i] itemIdentifier] isEqual:LocationToolbarItemIdentifier]) {
|
||||||
|
[self focusURLBar];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
[self beginLocationSheet];
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[self beginLocationSheet];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)focusURLBar
|
- (void)focusURLBar
|
||||||
|
|
|
@ -569,16 +569,22 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
- (void)performAppropriateLocationAction
|
- (void)performAppropriateLocationAction
|
||||||
{
|
{
|
||||||
if ( [[[self window] toolbar] isVisible] ) {
|
NSToolbar *toolbar = [[self window] toolbar];
|
||||||
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
if ( [toolbar isVisible] ) {
|
||||||
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
||||||
[self focusURLBar];
|
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
||||||
} else {
|
NSArray *itemsWeCanSee = [toolbar visibleItems];
|
||||||
[self beginLocationSheet];
|
|
||||||
|
for (unsigned int i=0;i<[itemsWeCanSee count];i++) {
|
||||||
|
if ([[[itemsWeCanSee objectAtIndex:i] itemIdentifier] isEqual:LocationToolbarItemIdentifier]) {
|
||||||
|
[self focusURLBar];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
[self beginLocationSheet];
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[self beginLocationSheet];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)focusURLBar
|
- (void)focusURLBar
|
||||||
|
|
|
@ -569,16 +569,22 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
- (void)performAppropriateLocationAction
|
- (void)performAppropriateLocationAction
|
||||||
{
|
{
|
||||||
if ( [[[self window] toolbar] isVisible] ) {
|
NSToolbar *toolbar = [[self window] toolbar];
|
||||||
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
if ( [toolbar isVisible] ) {
|
||||||
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
||||||
[self focusURLBar];
|
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
||||||
} else {
|
NSArray *itemsWeCanSee = [toolbar visibleItems];
|
||||||
[self beginLocationSheet];
|
|
||||||
|
for (unsigned int i=0;i<[itemsWeCanSee count];i++) {
|
||||||
|
if ([[[itemsWeCanSee objectAtIndex:i] itemIdentifier] isEqual:LocationToolbarItemIdentifier]) {
|
||||||
|
[self focusURLBar];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
[self beginLocationSheet];
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[self beginLocationSheet];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)focusURLBar
|
- (void)focusURLBar
|
||||||
|
|
|
@ -569,16 +569,22 @@ static NSArray* sToolbarDefaults = nil;
|
||||||
|
|
||||||
- (void)performAppropriateLocationAction
|
- (void)performAppropriateLocationAction
|
||||||
{
|
{
|
||||||
if ( [[[self window] toolbar] isVisible] ) {
|
NSToolbar *toolbar = [[self window] toolbar];
|
||||||
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
if ( [toolbar isVisible] ) {
|
||||||
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
|
||||||
[self focusURLBar];
|
([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
|
||||||
} else {
|
NSArray *itemsWeCanSee = [toolbar visibleItems];
|
||||||
[self beginLocationSheet];
|
|
||||||
|
for (unsigned int i=0;i<[itemsWeCanSee count];i++) {
|
||||||
|
if ([[[itemsWeCanSee objectAtIndex:i] itemIdentifier] isEqual:LocationToolbarItemIdentifier]) {
|
||||||
|
[self focusURLBar];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
[self beginLocationSheet];
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[self beginLocationSheet];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)focusURLBar
|
- (void)focusURLBar
|
||||||
|
|
Загрузка…
Ссылка в новой задаче