diff options
author | abhibeckert <abhi@abhibeckert.com> | 2008-04-27 04:51:08 +0000 |
---|---|---|
committer | abhibeckert <abhi@abhibeckert.com> | 2008-04-27 04:51:08 +0000 |
commit | 13b1c1921ff4a6d7a47057646cfa519366071348 (patch) | |
tree | 9552715ebe18ef000a8f14b50ed383127783e22d /DatabaseSelectToolbarItem.m | |
parent | 25f32f7287deee8d0b8ef4309645062a474a6451 (diff) | |
download | sequelpro-13b1c1921ff4a6d7a47057646cfa519366071348.tar.gz sequelpro-13b1c1921ff4a6d7a47057646cfa519366071348.tar.bz2 sequelpro-13b1c1921ff4a6d7a47057646cfa519366071348.zip |
complete issue 13 - move database select into toolbar
Diffstat (limited to 'DatabaseSelectToolbarItem.m')
-rw-r--r-- | DatabaseSelectToolbarItem.m | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/DatabaseSelectToolbarItem.m b/DatabaseSelectToolbarItem.m new file mode 100644 index 00000000..a5f8b554 --- /dev/null +++ b/DatabaseSelectToolbarItem.m @@ -0,0 +1,49 @@ +// +// DatabaseSelectToolbarItem.m +// sequel-pro +// +// Created by Abhi Beckert on 27/04/08. +// Copyright 2008 __MyCompanyName__. All rights reserved. +// + +#import "DatabaseSelectToolbarItem.h" + + +@implementation DatabaseSelectToolbarItem + +- (id)initWithItemIdentifier:(NSString *)itemIdentifier +{ + if (![super initWithItemIdentifier:itemIdentifier]) + return nil; + + if (![NSBundle loadNibNamed:@"DatabaseSelectToolbarView" owner:self]) { + NSLog(@"Failed to load database select toolbar item nib"); + [self release]; + return nil; + } + + [self setLabel:NSLocalizedString(@"Select Database", @"toolbar item for selecting a db")]; + [self setPaletteLabel:[self label]]; + [self setView:toolbarItemView]; + + return self; +} + +- (NSPopUpButton *)databaseSelectPopupButton +{ + return dbSelectPopupButton; +} + +- (NSSize)minSize +{ + return NSMakeSize(200,26); +} + +- (NSSize)maxSize +{ + return NSMakeSize(200,32); +} + +@end + +NSString *DatabaseSelectToolbarItemIdentifier = @"DatabaseSelectToolbarItemIdentifier";
\ No newline at end of file |