selector: @selector(exportWindowDidBecomeKey:)
name: NSWindowDidBecomeKeyNotification
object :nil];
+
+ // Holds gallery's images info for the gallery preview
+ browserData = [[NSMutableArray alloc] init];
}
-(void)dealloc
{
#pragma mark Actions
- (IBAction)clickViewGallery: (id)sender
{
- [NSApp beginSheet: mviewGallerySheet
- modalForWindow: [self window]
- modalDelegate: nil
- didEndSelector: nil
- contextInfo: nil];
-
+ [browserData removeAllObjects];
NSMutableArray *images = [currentGallery listImages];
- NSLog(@"%@", images);
- browserData = [[NSMutableArray alloc] init];
for (NSDictionary *image in images) {
AnselGalleryViewItem *item = [[AnselGalleryViewItem alloc] initWithURL: [NSURL URLWithString: [image objectForKey:@"url"]]];
[browserData addObject: item];
}
-
+
+ [NSApp beginSheet: mviewGallerySheet
+ modalForWindow: [self window]
+ modalDelegate: nil
+ didEndSelector: nil
+ contextInfo: nil];
+
[browserView reloadData];
}
}
[prefs synchronize];
-
+
[self updateServersPopupMenu];
[newServer release];