]> git.sesse.net Git - vlc/commitdiff
Restore the save Playlist function (copy/paste from 0.8.1)
authorBenjamin Pracht <bigben@videolan.org>
Sat, 14 May 2005 09:20:47 +0000 (09:20 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Sat, 14 May 2005 09:20:47 +0000 (09:20 +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/objects.nib
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m

index 3431ba13551a51f9c37b51b72b79b71752340b5d..1ba5bff402470bb6462931c9348e8741a0e7a0ac 100644 (file)
                 deleteItem = id; 
                 handlePopUp = id; 
                 playItem = id; 
+                savePlaylist = id; 
                 searchItem = id; 
                 selectAll = id; 
                 sortNodeByAuthor = id; 
index 4b379cc198aff9bf70ae9b1c7998e0bd60abd0b4..40b1f3ecf9956ea684c42d75d29c47a6cf59bfec 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>36 197 496 270 0 0 800 578 </string>
+       <string>348 388 496 270 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
@@ -21,7 +21,6 @@
        <array/>
        <key>IBOpenObjects</key>
        <array>
-               <integer>2029</integer>
                <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
index 3157a2019aa17e6dc2da6dd6a2b0aa7149230831..9b5f9675e433dcd97353bb62c7885adf8cbb9f20 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 340076f3af6b46f168c03db0374d065ed12e2be8..28ecdc7713d10f0a050443e8ec81f6a06654255e 100644 (file)
@@ -92,6 +92,7 @@
 
 - (IBAction)servicesChange:(id)sender;
 - (IBAction)playItem:(id)sender;
+- (IBAction)savePlaylist:(id)sender;
 - (IBAction)deleteItem:(id)sender;
 - (IBAction)selectAll:(id)sender;
 - (IBAction)sortNodeByName:(id)sender;
index 937dad62c3cb903a381982dd61c2adb79c2300cf..aa5d2159e56a57b4098c388c41db3c3490c1e400 100644 (file)
@@ -392,6 +392,24 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     return NO;
 }
 
+- (IBAction)savePlaylist:(id)sender
+{
+    intf_thread_t * p_intf = VLCIntf;
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+
+    NSSavePanel *o_save_panel = [NSSavePanel savePanel];
+    NSString * o_name = [NSString stringWithFormat: @"%@.m3u", _NS("Untitled")];
+    [o_save_panel setTitle: _NS("Save Playlist")];
+    [o_save_panel setPrompt: _NS("Save")];
+
+    if( [o_save_panel runModalForDirectory: nil
+            file: o_name] == NSOKButton )
+    {
+        playlist_Export( p_playlist, [[o_save_panel filename] fileSystemRepresentation], "export-m3u" );
+    }
+}
+
 
 /* When called retrieves the selected outlineview row and plays that node or item */
 - (IBAction)playItem:(id)sender