// Put up the newGallerySheet NSPanel
- (IBAction)showNewGallery: (id)sender
{
+ TURAnselGalleryPanelController *newGalleryController;
+ NSString *albumName;
+
// Make sure we're not doing this for nothing
if ([anselController state] == TURAnselStateConnected) {
- TURAnselGalleryPanelController *newGalleryController = [[TURAnselGalleryPanelController alloc] initWithController: anselController];
+
+ // It *looks* like index 0 is the first selected album?
+ albumName = [mExportMgr albumNameAtIndex: 0];
+ newGalleryController = [[TURAnselGalleryPanelController alloc] initWithController: anselController
+ withGalleryName: albumName
+ withGalleryDescription: [mExportMgr albumCommentsAtIndex:0]];
[newGalleryController setDelegate: self];
[newGalleryController showSheetForWindow: [self window]];
}
- (IBAction)doNewGallery: (id)sender;
- (IBAction)cancelNewGallery: (id)sender;
- (id)initWithController: (TURAnsel *)theController;
+- (id)initWithController: (TURAnsel *)theController withGalleryName: (NSString *)galleryName;
- (void)showSheetForWindow: (NSWindow *)theWindow;
- (void)setDelegate: (id)theDelegate;
@end
return self;
}
+- (id)initWithController: (TURAnsel *)theController
+ withGalleryName: (NSString *)galleryName
+{
+
+ [super init];
+ anselController = [theController retain];
+ [NSBundle loadNibNamed: @"AnselGalleryPanel"
+ owner: self];
+
+ [galleryNameTextField setStringValue: galleryName];
+
+ return self;
+
+
+}
+
- (void)setDelegate: (id)theDelegate
{
delegate = theDelegate; // weak