Permalink
Browse files

Disable "Save All" buton while saving

  • Loading branch information...
1 parent 356cf94 commit d2cb77aece72ee5f18b563a316641b5df39c07bf @0xced 0xced committed Aug 5, 2010
Showing with 54 additions and 30 deletions.
  1. +4 −0 Classes/ArtworkViewController.m
  2. +50 −30 MainWindow.xib
@@ -257,6 +257,7 @@ - (IBAction) saveAll
{
self.saveCounter = 0;
self.progressView.hidden = NO;
+ self.saveAllButton.enabled = NO;
NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
[queue setMaxConcurrentOperationCount:4];
for (UITableViewCell *cell in [self allCells])
@@ -273,7 +274,10 @@ - (void) incrementSaveCounter
self.saveCounter++;
NSUInteger count = [[self allCells] count];
if (self.saveCounter == count)
+ {
self.progressView.hidden = YES;
+ self.saveAllButton.enabled = YES;
+ }
self.progressView.progress = ((CGFloat)self.saveCounter / (CGFloat)count);
}
View
@@ -77,6 +77,16 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIProgressViewStyle">1</int>
</object>
+ <object class="IBUIBarButtonItem" id="1063794593">
+ <string key="IBUITitle">Save All</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIStyle">1</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="171300368">
+ <string key="IBUITitle">Save All</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIStyle">1</int>
+ </object>
<object class="IBUITabBarController" id="1034742383">
<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@@ -688,11 +698,6 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
- <object class="IBUIBarButtonItem" id="171300368">
- <string key="IBUITitle">Save All</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIStyle">1</int>
- </object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
@@ -969,22 +974,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">saveAllButton</string>
- <reference key="source" ref="1024858337"/>
- <reference key="destination" ref="171300368"/>
- </object>
- <int key="connectionID">245</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">saveAll</string>
- <reference key="source" ref="171300368"/>
- <reference key="destination" ref="1024858337"/>
- </object>
- <int key="connectionID">251</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">fontSizeLabel</string>
<reference key="source" ref="268481961"/>
<reference key="destination" ref="176211590"/>
@@ -1026,14 +1015,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">saveAllButton</string>
- <reference key="source" ref="456368547"/>
- <reference key="destination" ref="171300368"/>
- </object>
- <int key="connectionID">271</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">searchDisplayController</string>
<reference key="source" ref="456368547"/>
<reference key="destination" ref="1039783053"/>
@@ -1048,6 +1029,38 @@
</object>
<int key="connectionID">279</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">saveAllButton</string>
+ <reference key="source" ref="1024858337"/>
+ <reference key="destination" ref="1063794593"/>
+ </object>
+ <int key="connectionID">283</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">saveAll</string>
+ <reference key="source" ref="1063794593"/>
+ <reference key="destination" ref="1024858337"/>
+ </object>
+ <int key="connectionID">284</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">saveAllButton</string>
+ <reference key="source" ref="456368547"/>
+ <reference key="destination" ref="171300368"/>
+ </object>
+ <int key="connectionID">285</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">saveAll</string>
+ <reference key="source" ref="171300368"/>
+ <reference key="destination" ref="456368547"/>
+ </object>
+ <int key="connectionID">286</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1388,6 +1401,11 @@
<reference key="object" ref="726805950"/>
<reference key="parent" ref="0"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">280</int>
+ <reference key="object" ref="1063794593"/>
+ <reference key="parent" ref="0"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -1451,6 +1469,7 @@
<string>265.IBPluginDependency</string>
<string>278.IBEditorWindowLastContentRect</string>
<string>278.IBPluginDependency</string>
+ <string>280.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
</object>
@@ -1519,6 +1538,7 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{427, 662}, {100, 11}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>AppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
@@ -1539,7 +1559,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">279</int>
+ <int key="maxID">286</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">

0 comments on commit d2cb77a

Please sign in to comment.