]> git.sesse.net Git - vlc/commitdiff
* added a button to create an empty node at the top level of the playlist. Thanks...
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 16 Feb 2006 20:05:18 +0000 (20:05 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 16 Feb 2006 20:05:18 +0000 (20:05 +0000)
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/keyedobjects.nib
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m

index 5e0e4ca8f7fe2bb2218be6ba418c0c7886c1c1a5..c32c5aaff1538e1bf77cabb2d79d92780bc8aa06 100644 (file)
         }, 
         {
             ACTIONS = {
+                addNode = id; 
                 deleteItem = id; 
                 handlePopUp = id; 
                 playItem = id; 
             CLASS = VLCPlaylist; 
             LANGUAGE = ObjC; 
             OUTLETS = {
+                "o_btn_addNode" = id; 
                 "o_controller" = id; 
                 "o_ctx_menu" = id; 
                 "o_loop_popup" = id; 
+                "o_mi_addNode" = id; 
                 "o_mi_delete" = id; 
                 "o_mi_info" = id; 
                 "o_mi_play" = id; 
index 4a01efcdae1513215bbde040acb360e77f1ddf9b..f42644ee8d0701abeed7027a6d269c4dd5ce0094 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>134 289 496 270 0 0 1024 746 </string>
+       <string>520 277 496 270 0 0 1440 878 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
                <key>2197</key>
                <string>422 532 596 143 0 0 1440 878 </string>
                <key>29</key>
-               <string>294 89 438 44 0 0 1024 746 </string>
+               <string>393 311 438 44 0 0 1440 878 </string>
                <key>915</key>
                <string>678 573 187 249 0 0 1280 1002 </string>
        </dict>
        <key>IBFramework Version</key>
-       <string>439.0</string>
+       <string>443.0</string>
        <key>IBLockedObjects</key>
        <array/>
        <key>IBOpenObjects</key>
        <array>
                <integer>29</integer>
                <integer>21</integer>
+               <integer>2197</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>8F46</string>
+       <string>8G32</string>
 </dict>
 </plist>
index a848081ced41f8fd6e942de610520a6656b9138e..8317dac0443dd983cf9d1270f98f3e9195fda641 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
index 76ecd9323eff143ea571f4c2477e4e70de63d80a..565722ca6bda18d190e45add161cbe360cb020ee 100644 (file)
     BOOL b_selected_item_met;
     BOOL b_isSortDescending;
     id o_tc_sortColumn;
+    
+    /* "add node" button and menu entry */
+    IBOutlet id o_mi_addNode;
+    IBOutlet id o_btn_addNode;
 }
 
 - (void)searchfieldChanged:(NSNotification *)o_notification;
 - (IBAction)sortNodeByAuthor:(id)sender;
 - (IBAction)recursiveExpandNode:(id)sender;
 
+- (IBAction)addNode:(id)sender;
+
 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
 - (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position inView:(int)i_view enqueue:(BOOL)b_enqueue;
 
index 4c9e6b9517033a0f1c8ea3f2cf4bb23fd26a6d9c..96e8271a04f07e3fb28b5bb6b68e9dc67aab97f1 100644 (file)
@@ -517,6 +517,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     [[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")];
+    [o_mi_addNode setTitle: _NS("Add Folder to Playlist")];
 }
 
 - (void)playlistUpdated
@@ -1494,6 +1495,28 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     vlc_object_release( p_playlist );
 }
 
+- (IBAction)addNode:(id)sender
+{
+    /* simply adds a new node to the end of the playlist */
+    playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
+                                          FIND_ANYWHERE );
+    if( !p_playlist )
+    {
+        msg_Err( VLCIntf, "Uh Oh! Unable to find playlist!" );
+        return;
+    }
+
+    playlist_item_t * p_item = playlist_NodeCreate( p_playlist, VIEW_CATEGORY, 
+        _("Empty Folder"), p_playlist->p_general );
+
+    if(! p_item )
+        msg_Warn( VLCIntf, "node creation failed, fix VLC!" );
+    
+    playlist_ViewUpdate( p_playlist, VIEW_CATEGORY );
+    
+    vlc_object_release( p_playlist );
+}
+
 @end
 
 @implementation VLCPlaylist (NSOutlineViewDataSource)