[vlc-commits] macosx: properly synchronize goto stepper / field values

David Fuhrmann git at videolan.org
Tue Apr 30 23:13:17 CEST 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue Apr 30 22:01:35 2013 +0200| [d136581901e76a366ba4aa177fb6acd8dcb37da7] | committer: David Fuhrmann

macosx: properly synchronize goto stepper / field values

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d136581901e76a366ba4aa177fb6acd8dcb37da7
---

 .../macosx/Resources/English.lproj/MainMenu.xib    |   64 +++++++++++++-------
 modules/gui/macosx/controls.h                      |    2 +
 modules/gui/macosx/controls.m                      |    7 ++-
 3 files changed, 49 insertions(+), 24 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index b092e1e..e1d8458 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -21,11 +21,12 @@
     </object>
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
-      <integer value="21"/>
-      <integer value="5260"/>
-      <integer value="2730"/>
       <integer value="5457"/>
+      <integer value="2730"/>
       <integer value="4850"/>
+      <integer value="5260"/>
+      <integer value="2461"/>
+      <integer value="21"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -3294,7 +3295,7 @@
         <nil key="NSUserInterfaceItemIdentifier"/>
         <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
         <object class="NSView" key="NSWindowView" id="500944643">
-          <nil key="NSNextResponder"/>
+          <reference key="NSNextResponder"/>
           <int key="NSvFlags">256</int>
           <object class="NSMutableArray" key="NSSubviews">
             <bool key="EncodedWithXMLCoder">YES</bool>
@@ -3422,6 +3423,7 @@
             </object>
           </object>
           <string key="NSFrameSize">{249, 103}</string>
+          <reference key="NSSuperview"/>
         </object>
         <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
         <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
@@ -5577,22 +5579,6 @@ LCAuLi4</string>
         </object>
         <object class="IBConnectionRecord">
           <object class="IBActionConnection" key="connection">
-            <string key="label">takeIntValueFrom:</string>
-            <reference key="source" ref="460273327"/>
-            <reference key="destination" ref="378726756"/>
-          </object>
-          <int key="connectionID">2467</int>
-        </object>
-        <object class="IBConnectionRecord">
-          <object class="IBActionConnection" key="connection">
-            <string key="label">takeIntValueFrom:</string>
-            <reference key="source" ref="378726756"/>
-            <reference key="destination" ref="460273327"/>
-          </object>
-          <int key="connectionID">2468</int>
-        </object>
-        <object class="IBConnectionRecord">
-          <object class="IBActionConnection" key="connection">
             <string key="label">goToSpecificTime:</string>
             <reference key="source" ref="113811151"/>
             <reference key="destination" ref="497450091"/>
@@ -8423,6 +8409,42 @@ LCAuLi4</string>
           </object>
           <int key="connectionID">5590</int>
         </object>
+        <object class="IBConnectionRecord">
+          <object class="IBBindingConnection" key="connection">
+            <string key="label">value: self.jumpTimeValue</string>
+            <reference key="source" ref="378726756"/>
+            <reference key="destination" ref="113811151"/>
+            <object class="NSNibBindingConnector" key="connector">
+              <reference key="NSSource" ref="378726756"/>
+              <reference key="NSDestination" ref="113811151"/>
+              <string key="NSLabel">value: self.jumpTimeValue</string>
+              <string key="NSBinding">value</string>
+              <string key="NSKeyPath">self.jumpTimeValue</string>
+              <int key="NSNibBindingConnectorVersion">2</int>
+            </object>
+          </object>
+          <int key="connectionID">5592</int>
+        </object>
+        <object class="IBConnectionRecord">
+          <object class="IBBindingConnection" key="connection">
+            <string key="label">value: self.jumpTimeValue</string>
+            <reference key="source" ref="460273327"/>
+            <reference key="destination" ref="113811151"/>
+            <object class="NSNibBindingConnector" key="connector">
+              <reference key="NSSource" ref="460273327"/>
+              <reference key="NSDestination" ref="113811151"/>
+              <string key="NSLabel">value: self.jumpTimeValue</string>
+              <string key="NSBinding">value</string>
+              <string key="NSKeyPath">self.jumpTimeValue</string>
+              <object class="NSDictionary" key="NSOptions">
+                <string key="NS.key.0">NSContinuouslyUpdatesValue</string>
+                <boolean value="YES" key="NS.object.0"/>
+              </object>
+              <int key="NSNibBindingConnectorVersion">2</int>
+            </object>
+          </object>
+          <int key="connectionID">5595</int>
+        </object>
       </object>
       <object class="IBMutableOrderedSet" key="objectRecords">
         <object class="NSArray" key="orderedObjects">
@@ -13641,7 +13663,7 @@ LCAuLi4</string>
         </object>
       </object>
       <nil key="sourceID"/>
-      <int key="maxID">5590</int>
+      <int key="maxID">5595</int>
     </object>
     <object class="IBClassDescriber" key="IBDocument.Classes">
       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/modules/gui/macosx/controls.h b/modules/gui/macosx/controls.h
index bc66f2d..8df133c 100644
--- a/modules/gui/macosx/controls.h
+++ b/modules/gui/macosx/controls.h
@@ -40,6 +40,8 @@
     IBOutlet id o_specificTime_mi;
 }
 
+ at property (nonatomic) int jumpTimeValue;
+
 - (IBAction)play:(id)sender;
 - (IBAction)stop:(id)sender;
 
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index 449824e..cab73ba 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -45,6 +45,8 @@
  *****************************************************************************/
 @implementation VLCControls
 
+ at synthesize jumpTimeValue;
+
 - (void)awakeFromNib
 {
     [o_specificTime_mi setTitle: _NS("Jump To Time")];
@@ -240,11 +242,10 @@
         if (p_input) {
             /* we can obviously only do that if an input is available */
             vlc_value_t pos, length;
-            var_Get(p_input, "time", &pos);
-            [o_specificTime_enter_fld setIntValue: (pos.i_time / 1000000)];
             var_Get(p_input, "length", &length);
             [o_specificTime_stepper setMaxValue: (length.i_time / 1000000)];
-
+            var_Get(p_input, "time", &pos);
+            [self setJumpTimeValue: (pos.i_time / 1000000)];
             [NSApp beginSheet: o_specificTime_win modalForWindow: \
                 [NSApp mainWindow] modalDelegate: self didEndSelector: nil \
                 contextInfo: nil];



More information about the vlc-commits mailing list