[vlc-devel] commit: macosx: backport [47318ef39515bdc734bff5b68fb3124986ae58ed] ( Felix Paul Kühne )

git version control git at videolan.org
Tue Aug 4 18:36:49 CEST 2009


vlc | branch: 1.0-bugfix | Felix Paul Kühne <fkuehne at videolan.org> | Tue Aug  4 18:18:01 2009 +0200| [4d0438ba6cd98ff35d65f8c1d69ef2a838718560] | committer: Felix Paul Kühne 

macosx: backport [47318ef39515bdc734bff5b68fb3124986ae58ed]

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

 .../English.lproj/MainMenu.nib/classes.nib         |    4 ++++
 .../Resources/English.lproj/MainMenu.nib/info.nib  |    8 ++++----
 .../English.lproj/MainMenu.nib/keyedobjects.nib    |  Bin 121977 -> 122491 bytes
 modules/gui/macosx/controls.h                      |    1 +
 modules/gui/macosx/controls.m                      |   17 +++++++++++++++++
 modules/gui/macosx/intf.h                          |    1 +
 modules/gui/macosx/intf.m                          |    1 +
 7 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib
index b728806..8873351 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib
@@ -328,6 +328,8 @@
 				<string>NSMenuItem</string>
 				<key>o_mi_quit</key>
 				<string>NSMenuItem</string>
+				<key>o_mi_quitAfterPB</key>
+				<string>NSMenuItem</string>
 				<key>o_mi_random</key>
 				<string>NSMenuItem</string>
 				<key>o_mi_readme</key>
@@ -537,6 +539,8 @@
 				<string>id</string>
 				<key>prev</key>
 				<string>id</string>
+				<key>quitAfterPlayback</key>
+				<string>id</string>
 				<key>random</key>
 				<string>id</string>
 				<key>repeat</key>
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib
index 5ca4851..ef04313 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib
@@ -10,15 +10,15 @@
 	<integer>4</integer>
 	<key>IBOpenObjects</key>
 	<array>
-		<integer>29</integer>
-		<integer>2709</integer>
+		<integer>4470</integer>
 		<integer>2416</integer>
 		<integer>3568</integer>
-		<integer>4470</integer>
+		<integer>235</integer>
 		<integer>21</integer>
+		<integer>2709</integer>
 	</array>
 	<key>IBSystem Version</key>
-	<string>9L27</string>
+	<string>9L30</string>
 	<key>targetFramework</key>
 	<string>IBCocoaFramework</string>
 </dict>
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
index da5562e..815eeb0 100644
Binary files a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
diff --git a/modules/gui/macosx/controls.h b/modules/gui/macosx/controls.h
index 3708813..6099eb0 100644
--- a/modules/gui/macosx/controls.h
+++ b/modules/gui/macosx/controls.h
@@ -71,6 +71,7 @@
 - (IBAction)repeat:(id)sender;
 - (IBAction)loop:(id)sender;
 - (IBAction)repeatButtonAction:(id)sender;
+- (IBAction)quitAfterPlayback:(id)sender;
 
 /* the three ugly helpers again */
 - (void)repeatOne;
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index 47e718c..8a2c6a2 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -396,6 +396,16 @@
     pl_Release( p_intf );
 }
 
+- (IBAction)quitAfterPlayback:(id)sender
+{
+    vlc_value_t val;
+    playlist_t * p_playlist = pl_Hold( VLCIntf );
+    var_Get( p_playlist, "play-and-exit", &val );
+    val.b_bool = !val.b_bool;
+    var_Set( p_playlist, "play-and-exit", val );
+    pl_Release( VLCIntf );
+}
+
 - (IBAction)forward:(id)sender
 {
     intf_thread_t * p_intf = VLCIntf;
@@ -1059,6 +1069,13 @@
         i_state = val.b_bool ? NSOnState : NSOffState;
         [o_mi setState: i_state];
     }
+    else if( [[o_mi title] isEqualToString: _NS("Quit after Playback")] )
+    {
+        int i_state;
+        var_Get( p_playlist, "play-and-exit", &val );
+        i_state = val.b_bool ? NSOnState : NSOffState;
+        [o_mi setState: i_state];
+    }
     else if( [[o_mi title] isEqualToString: _NS("Step Forward")] ||
              [[o_mi title] isEqualToString: _NS("Step Backward")] ||
              [[o_mi title] isEqualToString: _NS("Jump To Time")])
diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 826dbe1..3d1f899 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -209,6 +209,7 @@ struct intf_sys_t
     IBOutlet NSMenuItem * o_mi_random;
     IBOutlet NSMenuItem * o_mi_repeat;
     IBOutlet NSMenuItem * o_mi_loop;
+    IBOutlet NSMenuItem * o_mi_quitAfterPB;
     IBOutlet NSMenuItem * o_mi_fwd;
     IBOutlet NSMenuItem * o_mi_bwd;
     IBOutlet NSMenuItem * o_mi_fwd1m;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index bdc314c..abc5bd1 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -645,6 +645,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_mi_random setTitle: _NS("Random")];
     [o_mi_repeat setTitle: _NS("Repeat One")];
     [o_mi_loop setTitle: _NS("Repeat All")];
+    [o_mi_quitAfterPB setTitle: _NS("Quit after Playback")];
     [o_mi_fwd setTitle: _NS("Step Forward")];
     [o_mi_bwd setTitle: _NS("Step Backward")];
 




More information about the vlc-devel mailing list