summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-09-22 14:44:13 +0000
committerdynaflash <[email protected]>2008-09-22 14:44:13 +0000
commit441c3d72579f339174d467e0f8f6b8b22ccdb135 (patch)
treeb5c751f24f07acde25bf5e5be87084221b532eda /macosx
parent0529e62a266fb65c2bf4492b2e5d566879621537 (diff)
MacGui: Add encoding status readout to the queue window
- is fed info from controller.mm instead of the old setup which had another NSTimer polling libhb just for the queue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1742 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm17
-rw-r--r--macosx/English.lproj/Queue.xib51
-rw-r--r--macosx/HBQueueController.h2
-rw-r--r--macosx/HBQueueController.mm9
4 files changed, 71 insertions, 8 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index f9dabba4a..5fe2d6ff0 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -599,6 +599,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
[fStatusField setStringValue: [NSString stringWithFormat:
NSLocalizedString( @"Queue Scanning title %d of %d...", @"" ),
p.title_cur, p.title_count]];
+
+ /* Set the status string in fQueueController as well */
+ [fQueueController setQueueStatusString: [NSString stringWithFormat:
+ NSLocalizedString( @"Queue Scanning title %d of %d...", @"" ),
+ p.title_cur, p.title_count]];
+
[fRipIndicator setHidden: NO];
[fRipIndicator setDoubleValue: 100.0 * ( p.title_cur - 1 ) / p.title_count];
break;
@@ -635,7 +641,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
}
[fStatusField setStringValue: string];
-
+ /* Set the status string in fQueueController as well */
+ [fQueueController setQueueStatusString: string];
/* Update slider */
progress_total = ( p.progress + p.job_cur - 1 ) / p.job_count;
[fRipIndicator setIndeterminate: NO];
@@ -671,7 +678,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
{
/* Update text field */
[fStatusField setStringValue: NSLocalizedString( @"Muxing...", @"" )];
-
+ /* Set the status string in fQueueController as well */
+ [fQueueController setQueueStatusString: NSLocalizedString( @"Muxing...", @"" )];
/* Update slider */
[fRipIndicator setIndeterminate: YES];
[fRipIndicator startAnimation: nil];
@@ -685,6 +693,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
case HB_STATE_PAUSED:
[fStatusField setStringValue: NSLocalizedString( @"Paused", @"" )];
+ [fQueueController setQueueStatusString: NSLocalizedString( @"Paused", @"" )];
break;
@@ -695,7 +704,9 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
// out the remaining passes/jobs in the queue. We'll do that here.
// Delete all remaining jobs of this encode.
- [fStatusField setStringValue: NSLocalizedString( @"Done.", @"" )];
+ [fStatusField setStringValue: NSLocalizedString( @"Encode Finished.", @"" )];
+ /* Set the status string in fQueueController as well */
+ [fQueueController setQueueStatusString: NSLocalizedString( @"Encode Finished.", @"" )];
[fRipIndicator setIndeterminate: NO];
[fRipIndicator setDoubleValue: 0.0];
[[fWindow toolbar] validateVisibleItems];
diff --git a/macosx/English.lproj/Queue.xib b/macosx/English.lproj/Queue.xib
index 3e0b27238..c64871915 100644
--- a/macosx/English.lproj/Queue.xib
+++ b/macosx/English.lproj/Queue.xib
@@ -382,7 +382,7 @@
<object class="NSTextField" id="463845363">
<reference key="NSNextResponder" ref="431299686"/>
<int key="NSvFlags">264</int>
- <string key="NSFrame">{{17, 373}, {176, 14}}</string>
+ <string key="NSFrame">{{17, 398}, {148, 14}}</string>
<reference key="NSSuperview" ref="431299686"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="617812287">
@@ -395,6 +395,22 @@
<reference key="NSTextColor" ref="434514744"/>
</object>
</object>
+ <object class="NSTextField" id="138063786">
+ <reference key="NSNextResponder" ref="431299686"/>
+ <int key="NSvFlags">264</int>
+ <string key="NSFrame">{{17, 376}, {540, 14}}</string>
+ <reference key="NSSuperview" ref="431299686"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="108133680">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">272760832</int>
+ <string key="NSContents">There are no jobs currently encoding</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="138063786"/>
+ <reference key="NSBackgroundColor" ref="987568653"/>
+ <reference key="NSTextColor" ref="434514744"/>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{574, 423}</string>
<reference key="NSSuperview"/>
@@ -472,6 +488,14 @@
</object>
<int key="connectionID">2645</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">fProgressTextField</string>
+ <reference key="source" ref="678333032"/>
+ <reference key="destination" ref="138063786"/>
+ </object>
+ <int key="connectionID">2648</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -512,6 +536,7 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="60629844"/>
+ <reference ref="138063786"/>
<reference ref="463845363"/>
</object>
<reference key="parent" ref="238545558"/>
@@ -694,6 +719,20 @@
<reference key="object" ref="617812287"/>
<reference key="parent" ref="463845363"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2646</int>
+ <reference key="object" ref="138063786"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="108133680"/>
+ </object>
+ <reference key="parent" ref="431299686"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2647</int>
+ <reference key="object" ref="108133680"/>
+ <reference key="parent" ref="138063786"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -746,6 +785,8 @@
<string>2625.ImportedFromIB2</string>
<string>2643.IBShouldRemoveOnLegacySave</string>
<string>2644.IBShouldRemoveOnLegacySave</string>
+ <string>2646.IBPluginDependency</string>
+ <string>2646.ImportedFromIB2</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -755,9 +796,9 @@
<integer value="1" id="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{87, 422}, {574, 423}}</string>
+ <string>{{311, 67}, {574, 423}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{87, 422}, {574, 423}}</string>
+ <string>{{311, 67}, {574, 423}}</string>
<reference ref="9"/>
<reference ref="9"/>
<reference ref="9"/>
@@ -795,6 +836,8 @@
<reference ref="9"/>
<reference ref="9"/>
<reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -817,7 +860,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">2645</int>
+ <int key="maxID">2648</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/macosx/HBQueueController.h b/macosx/HBQueueController.h
index 92379793f..06856f096 100644
--- a/macosx/HBQueueController.h
+++ b/macosx/HBQueueController.h
@@ -130,7 +130,7 @@ BOOL fIsDragging;
- (void) animateWorkingEncodeIconInQueue;
- (void) startAnimatingCurrentWorkingEncodeInQueue;
- (void) stopAnimatingCurrentJobGroupInQueue;
-
+- (void)setQueueStatusString: (NSString *)statusString;
- (IBAction)showQueueWindow: (id)sender;
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm
index 0e1476128..b32e4de3e 100644
--- a/macosx/HBQueueController.mm
+++ b/macosx/HBQueueController.mm
@@ -188,6 +188,15 @@ if (fWorkingCount > 0)
[fQueueCountField setStringValue:string];
}
+/* This method sets the status string in the queue window
+ * and is called from Controller.mm (fHBController)
+ * instead of running another timer here polling libhb
+ * for encoding status
+ */
+- (void)setQueueStatusString: (NSString *)statusString
+{
+[fProgressTextField setStringValue:statusString];
+}
//------------------------------------------------------------------------------------
// dealloc