<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>43 22 478 430 0 0 1024 746 </string>
+ <string>90 147 478 430 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>788 586 109 149 0 0 1440 878 </string>
<key>2197</key>
- <string>422 532 596 143 0 0 1440 878 </string>
+ <string>172 420 596 143 0 0 1024 746 </string>
+ <key>2709</key>
+ <string>305 626 508 82 0 0 1024 746 </string>
<key>29</key>
<string>76 675 438 44 0 0 1024 746 </string>
<key>915</key>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
- <string>8H14</string>
+ <string>8I127</string>
</dict>
</plist>
o_outline_dict = [[NSMutableDictionary alloc] init];
}
return self;
-}
+}
- (void)awakeFromNib
{
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
[[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")];
+
+ [o_save_accessory_text setStringValue: _NS("File Format:")];
+ [[o_save_accessory_popup itemAtIndex:0] setTitle: _NS("Extended M3U")];
+ [[o_save_accessory_popup itemAtIndex:1] setTitle: _NS("XML Shareable Playlist Format (XSPF)")];
}
- (void)playlistUpdated
FIND_ANYWHERE );
NSSavePanel *o_save_panel = [NSSavePanel savePanel];
- NSString * o_name = [NSString stringWithFormat: @"%@.m3u", _NS("Untitled")];
+ NSString * o_name = [NSString stringWithFormat: @"%@", _NS("Untitled")];
+
+ //[o_save_panel setAllowedFileTypes: [NSArray arrayWithObjects: @"m3u", @"xpf", nil] ];
[o_save_panel setTitle: _NS("Save Playlist")];
[o_save_panel setPrompt: _NS("Save")];
+ [o_save_panel setAccessoryView: o_save_accessory_view];
if( [o_save_panel runModalForDirectory: nil
file: o_name] == NSOKButton )
{
- playlist_Export( p_playlist, [[o_save_panel filename] fileSystemRepresentation], "export-m3u" );
+ NSString *o_filename = [o_save_panel filename];
+
+ if( [o_save_accessory_popup indexOfSelectedItem] == 1 )
+ {
+ NSString * o_real_filename;
+ NSRange range;
+ range.location = [o_filename length] - [@".xspf" length];
+ range.length = [@".xspf" length];
+
+ if( [o_filename compare:@".xspf" options: NSCaseInsensitiveSearch
+ range: range] != NSOrderedSame )
+ {
+ o_real_filename = [NSString stringWithFormat: @"%@.xspf", o_filename];
+ }
+ else
+ {
+ o_real_filename = o_filename;
+ }
+ playlist_Export( p_playlist, [o_real_filename fileSystemRepresentation], "export-xspf" );
+ }
+ else
+ {
+ NSString * o_real_filename;
+ NSRange range;
+ range.location = [o_filename length] - [@".m3u" length];
+ range.length = [@".m3u" length];
+
+ if( [o_filename compare:@".m3u" options: NSCaseInsensitiveSearch
+ range: range] != NSOrderedSame )
+ {
+ o_real_filename = [NSString stringWithFormat: @"%@.m3u", o_filename];
+ }
+ else
+ {
+ o_real_filename = o_filename;
+ }
+ playlist_Export( p_playlist, [o_real_filename fileSystemRepresentation], "export-m3u" );
+ }
}
vlc_object_release( p_playlist );
}
-
/* When called retrieves the selected outlineview row and plays that node or item */
- (IBAction)playItem:(id)sender
{