* visual feedback when remote gallery is created successsfully
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 24 Nov 2008 19:54:45 +0000 (14:54 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 24 Nov 2008 19:54:45 +0000 (14:54 -0500)
* enable/disable some more controls (still more todo)
* auto select the new remote gallery in the NSComboBox
(for some reason exporting to the newly created gallery in the same
export session seems to silently fail - no promises at this point)

iPhoto2Ansel/AnselExportController.m
iPhoto2Ansel/English.lproj/Panel.nib/info.nib
iPhoto2Ansel/English.lproj/Panel.nib/keyedobjects.nib

index 3074460..ce097ed 100644 (file)
 // See if we have everything we need to export...
 - (void)canExport
 {
-    if ([anselController state] == TURAnselStateConnected &&
-        currentGallery != nil) {
-        [mExportMgr enableControls];
+    if ([anselController state] == TURAnselStateConnected) {
+        [newGalleryButton setEnabled: YES];
+        [galleryCombo setEnabled: YES];
+        if (currentGallery != nil) {
+            [mExportMgr enableControls];
+        }
     } else {
-        [mExportMgr disableControls];        
+        [newGalleryButton setEnabled: NO];
+        [mExportMgr disableControls];   
+        [galleryCombo setEnabled: YES];
     }
 }
 // Runs in a new thread.
     NSDictionary *results = [[anselController createNewGallery: [NSDictionary dictionaryWithObjectsAndKeys: galleryName, @"name", nil]] retain];
     
     if ([anselController state] != TURAnselStateError) {
-        NSLog(@"Added %@", results);
+        NSAlert *alert = [[NSAlert alloc] init];
+        [alert setMessageText: @"Gallery successfully created."];
+        [alert beginSheetModalForWindow: [self window]
+                          modalDelegate: nil
+                         didEndSelector: nil
+                            contextInfo: nil];
         [galleryCombo reloadData];
+        [galleryCombo selectItemAtIndex: [galleryCombo numberOfItems] - 1];
+        [alert release];
     }
     [results release];
 }
     [currentGallery setDelegate:nil];
     [currentGallery autorelease];
     currentGallery = [[anselController getGalleryByIndex:row] retain];
-    NSLog(@"THe selected gallery: %@", currentGallery);
+    NSLog(@"The selected gallery: %@", currentGallery);
     [currentGallery setDelegate: self];
     [self canExport];
 }
index d55a332..64a4a91 100644 (file)
@@ -10,7 +10,7 @@
        <integer>5</integer>
        <key>IBOpenObjects</key>
        <array>
-               <integer>6</integer>
+               <integer>136</integer>
        </array>
        <key>IBSystem Version</key>
        <string>9F33</string>
index 85eed58..d5e224c 100644 (file)
Binary files a/iPhoto2Ansel/English.lproj/Panel.nib/keyedobjects.nib and b/iPhoto2Ansel/English.lproj/Panel.nib/keyedobjects.nib differ