Starting to add toolbar show/hide for bookmarsk toolbar.

This commit is contained in:
hyatt%netscape.com 2002-04-26 01:39:14 +00:00
Родитель a376f9f56c
Коммит 9e88462880
16 изменённых файлов: 80 добавлений и 8 удалений

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

@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
ForwardToolbarItemIdentifier,
ReloadToolbarItemIdentifier,
StopToolbarItemIdentifier,
HomeToolbarItemIdentifier,
LocationToolbarItemIdentifier,
SidebarToolbarItemIdentifier,
nil];

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

@ -43,4 +43,6 @@ class BookmarksService;
-(void)reflowButtons;
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
-(void)showBookmarksToolbar: (BOOL)aShow;
@end

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

@ -193,7 +193,7 @@
NSRect oldFrame = [self frame];
[super setFrame:aRect];
if (oldFrame.size.width == aRect.size.width)
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
return;
int count = [mButtons count];
@ -224,4 +224,20 @@
}
}
-(void)showBookmarksToolbar: (BOOL)aShow
{
if (!aShow) {
float height = [self bounds].size.height;
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
[self frame].size.width, 0)];
// We need to adjust the content area.
NSView* view = [[[self window] windowController] getTabBrowser];
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
[view frame].size.width, [view frame].size.height + height)];
}
//else
// Reflowing the buttons will do the right thing.
// [self reflowButtons];
}
@end

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

@ -90,6 +90,7 @@ class BookmarksService;
-(IBAction) nextTab:(id)aSender;
// View menu actions.
-(IBAction) toggleBookmarksToolbar:(id)aSender;
-(IBAction) doReload:(id)aSender;
-(IBAction) doStop:(id)aSender;
-(IBAction) biggerTextSize:(id)aSender;

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

@ -90,6 +90,7 @@ class BookmarksService;
-(IBAction) nextTab:(id)aSender;
// View menu actions.
-(IBAction) toggleBookmarksToolbar:(id)aSender;
-(IBAction) doReload:(id)aSender;
-(IBAction) doStop:(id)aSender;
-(IBAction) biggerTextSize:(id)aSender;

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

@ -43,4 +43,6 @@ class BookmarksService;
-(void)reflowButtons;
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
-(void)showBookmarksToolbar: (BOOL)aShow;
@end

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

@ -193,7 +193,7 @@
NSRect oldFrame = [self frame];
[super setFrame:aRect];
if (oldFrame.size.width == aRect.size.width)
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
return;
int count = [mButtons count];
@ -224,4 +224,20 @@
}
}
-(void)showBookmarksToolbar: (BOOL)aShow
{
if (!aShow) {
float height = [self bounds].size.height;
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
[self frame].size.width, 0)];
// We need to adjust the content area.
NSView* view = [[[self window] windowController] getTabBrowser];
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
[view frame].size.width, [view frame].size.height + height)];
}
//else
// Reflowing the buttons will do the right thing.
// [self reflowButtons];
}
@end

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

@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
ForwardToolbarItemIdentifier,
ReloadToolbarItemIdentifier,
StopToolbarItemIdentifier,
HomeToolbarItemIdentifier,
LocationToolbarItemIdentifier,
SidebarToolbarItemIdentifier,
nil];

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

@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
ForwardToolbarItemIdentifier,
ReloadToolbarItemIdentifier,
StopToolbarItemIdentifier,
HomeToolbarItemIdentifier,
LocationToolbarItemIdentifier,
SidebarToolbarItemIdentifier,
nil];

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

@ -43,4 +43,6 @@ class BookmarksService;
-(void)reflowButtons;
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
-(void)showBookmarksToolbar: (BOOL)aShow;
@end

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

@ -193,7 +193,7 @@
NSRect oldFrame = [self frame];
[super setFrame:aRect];
if (oldFrame.size.width == aRect.size.width)
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
return;
int count = [mButtons count];
@ -224,4 +224,20 @@
}
}
-(void)showBookmarksToolbar: (BOOL)aShow
{
if (!aShow) {
float height = [self bounds].size.height;
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
[self frame].size.width, 0)];
// We need to adjust the content area.
NSView* view = [[[self window] windowController] getTabBrowser];
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
[view frame].size.width, [view frame].size.height + height)];
}
//else
// Reflowing the buttons will do the right thing.
// [self reflowButtons];
}
@end

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

@ -90,6 +90,7 @@ class BookmarksService;
-(IBAction) nextTab:(id)aSender;
// View menu actions.
-(IBAction) toggleBookmarksToolbar:(id)aSender;
-(IBAction) doReload:(id)aSender;
-(IBAction) doStop:(id)aSender;
-(IBAction) biggerTextSize:(id)aSender;

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

@ -90,6 +90,7 @@ class BookmarksService;
-(IBAction) nextTab:(id)aSender;
// View menu actions.
-(IBAction) toggleBookmarksToolbar:(id)aSender;
-(IBAction) doReload:(id)aSender;
-(IBAction) doStop:(id)aSender;
-(IBAction) biggerTextSize:(id)aSender;

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

@ -43,4 +43,6 @@ class BookmarksService;
-(void)reflowButtons;
-(void)reflowButtonsStartingAtIndex: (int)aIndex;
-(void)showBookmarksToolbar: (BOOL)aShow;
@end

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

@ -193,7 +193,7 @@
NSRect oldFrame = [self frame];
[super setFrame:aRect];
if (oldFrame.size.width == aRect.size.width)
if (oldFrame.size.width == aRect.size.width || aRect.size.height == 0)
return;
int count = [mButtons count];
@ -224,4 +224,20 @@
}
}
-(void)showBookmarksToolbar: (BOOL)aShow
{
if (!aShow) {
float height = [self bounds].size.height;
[self setFrame: NSMakeRect([self frame].origin.x, [self frame].origin.y + height,
[self frame].size.width, 0)];
// We need to adjust the content area.
NSView* view = [[[self window] windowController] getTabBrowser];
[view setFrame: NSMakeRect([view frame].origin.x, [view frame].origin.y,
[view frame].size.width, [view frame].size.height + height)];
}
//else
// Reflowing the buttons will do the right thing.
// [self reflowButtons];
}
@end

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

@ -300,7 +300,6 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
ForwardToolbarItemIdentifier,
ReloadToolbarItemIdentifier,
StopToolbarItemIdentifier,
HomeToolbarItemIdentifier,
LocationToolbarItemIdentifier,
SidebarToolbarItemIdentifier,
nil];