]> git.sesse.net Git - vlc/commitdiff
* recrate some missing actions (mainly copy paste from the old playlist)
authorBenjamin Pracht <bigben@videolan.org>
Tue, 30 Nov 2004 00:04:45 +0000 (00:04 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Tue, 30 Nov 2004 00:04:45 +0000 (00:04 +0000)
* Link some actions and outlets in IB
* some small visual fixes

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m

index fb3e98a80b340794d726901334af1b52f71aea30..23646ce864443e6ae7ca23b99855d5f15339bfe8 100644 (file)
             SUPERCLASS = NSObject; 
         }, 
         {
+            ACTIONS = {handlePopUp = id; }; 
             CLASS = VLCPlaylist; 
             LANGUAGE = ObjC; 
             OUTLETS = {
                 "o_btn_playlist" = id; 
+                "o_loop_popup" = id; 
+                "o_mi_save_playlist" = id; 
                 "o_outline_view" = id; 
+                "o_random_ckb" = id; 
                 "o_search_field" = id; 
+                "o_search_keyword" = id; 
                 "o_status_field" = id; 
                 "o_tc_author" = id; 
                 "o_tc_duration" = id; 
index 3e3fc961f52599a387d3bf0e1b4067b06a72939e..a715693b69aed6288e9668a0ead9ac3451f0927d 100644 (file)
@@ -3,15 +3,15 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>852 421 505 517 0 0 1280 938 </string>
+       <string>23 -174 505 517 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
                <string>542 480 104 149 0 0 1024 746 </string>
                <key>2197</key>
-               <string>150 134 596 368 0 0 1280 938 </string>
+               <string>259 330 596 367 0 0 1024 746 </string>
                <key>29</key>
-               <string>58 849 419 44 0 0 1280 938 </string>
+               <string>84 667 419 44 0 0 1024 746 </string>
                <key>915</key>
                <string>54 452 185 199 0 0 1024 746 </string>
        </dict>
        <key>IBLockedObjects</key>
        <array>
                <integer>1789</integer>
-               <integer>2199</integer>
-               <integer>2206</integer>
-               <integer>2208</integer>
-               <integer>2202</integer>
                <integer>2203</integer>
+               <integer>2208</integer>
+               <integer>2206</integer>
+               <integer>2199</integer>
        </array>
        <key>IBOpenObjects</key>
        <array>
                <integer>21</integer>
+               <integer>29</integer>
                <integer>2197</integer>
        </array>
        <key>IBSystem Version</key>
index 38048351c6ff3873c83e1078265891d10a0e506c..a7b4cd623ac5d6556f15529818881456b4eb9850 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 9e8cc4b41d8bc6547e065518708db9f7b5ce884a..cfef7b42d75580936d08bf947e1e5ccf1c7a7dda 100644 (file)
     IBOutlet id o_tc_duration;
     IBOutlet id o_status_field;
     IBOutlet id o_search_field;
-    
+    IBOutlet id o_random_ckb;
+    IBOutlet id o_loop_popup;
+    IBOutlet id o_mi_save_playlist;
+
     NSImage *o_descendingSortingImage;
     NSImage *o_ascendingSortingImage;
 }
 
+- (IBAction)handlePopUp:(id)sender;
+
 - (void)initStrings;
 
 - (void)playlistUpdated;
 - (void)playItem:(id)sender;
 
 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
+
 @end
 
index 76b9e7f2357af55e4fcfc7f2be0da40a2773a9d5..9ef3f4dec227f1241d55d2b3d0cd5e0c2fdfb219 100644 (file)
@@ -179,8 +179,8 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
 
 - (void)initStrings
 {
-#if 0
     [o_mi_save_playlist setTitle: _NS("Save Playlist...")];
+#if 0
     [o_mi_play setTitle: _NS("Play")];
     [o_mi_delete setTitle: _NS("Delete")];
     [o_mi_selectall setTitle: _NS("Select All")];
@@ -192,16 +192,14 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     [[o_tc_name headerCell] setStringValue:_NS("Name")];
     [[o_tc_author headerCell] setStringValue:_NS("Author")];
     [[o_tc_duration headerCell] setStringValue:_NS("Duration")];
-#if 0
     [o_random_ckb setTitle: _NS("Random")];
+#if 0
     [o_search_button setTitle: _NS("Search")];
 #endif
     [o_btn_playlist setToolTip: _NS("Playlist")];
-#if 0    
     [[o_loop_popup itemAtIndex:0] setTitle: _NS("Standard Play")];
     [[o_loop_popup itemAtIndex:1] setTitle: _NS("Repeat One")];
     [[o_loop_popup itemAtIndex:2] setTitle: _NS("Repeat All")];
-#endif
 }
 
 - (void)playlistUpdated
@@ -319,6 +317,53 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     vlc_object_release( p_playlist );
 }
 
+- (IBAction)handlePopUp:(id)sender
+
+{
+             intf_thread_t * p_intf = VLCIntf;
+             vlc_value_t val1,val2;
+             playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                        FIND_ANYWHERE );
+             if( p_playlist == NULL )
+             {
+                 return;
+             }
+
+    switch ([o_loop_popup indexOfSelectedItem])
+    {
+        case 1:
+
+             val1.b_bool = 0;
+             var_Set( p_playlist, "loop", val1 );
+             val1.b_bool = 1;
+             var_Set( p_playlist, "repeat", val1 );
+             vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat One" ) );
+        break;
+
+        case 2:
+             val1.b_bool = 0;
+             var_Set( p_playlist, "repeat", val1 );
+             val1.b_bool = 1;
+             var_Set( p_playlist, "loop", val1 );
+             vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat All" ) );
+        break;
+
+        default:
+             var_Get( p_playlist, "repeat", &val1 );
+             var_Get( p_playlist, "loop", &val2 );
+             if (val1.b_bool || val2.b_bool)
+             {
+                  val1.b_bool = 0;
+                  var_Set( p_playlist, "repeat", val1 );
+                  var_Set( p_playlist, "loop", val1 );
+                  vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat Off" ) );
+             }
+         break;
+     }
+     vlc_object_release( p_playlist );
+     [self playlistUpdated];
+}
+
 @end
 
 @implementation VLCPlaylist (NSOutlineViewDataSource)
@@ -349,6 +394,8 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     vlc_object_release( p_playlist );
     if( i_return == -1 ) i_return = 0;
     msg_Dbg( p_playlist, "I have %d children", i_return );
+    [o_status_field setStringValue: [NSString stringWithFormat:
+                                _NS("%i items in playlist"), i_return]];
     return i_return;
 }