]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/wizard.m
macosx: CAS: sync steppers and fields, and add NumberFormatters (fixes #8598)
[vlc] / modules / gui / macosx / wizard.m
index 721fe9da312285a42d848a06c17a2821799e6f52..cf6a8d6d208d37a0ef009d8303d4a652d21fe015 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  * wizard.m: MacOS X Streaming Wizard
  *****************************************************************************
- * Copyright (C) 2005-2009 VLC authors and VideoLAN
+ * Copyright (C) 2005-2013 VLC authors and VideoLAN
  * $Id$
  *
- * Authors: Felix Kühne <fkuehne at videolan dot org>
+ * Authors: Felix Paul Kühne <fkuehne at videolan dot org>,
+ *          Brendon Justin <brendonjustin at gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,7 +25,7 @@
 
 /*****************************************************************************
  * Note: this code is partially based upon ../wxwidgets/wizard.cpp and
- *         ../wxwidgets/streamdata.h; both written by Clément Stenac.
+ *         ../wxwidgets/streamdata.h; both written by ClÃ\83©ment Stenac.
  *****************************************************************************/
 
 
@@ -72,7 +73,7 @@ static VLCWizard *_o_sharedInstance = nil;
 
 - (void)awakeFromNib
 {
-    if (OSX_LION)
+    if (!OSX_SNOW_LEOPARD)
         [o_wizard_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
 
     /* some minor cleanup */
@@ -82,16 +83,14 @@ static VLCWizard *_o_sharedInstance = nil;
 
     /* add audio-bitrates for transcoding */
     NSArray * audioBitratesArray;
-    audioBitratesArray = [NSArray arrayWithObjects: @"512", @"256", @"192", 
-        @"128", @"64", @"32", @"16", nil ];
+    audioBitratesArray = @[@"512", @"256", @"192", @"128", @"64", @"32", @"16"];
     [o_t4_pop_audioBitrate removeAllItems];
     [o_t4_pop_audioBitrate addItemsWithTitles: audioBitratesArray];
     [o_t4_pop_audioBitrate selectItemWithTitle: @"192"];
 
     /* add video-bitrates for transcoding */
     NSArray * videoBitratesArray;
-    videoBitratesArray = [NSArray arrayWithObjects: @"3072", @"2048", @"1024", 
-        @"768", @"512", @"256", @"192", @"128", @"64", @"32", @"16", nil ];
+    videoBitratesArray = @[@"3072", @"2048", @"1024", @"768", @"512", @"256", @"192", @"128", @"64", @"32", @"16"];
     [o_t4_pop_videoBitrate removeAllItems];
     [o_t4_pop_videoBitrate addItemsWithTitles: videoBitratesArray];
     [o_t4_pop_videoBitrate selectItemWithTitle: @"1024"];
@@ -113,62 +112,62 @@ static VLCWizard *_o_sharedInstance = nil;
     NSArray * o_mjpg;
     NSArray * o_theo;
     NSArray * o_dummyVid;
-    o_mp1v = [NSArray arrayWithObjects: @"MPEG-1 Video", @"mp1v", 
-        _NS("MPEG-1 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG " 
-        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
-        @"NO", @"NO", @"NO", @"NO", nil];
-    o_mp2v = [NSArray arrayWithObjects: @"MPEG-2 Video", @"mp2v",
-        _NS("MPEG-2 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG "
-        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
-        @"NO", @"NO", @"NO", @"NO", nil];
-    o_mp4v = [NSArray arrayWithObjects: @"MPEG-4 Video", @"mp4v",
-        _NS("MPEG-4 Video codec (useable with MPEG PS, MPEG TS, MPEG1, ASF, "
-        "MP4, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF",
-        @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", nil];
-    o_div1 = [NSArray arrayWithObjects: @"DIVX 1", @"DIV1",
-        _NS("DivX first version (useable with MPEG TS, MPEG1, ASF and OGG)"),
-        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
-        @"NO", @"NO", nil];
-    o_div2 = [NSArray arrayWithObjects: @"DIVX 2", @"DIV2",
-        _NS("DivX second version (useable with MPEG TS, MPEG1, ASF and OGG)"),
-        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
-        @"NO", @"NO", nil];
-    o_div3 = [NSArray arrayWithObjects: @"DIVX 3", @"DIV3",
-        _NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"),
-        @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
-        @"NO", @"NO", nil];
-    o_h263 = [NSArray arrayWithObjects: @"H.263", @"h263",
-        _NS("H263 is a video codec optimized for videoconference "
-        "(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO",
-        @"NO", @"NO", @"NO", @"NO", @"NO", nil];
-    o_h264 = [NSArray arrayWithObjects: @"H.264", @"h264",
-        _NS("H264 is a new video codec (useable with MPEG TS and MP4)"),
-        @"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO",
-        @"NO", nil];
-    o_wmv1 = [NSArray arrayWithObjects: @"WMV 1", @"WMV1",
-        _NS("WMV (Windows Media Video) 1 (useable with MPEG TS, MPEG1, ASF and "
-        "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
-        @"NO", @"NO", @"NO", nil];
-    o_wmv2 = [NSArray arrayWithObjects: @"WMV 2", @"WMV2",
-        _NS("WMV (Windows Media Video) 2 (useable with MPEG TS, MPEG1, ASF and "
-        "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
-        @"NO", @"NO", @"NO", nil];
-    o_mjpg = [NSArray arrayWithObjects: @"MJPEG", @"MJPG",
-        _NS("MJPEG consists of a series of JPEG pictures (useable with MPEG TS,"
-        " MPEG1, ASF and OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
-        @"NO", @"NO", @"NO", @"NO", @"NO", nil];
-    o_theo = [NSArray arrayWithObjects: @"Theora", @"theo",
-        _NS("Theora is a free general-purpose codec (useable with MPEG TS "
-        "and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO",
-        @"NO", @"NO", nil];
-    o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy",
-        _NS("Dummy codec (do not transcode, useable with all encapsulation "
-        "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
-        @"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV", nil];
+    o_mp1v = @[@"MPEG-1 Video", @"mp1v",
+               _NS("MPEG-1 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG "
+                   "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
+               @"NO", @"NO", @"NO", @"NO"];
+    o_mp2v = @[@"MPEG-2 Video", @"mp2v",
+               _NS("MPEG-2 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG "
+                   "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
+               @"NO", @"NO", @"NO", @"NO"];
+    o_mp4v = @[@"MPEG-4 Video", @"mp4v",
+               _NS("MPEG-4 Video codec (useable with MPEG PS, MPEG TS, MPEG1, ASF, "
+                   "MP4, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF",
+               @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO"];
+    o_div1 = @[@"DIVX 1", @"DIV1",
+               _NS("DivX first version (useable with MPEG TS, MPEG1, ASF and OGG)"),
+               @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
+               @"NO", @"NO"];
+    o_div2 = @[@"DIVX 2", @"DIV2",
+               _NS("DivX second version (useable with MPEG TS, MPEG1, ASF and OGG)"),
+               @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
+               @"NO", @"NO"];
+    o_div3 = @[@"DIVX 3", @"DIV3",
+               _NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"),
+               @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
+               @"NO", @"NO"];
+    o_h263 = @[@"H.263", @"h263",
+               _NS("H263 is a video codec optimized for videoconference "
+                   "(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO",
+               @"NO", @"NO", @"NO", @"NO", @"NO"];
+    o_h264 = @[@"H.264", @"h264",
+               _NS("H264 is a new video codec (useable with MPEG TS and MP4)"),
+               @"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO",
+               @"NO"];
+    o_wmv1 = @[@"WMV 1", @"WMV1",
+               _NS("WMV (Windows Media Video) 1 (useable with MPEG TS, MPEG1, ASF and "
+                   "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
+               @"NO", @"NO", @"NO"];
+    o_wmv2 = @[@"WMV 2", @"WMV2",
+               _NS("WMV (Windows Media Video) 2 (useable with MPEG TS, MPEG1, ASF and "
+                   "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
+               @"NO", @"NO", @"NO"];
+    o_mjpg = @[@"MJPEG", @"MJPG",
+               _NS("MJPEG consists of a series of JPEG pictures (useable with MPEG TS,"
+                   " MPEG1, ASF and OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
+               @"NO", @"NO", @"NO", @"NO", @"NO"];
+    o_theo = @[@"Theora", @"theo",
+               _NS("Theora is a free general-purpose codec (useable with MPEG TS "
+                   "and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO",
+               @"NO", @"NO"];
+    o_dummyVid = @[@"Dummy", @"dummy",
+                   _NS("Dummy codec (do not transcode, useable with all encapsulation "
+                       "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
+                   @"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV"];
     o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v,
         o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo,
         o_dummyVid, nil];
+
 
     NSArray * o_mpga;
     NSArray * o_mp3;
@@ -180,42 +179,41 @@ static VLCWizard *_o_sharedInstance = nil;
     NSArray * o_s16l;
     NSArray * o_fl32;
     NSArray * o_dummyAud;
-    o_mpga = [NSArray arrayWithObjects: @"MPEG Audio", @"mpga",
-        _NS("The standard MPEG audio (1/2) format (useable with MPEG PS, MPEG TS, "
-        "MPEG1, ASF, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG",
-        @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil];
-    o_mp3 = [NSArray arrayWithObjects: @"MP3", @"mp3",
-        _NS("MPEG Audio Layer 3 (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
-        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
-        @"MUX_RAW", @"-1", @"-1", @"-1", nil];
-    o_mp4a = [NSArray arrayWithObjects: @"MPEG 4 Audio", @"mp4a",
-        _NS("Audio format for MPEG4 (useable with MPEG TS and MPEG4)"), @"MUX_TS",
-        @"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
-    o_a52 = [NSArray arrayWithObjects: @"A/52", @"a52",
-        _NS("DVD audio format (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
-        "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
-        @"MUX_RAW", @"-1", @"-1", @"-1", nil];
-    o_vorb = [NSArray arrayWithObjects: @"Vorbis", @"vorb",
-        _NS("Vorbis is a free audio codec (useable with OGG)"), @"MUX_OGG",
-        @"-1",  @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
-    o_flac = [NSArray arrayWithObjects: @"FLAC", @"flac",
-        _NS("FLAC is a lossless audio codec (useable with OGG and RAW)"),
-        @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1",
-        @"-1", nil];
-    o_spx = [NSArray arrayWithObjects: @"Speex", @"spx",
-        _NS("A free audio codec dedicated to compression of voice (useable "
-        "with OGG)"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1",
-        @"-1", @"-1", nil];
-    o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l",
-        _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
-        @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
-    o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating point", @"fl32",
-        _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
-        @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil];
-    o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy",
-        _NS("Dummy codec (do not transcode, useable with all encapsulation "
-        "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
-        @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil];
+    o_mpga = @[@"MPEG Audio", @"mpga",
+               _NS("The standard MPEG audio (1/2) format (useable with MPEG PS, MPEG TS, "
+                   "MPEG1, ASF, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG",
+               @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1"];
+    o_mp3 = @[@"MP3", @"mp3",
+              _NS("MPEG Audio Layer 3 (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
+                  "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
+              @"MUX_RAW", @"-1", @"-1", @"-1"];
+    o_mp4a = @[@"MPEG 4 Audio", @"mp4a",
+               _NS("Audio format for MPEG4 (useable with MPEG TS and MPEG4)"), @"MUX_TS",
+               @"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
+    o_a52 = @[@"A/52", @"a52",
+              _NS("DVD audio format (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
+                  "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
+              @"MUX_RAW", @"-1", @"-1", @"-1"];
+    o_vorb = @[@"Vorbis", @"vorb",
+               _NS("Vorbis is a free audio codec (useable with OGG)"), @"MUX_OGG",
+               @"-1",  @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
+    o_flac = @[@"FLAC", @"flac",
+               _NS("FLAC is a lossless audio codec (useable with OGG and RAW)"),
+               @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
+    o_spx = @[@"Speex", @"spx",
+              _NS("A free audio codec dedicated to compression of voice (useable "
+                  "with OGG)"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1",
+              @"-1", @"-1"];
+    o_s16l = @[@"Uncompressed, integer", @"s16l",
+               _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
+               @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
+    o_fl32 = @[@"Uncompressed, floating point", @"fl32",
+               _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
+               @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
+    o_dummyAud = @[@"Dummy", @"dummy",
+                   _NS("Dummy codec (do not transcode, useable with all encapsulation "
+                       "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
+                   @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV"];
     o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a,
         o_a52, o_vorb, o_flac, o_spx, o_s16l, o_fl32, o_dummyAud, nil];
 
@@ -233,19 +231,16 @@ static VLCWizard *_o_sharedInstance = nil;
     NSArray * o_mov;
     NSArray * o_wav;
     NSArray * o_asfh;
-    o_ps = [NSArray arrayWithObjects: @"ps", @"MPEG PS",
-        _NS("MPEG Program Stream"), @"mpg", nil];
-    o_ts = [NSArray arrayWithObjects: @"ts", @"MPEG TS",
-        _NS("MPEG Transport Stream"), nil];
-    o_mpeg = [NSArray arrayWithObjects: @"ps", @"MPEG 1",
-        _NS("MPEG 1 Format"), @"mpg", nil];
-    o_ogg = [NSArray arrayWithObjects: @"ogg", @"OGG", @"OGG", nil];
-    o_raw = [NSArray arrayWithObjects: @"raw", @"RAW", @"RAW", nil];
-    o_asf = [NSArray arrayWithObjects: @"asf", @"ASF", @"ASF", nil];
-    o_mp4 = [NSArray arrayWithObjects: @"mp4", @"MP4", @"MPEG4", nil];
-    o_mov = [NSArray arrayWithObjects: @"mov", @"MOV", @"MOV", nil];
-    o_wav = [NSArray arrayWithObjects: @"wav", @"WAV", @"WAV", nil];
-    o_asfh = [NSArray arrayWithObjects: @"asfh", @"ASFH", @"ASFH", nil];
+    o_ps = @[@"ps", @"MPEG PS", _NS("MPEG Program Stream"), @"mpg"];
+    o_ts = @[@"ts", @"MPEG TS", _NS("MPEG Transport Stream")];
+    o_mpeg = @[@"ps", @"MPEG 1", _NS("MPEG 1 Format"), @"mpg"];
+    o_ogg = @[@"ogg", @"OGG", @"OGG"];
+    o_raw = @[@"raw", @"RAW", @"RAW"];
+    o_asf = @[@"asf", @"ASF", @"ASF"];
+    o_mp4 = @[@"mp4", @"MP4", @"MPEG4"];
+    o_mov = @[@"mov", @"MOV", @"MOV"];
+    o_wav = @[@"wav", @"WAV", @"WAV"];
+    o_asfh = @[@"asfh", @"ASFH", @"ASFH"];
     o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg,
         o_ogg, o_raw, o_asf, o_mp4, o_mov, o_wav, o_asfh, nil];
 
@@ -256,14 +251,14 @@ static VLCWizard *_o_sharedInstance = nil;
     NSArray * o_udp_multi;
     NSArray * o_rtp_uni;
     NSArray * o_rtp_multi;
-    o_http = [NSArray arrayWithObjects: @"http", @"HTTP", _NS("Enter the local "
+    o_http = @[@"http", @"HTTP", _NS("Enter the local "
         "addresses you want to listen requests on. Do not enter anything if "
         "you want to listen on all the network interfaces. This is generally "
         "the best thing to do. Other computers can then access the stream at "
         "http://yourip:8080 by default.") , _NS("Use this to stream to several "
         "computers. This method is not the most efficient, as the server needs "\
-        "to send the stream several times, but generally the most compatible"), nil];
-    o_mms = [NSArray arrayWithObjects: @"mmsh", @"MMS", _NS("Enter the local "
+        "to send the stream several times, but generally the most compatible")];
+    o_mms = @[@"mmsh", @"MMS", _NS("Enter the local "
         "addresses you want to listen requests on. Do not enter anything if "
         "you want to listen on all the network interfaces. This is generally "
         "the best thing to do. Other computers can then access the stream at "
@@ -271,27 +266,27 @@ static VLCWizard *_o_sharedInstance = nil;
         "computers using the Microsoft MMS protocol. This protocol is used as "
         "transport method by many Microsoft's softwares. Note that only a "
         "small part of the MMS protocol is supported (MMS encapsulated in "
-        "HTTP)." ), nil];
-    o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter "
+        "HTTP).")];
+    o_udp_uni = @[@"udp", @"UDP-Unicast", _NS("Enter "
         "the address of the computer to stream to."), _NS("Use this to stream "
-        "to a single computer."), nil];
-    o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter "
+        "to a single computer.")];
+    o_udp_multi = @[@"udp", @"UDP-Multicast", _NS("Enter "
         "the multicast address to stream to in this field. This must be an IP "
         "address between 224.0.0.0 and 239.255.255.255. For a private use, "
         "enter an address beginning with 239.255."), _NS("Use this to stream "
         "to a dynamic group of computers on a multicast-enabled network. This "
         "is the most efficient method to stream to several computers, but it "
-        "won't work over the Internet."), nil];
-    o_rtp_uni = [NSArray arrayWithObjects: @"rtp", @"RTP-Unicast", _NS("Enter the "
+        "won't work over the Internet.")];
+    o_rtp_uni = @[@"rtp", @"RTP-Unicast", _NS("Enter the "
         "address of the computer to stream to.") , _NS("Use this to stream "
-        "to a single computer. RTP headers will be added to the stream"), nil];
-    o_rtp_multi = [NSArray arrayWithObjects: @"rtp", @"RTP-Multicast", _NS("Enter "
+        "to a single computer. RTP headers will be added to the stream")];
+    o_rtp_multi = @[@"rtp", @"RTP-Multicast", _NS("Enter "
         "the multicast address to stream to in this field. This must be an IP "
         "address between 224.0.0.0 and 239.255.255.255. For a private use, "
         "enter an address beginning with 239.255."), _NS("Use this to stream "
         "to a dynamic group of computers on a multicast-enabled network. This "
         "is the most efficient method to stream to several computers, but it "
-        "won't work over Internet. RTP headers will be added to the stream"), nil];
+        "won't work over Internet. RTP headers will be added to the stream")];
     o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms,
         o_udp_uni, o_udp_multi, o_rtp_uni, o_rtp_multi, nil];
 }
@@ -333,9 +328,9 @@ static VLCWizard *_o_sharedInstance = nil;
         "a small subset of VLC's streaming and transcoding capabilities. "
         "The Open and 'Saving/Streaming' dialogs will give access to more "
         "features.")];
-    [[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: 
+    [[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle:
         _NS("Stream to network")];
-    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle: 
+    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle:
         _NS("Transcode/Save to file")];
 
     /* page two ("Input") */
@@ -402,7 +397,7 @@ static VLCWizard *_o_sharedInstance = nil;
                               "additional streaming parameters can be set.")];
     [o_t6_txt_ttl setStringValue: _NS("Time-To-Live (TTL)")];
     [o_t6_btn_mrInfo_ttl setTitle: _NS("More Info")];
-    [o_t6_ckb_sap setTitle: _NS("SAP Announce")];
+    [o_t6_ckb_sap setTitle: _NS("SAP Announcement")];
     [o_t6_btn_mrInfo_sap setTitle: _NS("More Info")];
     [o_t6_ckb_local setTitle: _NS("Local playback")];
     [o_t6_btn_mrInfo_local setTitle: _NS("More Info")];
@@ -434,7 +429,7 @@ static VLCWizard *_o_sharedInstance = nil;
         stringByAppendingString: @":"]];
     [o_t8_txt_partExtract setStringValue: [_NS("Partial Extract")
         stringByAppendingString: @":"]];
-    [o_t8_txt_sap setStringValue: [_NS("SAP Announce")
+    [o_t8_txt_sap setStringValue: [_NS("SAP Announcement")
         stringByAppendingString: @":"]];
     [o_t8_txt_saveFileTo setStringValue: [_NS("Save file to")
         stringByAppendingString: @":"]];
@@ -450,7 +445,7 @@ static VLCWizard *_o_sharedInstance = nil;
         stringByAppendingString: @":"]];
 }
 
-- (void)initWithExtractValuesFrom: (NSString *)from 
+- (void)initWithExtractValuesFrom: (NSString *)from
                                to: (NSString *)to
                            ofItem: (NSString *)item
 {
@@ -467,7 +462,7 @@ static VLCWizard *_o_sharedInstance = nil;
     [o_t2_ckb_enblPartExtrct setState: NSOnState];
     [self t2_enableExtract: nil];
     msg_Dbg(VLCIntf, "wizard interface is set");
+
     [o_wizard_window center];
     [o_wizard_window display];
     [o_wizard_window makeKeyAndOrderFront:nil];
@@ -486,13 +481,14 @@ static VLCWizard *_o_sharedInstance = nil;
 
 - (IBAction)nextTab:(id)sender
 {
-    if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Hello"])
+    NSString * selectedTabViewItemLabel = [[o_tab_pageHolder selectedTabViewItem] label];
+    if ([selectedTabViewItemLabel isEqualToString: @"Hello"])
     {
         /* check whether the user wants to stream or just to transcode;
          * store information for later usage */
         NSString *o_mode;
         o_mode = [[o_t1_matrix_strmgOrTrnscd selectedCell] title];
-        if( [o_mode isEqualToString: _NS("Stream to network")] )
+        if ([o_mode isEqualToString: _NS("Stream to network")])
         {
             /* we will be streaming */
             [o_userSelections setObject:@"strmg" forKey:@"trnscdOrStrmg"];
@@ -509,7 +505,7 @@ static VLCWizard *_o_sharedInstance = nil;
         [o_playlist_wizard reloadOutlineView];
 
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Input"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Input"])
     {
         /* check whether partialExtract is enabled and store the values, if needed */
         if ([o_t2_ckb_enblPartExtrct state] == NSOnState)
@@ -530,7 +526,7 @@ static VLCWizard *_o_sharedInstance = nil;
         BOOL stop;
         stop = NO;
         o_mode = [[o_t2_matrix_inputSourceType selectedCell] title];
-        if( [o_mode isEqualToString: _NS("Select a stream")] )
+        if ([o_mode isEqualToString: _NS("Select a stream")])
         {
             [o_userSelections setObject:@"YES" forKey:@"newStrm"];
             if ([[o_t2_fld_pathToNewStrm stringValue] isEqualToString: @""])
@@ -540,37 +536,31 @@ static VLCWizard *_o_sharedInstance = nil;
             }
             else
             {
-                [o_userSelections setObject:[NSArray arrayWithObject:
-                    [o_t2_fld_pathToNewStrm stringValue]] forKey:@"pathToStrm"];
+                [o_userSelections setObject:@[[o_t2_fld_pathToNewStrm stringValue]] forKey:@"pathToStrm"];
             }
         }
         else
         {
             if ([o_t2_tbl_plst numberOfSelectedRows] > 0)
             {
-                int x = 0;
-                int y = [[o_t2_tbl_plst selectedRowIndexes] count];
+                NSIndexSet * selectedIndexes = [o_t2_tbl_plst selectedRowIndexes];
+                NSUInteger count = [selectedIndexes count];
                 NSMutableArray * tempArray = [[NSMutableArray alloc] init];
-                while( x != y )
+                for( NSUInteger x = 0; x < count; x++)
                 {
-                    playlist_item_t *p_item =
-                        [[o_t2_tbl_plst itemAtRow:
-                            [[o_t2_tbl_plst selectedRowIndexes]
-                            indexGreaterThanOrEqualToIndex: x]] pointerValue];
+                    playlist_item_t *p_item = [[o_t2_tbl_plst itemAtRow: [selectedIndexes indexGreaterThanOrEqualToIndex: x]] pointerValue];
 
-                    if( p_item->i_children <= 0 )
+                    if (p_item->i_children <= 0)
                     {
-                        char *psz_uri = input_item_GetURI( p_item->p_input );
-                        [tempArray addObject: [NSString stringWithUTF8String: psz_uri]];
-                        free( psz_uri );
+                        char *psz_uri = input_item_GetURI( p_item->p_input);
+                        [tempArray addObject: @(psz_uri)];
+                        free( psz_uri);
                         stop = NO;
                     }
                     else
                         stop = YES;
-                    x += 1;
                 }
-                [o_userSelections setObject:[NSArray arrayWithArray: tempArray]
-                    forKey:@"pathToStrm"];
+                [o_userSelections setObject:[NSArray arrayWithArray: tempArray] forKey:@"pathToStrm"];
                 [tempArray release];
             }
             else
@@ -599,21 +589,20 @@ static VLCWizard *_o_sharedInstance = nil;
         } else {
             /* show a sheet that the user didn't select a file */
             NSBeginInformationalAlertSheet(_NS("No input selected"),
-                _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+                _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
                 _NS("No new stream or valid playlist item has been selected.\n\n"
                 "Choose one before going to the next page."));
         }
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Streaming 1"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Streaming 1"])
     {
         /* rebuild the menues for the codec-selections */
         [self rebuildCodecMenus];
+
         /* check which streaming method is selected and store it */
         int mode;
         mode = [[o_t3_matrix_stmgMhd selectedCell] tag];
-        if( mode == 0 )
+        if (mode == 0)
         {
             /* HTTP Streaming */
             [o_userSelections setObject:@"0" forKey:@"stmgMhd"];
@@ -622,19 +611,19 @@ static VLCWizard *_o_sharedInstance = nil;
              * OGG, RAW or ASF */
             [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
             [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
-        } else if ( mode == 1 )
+
+        } else if ( mode == 1)
         {
             /* MMS Streaming */
             [o_userSelections setObject:@"1" forKey:@"stmgMhd"];
+
             /* disable all codecs which don't support ASF / ASFH */
             [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
             [o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
             [o_t4_pop_audioCodec removeItemWithTitle:@"Speex"];
             [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, integer"];
             [o_t4_pop_audioCodec removeItemWithTitle:@"Uncompressed, floating point"];
+
             [o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-1 Video"];
             [o_t4_pop_videoCodec removeItemWithTitle:@"MPEG-2 Video"];
             [o_t4_pop_videoCodec removeItemWithTitle:@"H.263"];
@@ -643,9 +632,8 @@ static VLCWizard *_o_sharedInstance = nil;
             [o_t4_pop_videoCodec removeItemWithTitle:@"Theora"];
         } else {
             /* RTP/UDP Unicast/Multicast Streaming */
-            [o_userSelections setObject: [[NSNumber numberWithInt: mode]
-                stringValue] forKey:@"stmgMhd"];
+            [o_userSelections setObject: [@(mode) stringValue] forKey:@"stmgMhd"];
+
             /* disable all codecs which don't support MPEG-TS */
             [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
             [o_t4_pop_audioCodec removeItemWithTitle:@"FLAC"];
@@ -655,14 +643,14 @@ static VLCWizard *_o_sharedInstance = nil;
         }
 
         /* store the destination and check whether is it empty */
-        if([[o_userSelections objectForKey:@"stmgMhd"] intValue] >=2 )
+        if([[o_userSelections objectForKey:@"stmgMhd"] intValue] >=2)
         {
            /* empty field is valid for HTTP and MMS */
-            if( [[o_t3_fld_address stringValue] isEqualToString: @""] )
+            if ([[o_t3_fld_address stringValue] isEqualToString: @""])
             {
                 /* complain to the user that "" is no valid dest. */
                 NSBeginInformationalAlertSheet(_NS("No valid destination"),
-                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
                     _NS("A valid destination has to be selected "
                     "Enter either a Unicast-IP or a Multicast-IP."
                     "\n\nIf you don't know what this means, have a look at "
@@ -682,15 +670,14 @@ static VLCWizard *_o_sharedInstance = nil;
             [o_tab_pageHolder selectTabViewItemAtIndex:3];
         }
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Transcode 1"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Transcode 1"])
     {
         /* check whether the user wants to transcode the video-track and store
          * the related options */
         if ([o_t4_ckb_video state] == NSOnState)
         {
             NSNumber * theNum;
-            theNum = [NSNumber numberWithInt:[[o_t4_pop_videoCodec selectedItem]tag]];
+            theNum = @([[o_t4_pop_videoCodec selectedItem]tag]);
             [o_userSelections setObject:@"YES" forKey:@"trnscdVideo"];
             [o_userSelections setObject:[o_t4_pop_videoBitrate titleOfSelectedItem]
                 forKey:@"trnscdVideoBitrate"];
@@ -704,7 +691,7 @@ static VLCWizard *_o_sharedInstance = nil;
         if ([o_t4_ckb_audio state] == NSOnState)
         {
             NSNumber * theNum;
-            theNum = [NSNumber numberWithInt:[[o_t4_pop_audioCodec selectedItem]tag]];
+            theNum = @([[o_t4_pop_audioCodec selectedItem]tag]);
             [o_userSelections setObject:@"YES" forKey:@"trnscdAudio"];
             [o_userSelections setObject:[o_t4_pop_audioBitrate titleOfSelectedItem]
                 forKey:@"trnscdAudioBitrate"];
@@ -735,95 +722,80 @@ static VLCWizard *_o_sharedInstance = nil;
 
         if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualTo: @"YES"])
         {
+            NSInteger i_selectedAudioCodec = [[o_userSelections objectForKey:@"trnscdAudioCodec"] intValue];
+
             if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualTo: @"YES"])
             {
+                NSInteger i_selectedVideoCodec = [[o_userSelections objectForKey:@"trnscdVideoCodec"] intValue];
+
                 /* we are transcoding both audio and video, so we need to check both deps */
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_PS"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_PS"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections
-                        objectForKey:@"trnscdAudioCodec"] intValue]]
-                        containsObject: @"MUX_PS"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_PS"])
                     {
                         [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:0 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections
-                    objectForKey:@"trnscdVideoCodec"] intValue]] containsObject: @"MUX_TS"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_TS"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_TS"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_TS"])
                     {
                         [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:1 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MPEG"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_MPEG"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MPEG"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_MPEG"])
                     {
                         [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:2 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_OGG"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_OGG"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections
-                        objectForKey:@"trnscdAudioCodec"] intValue]] containsObject: @"MUX_OGG"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_OGG"])
                     {
                         [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:3 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_RAW"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_RAW"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_RAW"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_RAW"])
                     {
                         [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:4 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_ASF"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_ASF"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_ASF"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_ASF"])
                     {
                         [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:5 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MP4"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_MP4"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MP4"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_MP4"])
                     {
                         [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:6 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MOV"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_MOV"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MOV"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_MOV"])
                     {
                         [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:7 column:0];
                     }
                 }
-                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_WAV"])
+                if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_WAV"])
                 {
-                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_WAV"])
+                    if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_WAV"])
                     {
                         [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];
                         [o_t5_matrix_encap selectCellAtRow:8 column:0];
@@ -835,56 +807,47 @@ static VLCWizard *_o_sharedInstance = nil;
                 /* we just transcoding the audio */
 
                 /* select formats supported by the audio codec */
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_PS"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_PS"])
                 {
                     [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:0 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_TS"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_TS"])
                 {
                     [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:1 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MPEG"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_MPEG"])
                 {
                     [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:2 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_OGG"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_OGG"])
                 {
                     [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:3 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_RAW"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_RAW"])
                 {
                     [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:4 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_ASF"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_ASF"])
                 {
                     [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:5 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MP4"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_MP4"])
                 {
                     [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:6 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MOV"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_MOV"])
                 {
                     [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:7 column:0];
                 }
-                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_WAV"])
+                if ([o_audioCodecs[i_selectedAudioCodec] containsObject: @"MUX_WAV"])
                 {
                     [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];
                     [o_t5_matrix_encap selectCellAtRow:8 column:0];
@@ -896,57 +859,49 @@ static VLCWizard *_o_sharedInstance = nil;
             /* we are just transcoding the video */
 
             /* select formats supported by the video-codec */
+            NSInteger i_selectedVideoCodec = [[o_userSelections objectForKey:@"trnscdVideoCodec"] intValue];
 
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_PS"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_PS"])
             {
                 [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:0 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_TS"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_TS"])
             {
                 [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:1 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MPEG"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_MPEG"])
             {
                 [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:2 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_OGG"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_OGG"])
             {
                 [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:3 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_RAW"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_RAW"])
             {
                 [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:4 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_ASF"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_ASF"])
             {
                 [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:5 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MP4"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_MP4"])
             {
                 [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:6 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MOV"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_MOV"])
             {
                 [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:7 column:0];
             }
-            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_WAV"])
+            if ([o_videoCodecs[i_selectedVideoCodec] containsObject: @"MUX_WAV"])
             {
                 [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];
                 [o_t5_matrix_encap selectCellAtRow:8 column:0];
@@ -974,7 +929,8 @@ static VLCWizard *_o_sharedInstance = nil;
             [o_t5_matrix_encap selectCellAtRow:0 column:0];
         }
 
-        if ( [o_userSelections objectForKey:@"stmgMhd"] == @"1" )
+        NSInteger i_streamingMethod = [[o_userSelections objectForKey:@"stmgMhd"] intValue];
+        if ( i_streamingMethod == 1)
         {
             /* if MMS is the streaming protocol, only ASFH is available */
             [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];
@@ -989,7 +945,7 @@ static VLCWizard *_o_sharedInstance = nil;
             [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];
             [o_t5_matrix_encap selectCellAtRow:9 column:0];
         }
-        else if ( [o_userSelections objectForKey:@"stmgMhd"] == @"0" )
+        else if ( i_streamingMethod == 0)
         {
             /* if HTTP is the streaming protocol, disable all unsupported
              * encap-formats, but don't touch the other ones selected above */
@@ -998,7 +954,7 @@ static VLCWizard *_o_sharedInstance = nil;
             [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];
             [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];
         }
-        else if ( [[o_userSelections objectForKey:@"stmgMhd"] intValue] >= 2 )
+        else if ( i_streamingMethod >= 2)
         {
             /* if UDP/RTP is the streaming protocol, only MPEG-TS is available */
             [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];
@@ -1013,22 +969,20 @@ static VLCWizard *_o_sharedInstance = nil;
             [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];
             [o_t5_matrix_encap selectCellAtRow:1 column:0];
         }
-        int x;
+
         BOOL anythingEnabled;
-        x = 0;
         anythingEnabled = NO;
-        while (x != [o_t5_matrix_encap numberOfRows])
+        NSUInteger count = [o_t5_matrix_encap numberOfRows];
+        for (NSUInteger x = 0; x < count; x++)
         {
             if ([[o_t5_matrix_encap cellAtRow:x column:0] isEnabled])
-            {
                 anythingEnabled = YES;
-            }
-            x += 1;
         }
+
         if (anythingEnabled == YES)
         {
             /* re-select the previously chosen item, if available */
-            if( [[o_t5_matrix_encap cellWithTag: i_temp] isEnabled] )
+            if ([[o_t5_matrix_encap cellWithTag: i_temp] isEnabled])
                 [o_t5_matrix_encap selectCellWithTag: i_temp];
 
             /* go the encap-tab */
@@ -1036,18 +990,18 @@ static VLCWizard *_o_sharedInstance = nil;
         } else {
             /* show a sheet that the selected codecs are not compatible */
             NSBeginInformationalAlertSheet(_NS("Invalid selection"), _NS("OK"),
-                @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("The "
+                @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@", _NS("The "
                 "chosen codecs are not compatible with each other. For example: "
-                "It is impossibleto  mix uncompressed audio with any video codec.\n\n"
+                "It is not possible to mix uncompressed audio with any video codec.\n\n"
                 "Correct your selection and try again."));
         }
 
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Encap"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Encap"])
     {
         /* get the chosen encap format and store it */
         NSNumber * theNum;
-        theNum = [NSNumber numberWithInt:[[o_t5_matrix_encap selectedCell] tag]];
+        theNum = @([[o_t5_matrix_encap selectedCell] tag]);
         [o_userSelections setObject:[theNum stringValue] forKey:@"encapFormat"];
 
         /* show either "Streaming 2" or "Transcode 2" to the user */
@@ -1060,7 +1014,7 @@ static VLCWizard *_o_sharedInstance = nil;
             [o_tab_pageHolder selectTabViewItemAtIndex:6];
             /* in case that we are processing multiple items, let the user
              * select a folder instead of a localtion for a single item */
-            if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
+            if ([[o_userSelections objectForKey:@"pathToStrm"] count] > 1)
             {
                 [o_t7_txt_saveFileTo setStringValue:
                     _NS("Select the directory to save to")];
@@ -1072,8 +1026,7 @@ static VLCWizard *_o_sharedInstance = nil;
             }
         }
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Streaming 2"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Streaming 2"])
     {
         /* store the chosen TTL */
         [o_userSelections setObject:[o_t6_fld_ttl stringValue] forKey:@"ttl"];
@@ -1086,7 +1039,7 @@ static VLCWizard *_o_sharedInstance = nil;
         } else {
             [o_userSelections setObject:@"NO" forKey:@"sap"];
         }
+
         /* local playback? */
         if ([o_t6_ckb_local state] == NSOnState)
         {
@@ -1094,17 +1047,15 @@ static VLCWizard *_o_sharedInstance = nil;
         } else {
             [o_userSelections setObject:@"NO" forKey:@"localPb"];
         }
+
         /* include subtitles? */
         [o_userSelections setObject:
-            [[NSNumber numberWithInt:[o_t6_ckb_soverlay state]] stringValue]
-                             forKey: @"soverlay"];
+            [@([o_t6_ckb_soverlay state]) stringValue] forKey: @"soverlay"];
+
         /* go to "Summary" */
         [self showSummary];
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Transcode 2"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Transcode 2"])
     {
         /* local playback? */
         if ([o_t7_ckb_local state] == NSOnState)
@@ -1115,97 +1066,90 @@ static VLCWizard *_o_sharedInstance = nil;
         }
 
         /* check whether the path != "" and store it */
-        if( [[o_t7_fld_filePath stringValue] isEqualToString: @""] )
+        if ([[o_t7_fld_filePath stringValue] isEqualToString: @""])
         {
             /* complain to the user that "" is no valid path for a folder/file */
-            if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
+            if ([[o_userSelections objectForKey:@"pathToStrm"] count] > 1)
                 NSBeginInformationalAlertSheet(_NS("No folder selected"),
                     _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
-                    [NSString stringWithFormat: @"%@\n\n%@", _NS("A directory "
+                    @"%@\n\n%@", _NS("A directory "
                     "where to save the files has to be selected."),
                     _NS("Enter either a valid path or use the \"Choose...\" "
-                    "button to select a location.")]);
+                    "button to select a location."));
             else
                 NSBeginInformationalAlertSheet(_NS("No file selected"),
                     _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
-                    [NSString stringWithFormat: @"%@\n\n%@", _NS("A file "
+                    @"%@\n\n%@", _NS("A file "
                     "where to save the stream has to be selected."),
                     _NS("Enter either a valid path or use the \"Choose\" "
-                    "button to select a location.")]);
+                    "button to select a location."));
         } else {
             /* create a string containing the requested suffix for later usage */
-            NSString * theEncapFormat = [[o_encapFormats objectAtIndex:
-                [[o_userSelections objectForKey:@"encapFormat"] intValue]]
-                objectAtIndex:0];
-            if( theEncapFormat == @"ps" )
+            NSString * theEncapFormat = o_encapFormats[[[o_userSelections objectForKey:@"encapFormat"] intValue]][0];
+            if ([theEncapFormat isEqualToString:@"ps"])
                 theEncapFormat = @"mpg";
 
             /* look whether we need to process multiple items or not.
              * choose a faster variant if we just want a single item */
-            if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
+            if ([[o_userSelections objectForKey:@"pathToStrm"] count] > 1)
             {
                 NSMutableArray * tempArray = [[NSMutableArray alloc] init];
                 int x = 0;
                 int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
                 NSMutableString * tempString = [[NSMutableString alloc] init];
-                while( x != y )
+                while( x != y)
                 {
                     NSString * fileNameToUse;
                     /* check whether the extension is hidden or not.
                      * if not, remove it
                      * we need the casting to make GCC4 happy */
-                    if( [[[NSFileManager defaultManager] attributesOfItemAtPath:
-                        [[o_userSelections objectForKey:@"pathToStrm"]
-                         objectAtIndex: x] error:nil] objectForKey:
-                        NSFileExtensionHidden] )
+                    if ([[[NSFileManager defaultManager] attributesOfItemAtPath:
+                        [o_userSelections objectForKey:@"pathToStrm"][x] error:nil] objectForKey:
+                        NSFileExtensionHidden])
                         fileNameToUse = [NSString stringWithString:
                             [[NSFileManager defaultManager] displayNameAtPath:
-                            [[o_userSelections objectForKey:@"pathToStrm"]
-                            objectAtIndex: x]]];
+                            [o_userSelections objectForKey:@"pathToStrm"][x]]];
                     else
                     {
                         int z = 0;
                         int count = [[[[NSFileManager defaultManager]
                             displayNameAtPath:
-                            [[o_userSelections objectForKey:@"pathToStrm"]
-                            objectAtIndex: x]]
+                            [o_userSelections objectForKey:@"pathToStrm"][x]]
                             componentsSeparatedByString: @"."] count];
                         fileNameToUse = @"";
-                        while( z < (count - 1) )
+                        while( z < (count - 1))
                         {
                             fileNameToUse = [fileNameToUse stringByAppendingString:
-                                [[[[NSFileManager defaultManager]
+                                [[[NSFileManager defaultManager]
                                 displayNameAtPath:
-                                [[o_userSelections objectForKey:@"pathToStrm"]
-                                objectAtIndex: x]]
-                                componentsSeparatedByString: @"."]
-                                objectAtIndex: z]];
+                                [o_userSelections objectForKey:@"pathToStrm"][x]]
+                                componentsSeparatedByString: @"."][z]];
                             z += 1;
                         }
                     }
                     tempString = [NSString stringWithFormat: @"%@%@.%@",
                         [o_t7_fld_filePath stringValue],
                         fileNameToUse, theEncapFormat];
-                    if[[NSFileManager defaultManager] fileExistsAtPath:
-                        tempString] )
+                    if ([[NSFileManager defaultManager] fileExistsAtPath:
+                        tempString])
                     {
                         /* we don't wanna overwrite existing files, so add an
                          * int to the file-name */
                         int additionalInt = 1;
-                        while( additionalInt < 100 )
+                        while( additionalInt < 100)
                         {
                             tempString = [NSString stringWithFormat:@"%@%@ %i.%@",
                                 [o_t7_fld_filePath stringValue],
                                 fileNameToUse, additionalInt, theEncapFormat];
                             if(! [[NSFileManager defaultManager]
-                                fileExistsAtPath: tempString] )
+                                fileExistsAtPath: tempString])
                                 break;
                             additionalInt += 1;
                         }
-                        if( additionalInt >= 100 )
+                        if (additionalInt >= 100)
                             msg_Err( VLCIntf, "Files with the same name are "
                                 "already present in the destination directory. "
-                                "Delete these files or choose a different directory." );
+                                "Delete these files or choose a different directory.");
                     }
                     [tempArray addObject: [tempString retain]];
                     x += 1;
@@ -1220,80 +1164,89 @@ static VLCWizard *_o_sharedInstance = nil;
                 /* we don't need to check for existing items because Cocoa
                  * does that already when we are asking the user for a location
                  * to save her file */
-                [o_userSelections setObject: [NSArray arrayWithObject:
-                    [o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
+                [o_userSelections setObject: @[[o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
             }
 
             /* include subtitles ? */
             [o_userSelections setObject:
-                [[NSNumber numberWithInt:[o_t7_ckb_soverlay state]] stringValue]
-                                 forKey: @"soverlay"];
+                [@([o_t7_ckb_soverlay state]) stringValue] forKey: @"soverlay"];
+
             /* go to "Summary" */
             [self showSummary];
         }
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Summary"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Summary"])
     {
         intf_thread_t * p_intf = VLCIntf;
 
-        playlist_t * p_playlist = pl_Get( p_intf );
+        playlist_t * p_playlist = pl_Get( p_intf);
 
         int x = 0;
         int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
-        while( x != y )
+        while( x != y)
         {
             /* we need a temp. variable here to work-around a GCC4-bug */
             NSString *tempString = [NSString stringWithFormat:
                 @"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"),
-                ( x + 1 ), y];
+                ( x + 1), y];
             input_item_t *p_input = input_item_New(
-                [[[o_userSelections objectForKey:@"pathToStrm"]
-                objectAtIndex:x] UTF8String],
-                [tempString UTF8String] );
-            input_item_AddOption( p_input, [[[o_userSelections
-                objectForKey:@"opts"] objectAtIndex: x] UTF8String],
-                VLC_INPUT_OPTION_TRUSTED );
+                [[o_userSelections objectForKey:@"pathToStrm"][x] UTF8String],
+                [tempString UTF8String]);
+
+            /* use the MRL from the text field, in case the user
+             * modified it */
+            input_item_AddOption( p_input, [[o_t8_fld_mrl stringValue] UTF8String], VLC_INPUT_OPTION_TRUSTED);
 
             if(! [[o_userSelections objectForKey:@"partExtractFrom"]
-                isEqualToString:@""] )
-            {
-                input_item_AddOption( p_input, [[NSString
-                    stringWithFormat: @"start-time=%@", [o_userSelections
-                    objectForKey: @"partExtractFrom"]] UTF8String],
-                                       VLC_INPUT_OPTION_TRUSTED );
+                isEqualToString:@""]) {
+                NSArray * components = [[o_userSelections objectForKey: @"partExtractFrom"] componentsSeparatedByString:@":"];
+                NSUInteger componentCount = [components count];
+                NSUInteger time = 0;
+                if (componentCount == 1)
+                    time = 1000000 * ([components[0] intValue]);
+                else if (componentCount == 2)
+                    time = 1000000 * ([components[0] intValue] * 60 + [components[1] intValue]);
+                else if (componentCount == 3)
+                    time = 1000000 * ([components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue]);
+                else
+                    msg_Err(VLCIntf, "Invalid string format for time");
+                input_item_AddOption(p_input, [[NSString stringWithFormat: @"start-time=%lu", time] UTF8String], VLC_INPUT_OPTION_TRUSTED);
             }
 
             if(! [[o_userSelections objectForKey:@"partExtractTo"]
-                isEqualToString:@""] )
-            {
-                input_item_AddOption( p_input, [[NSString
-                    stringWithFormat: @"stop-time=%@", [o_userSelections
-                    objectForKey: @"partExtractTo"]] UTF8String],
-                    VLC_INPUT_OPTION_TRUSTED );
+                isEqualToString:@""]) {
+                NSArray * components = [[o_userSelections objectForKey: @"partExtractTo"] componentsSeparatedByString:@":"];
+                NSUInteger componentCount = [components count];
+                NSUInteger time = 0;
+                if (componentCount == 1)
+                    time = 1000000 * ([components[0] intValue]);
+                else if (componentCount == 2)
+                    time = 1000000 * ([components[0] intValue] * 60 + [components[1] intValue]);
+                else if (componentCount == 3)
+                    time = 1000000 * ([components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue]);
+                else
+                    msg_Err(VLCIntf, "Invalid string format for time");
+                input_item_AddOption(p_input, [[NSString stringWithFormat: @"stop-time=%lu", time] UTF8String], VLC_INPUT_OPTION_TRUSTED);
             }
 
             input_item_AddOption( p_input, [[NSString stringWithFormat:
                 @"ttl=%@", [o_userSelections objectForKey:@"ttl"]]
                 UTF8String],
-                VLC_INPUT_OPTION_TRUSTED );
+                VLC_INPUT_OPTION_TRUSTED);
 
-            /* FIXME: playlist_AddInput() can fail */
-            playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP,
-                PLAYLIST_END, true, pl_Unlocked );
+            int returnValue = playlist_AddInput( p_playlist, p_input, PLAYLIST_STOP, PLAYLIST_END, true, pl_Unlocked);
 
-            if( x == 0 )
+            if (x == 0 && returnValue != VLC_SUCCESS)
             {
                 /* play the first item and add the others afterwards */
                 PL_LOCK;
-                playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input );
+                playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input);
                 playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL,
-                          p_item );
+                          p_item);
                 PL_UNLOCK;
             }
 
-            vlc_gc_decref( p_input );
+            vlc_gc_decref( p_input);
             x += 1;
         }
 
@@ -1307,29 +1260,24 @@ static VLCWizard *_o_sharedInstance = nil;
     int savePreviousSel = 0;
     savePreviousSel = [o_t4_pop_videoCodec indexOfSelectedItem];
     [o_t4_pop_videoCodec removeAllItems];
-    unsigned int x;
-    x = 0;
-    while (x != [o_videoCodecs count])
+    NSUInteger count = [o_videoCodecs count];
+    for (NSUInteger x = 0; x < count; x++)
     {
-        [o_t4_pop_videoCodec addItemWithTitle:[[o_videoCodecs objectAtIndex:x]
-            objectAtIndex:0]];
+        [o_t4_pop_videoCodec addItemWithTitle:o_videoCodecs[x][0]];
         [[o_t4_pop_videoCodec lastItem] setTag:x];
-        x += 1;
     }
-    if( savePreviousSel >= 0 )
+    if (savePreviousSel >= 0)
         [o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel];
 
     savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem];
     [o_t4_pop_audioCodec removeAllItems];
-    x = 0;
-    while (x != [o_audioCodecs count])
+    count = [o_audioCodecs count];
+    for (NSUInteger x = 0; x < count; x++)
     {
-        [o_t4_pop_audioCodec addItemWithTitle:[[o_audioCodecs objectAtIndex:x]
-            objectAtIndex:0]];
+        [o_t4_pop_audioCodec addItemWithTitle:o_audioCodecs[x][0]];
         [[o_t4_pop_audioCodec lastItem] setTag:x];
-        x += 1;
     }
-    if( savePreviousSel >= 0 )
+    if (savePreviousSel >= 0)
         [o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel];
 }
 
@@ -1338,14 +1286,14 @@ static VLCWizard *_o_sharedInstance = nil;
     [o_btn_forward setTitle: _NS("Finish")];
     /* if we will transcode multiple items, just give their number; otherwise
      * print the URI of the single item */
-    if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
+    if ([[o_userSelections objectForKey:@"pathToStrm"] count] > 1)
         [o_t8_fld_inptStream setStringValue: [NSString stringWithFormat:
             _NS("%i items"),
             [[o_userSelections objectForKey:@"pathToStrm"] count]]];
     else
         [o_t8_fld_inptStream setStringValue:
-            [[o_userSelections objectForKey:@"pathToStrm"] objectAtIndex: 0]];
+            [o_userSelections objectForKey:@"pathToStrm"][0]];
+
     if ([[o_userSelections objectForKey:@"localPb"] isEqualToString: @"YES"])
     {
         [o_t8_fld_local setStringValue: _NS("yes")];
@@ -1356,7 +1304,7 @@ static VLCWizard *_o_sharedInstance = nil;
     if ([[o_userSelections objectForKey:@"partExtract"] isEqualToString: @"YES"])
     {
         [o_t8_fld_partExtract setStringValue: [NSString stringWithFormat:
-            _NS("yes: from %@ to %@ secs"),
+            _NS("yes: from %@ to %@"),
             [o_userSelections objectForKey:@"partExtractFrom"],
             [o_userSelections objectForKey:@"partExtractTo"]]];
     } else {
@@ -1367,26 +1315,24 @@ static VLCWizard *_o_sharedInstance = nil;
     {
         [o_t8_fld_trnscdVideo setStringValue: [NSString stringWithFormat:
             _NS("yes: %@ @ %@ kb/s"),
-            [[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:
-            @"trnscdVideoCodec"] intValue]] objectAtIndex:0],
+            o_videoCodecs[[[o_userSelections objectForKey:@"trnscdVideoCodec"] intValue]][0],
             [o_userSelections objectForKey:@"trnscdVideoBitrate"]]];
     }
     else
     {
         [o_t8_fld_trnscdVideo setStringValue: _NS("no")];
     }
+
     if ([[o_userSelections objectForKey:@"soverlay"] isEqualToString:@"1"])
         [o_t8_fld_soverlay setStringValue: _NS("yes")];
     else
         [o_t8_fld_soverlay setStringValue: _NS("no")];
+
     if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
     {
         [o_t8_fld_trnscdAudio setStringValue: [NSString stringWithFormat:
             _NS("yes: %@ @ %@ kb/s"),
-            [[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:
-                @"trnscdAudioCodec"] intValue]] objectAtIndex:0],
+            o_audioCodecs[[[o_userSelections objectForKey:@"trnscdAudioCodec"] intValue]][0],
             [o_userSelections objectForKey:@"trnscdAudioBitrate"]]];
     }
     else
@@ -1398,9 +1344,7 @@ static VLCWizard *_o_sharedInstance = nil;
     {
         /* we are streaming and perhaps also transcoding */
         [o_t8_fld_saveFileTo setStringValue: @"-"];
-        [o_t8_fld_strmgMthd setStringValue: [[o_strmgMthds objectAtIndex:
-            [[o_userSelections objectForKey:@"stmgMhd"] intValue]]
-            objectAtIndex:1]];
+        [o_t8_fld_strmgMthd setStringValue: o_strmgMthds[[[o_userSelections objectForKey:@"stmgMhd"] intValue]][1]];
         [o_t8_fld_destination setStringValue: [o_userSelections objectForKey:
             @"stmgDest"]];
         [o_t8_fld_ttl setStringValue: [o_userSelections objectForKey:@"ttl"]];
@@ -1419,21 +1363,21 @@ static VLCWizard *_o_sharedInstance = nil;
         [o_t8_fld_ttl setStringValue: @"-"];
         [o_t8_fld_sap setStringValue: @"-"];
         /* do only show the destination of the first item and add a counter, if needed */
-        if( [[o_userSelections objectForKey: @"trnscdFilePath"] count] > 1 )
+        if ([[o_userSelections objectForKey: @"trnscdFilePath"] count] > 1)
             [o_t8_fld_saveFileTo setStringValue:
-                [NSString stringWithFormat: @"%@ (+%i)",
-                [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0],
+                [NSString stringWithFormat: @"%@ (+%li)",
+                [o_userSelections objectForKey: @"trnscdFilePath"][0],
                 ([[o_userSelections objectForKey: @"trnscdFilePath"] count] - 1)]];
         else
             [o_t8_fld_saveFileTo setStringValue:
-                [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex:0]];
+                [o_userSelections objectForKey: @"trnscdFilePath"][0]];
     }
-    [o_t8_fld_encapFormat setStringValue: [[o_encapFormats objectAtIndex:
-        [[o_userSelections objectForKey:@"encapFormat"] intValue]] objectAtIndex:1]];
+    [o_t8_fld_encapFormat setStringValue: o_encapFormats[
+        [[o_userSelections objectForKey:@"encapFormat"] intValue]][1]];
 
     [self createOpts];
-    [o_t8_fld_mrl setStringValue: [[o_userSelections objectForKey:@"opts"]
-        objectAtIndex: 0]];
+    [o_t8_fld_mrl setStringValue: [o_userSelections objectForKey:@"opts"]
+       [0]];
 
     [o_tab_pageHolder selectTabViewItemAtIndex:7];
 }
@@ -1446,17 +1390,17 @@ static VLCWizard *_o_sharedInstance = nil;
     int x = 0;
     int y = [[o_userSelections objectForKey:@"pathToStrm"] count];
     NSMutableArray * tempArray = [[NSMutableArray alloc] init];
+
     /* loop to create an opt-string for each item we're processing */
-    while( x != y )
+    while( x != y)
     {
         /* check whether we transcode the audio and/or the video and compose a
          * string reflecting the settings, if needed */
         if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"YES"])
         {
             [o_trnscdCmd appendString: @"transcode{"];
-            [o_trnscdCmd appendFormat: @"vcodec=%@,vb=%i", 
-                [[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:@"trnscdVideoCodec"] intValue]] objectAtIndex:1],
+            [o_trnscdCmd appendFormat: @"vcodec=%@,vb=%i",
+                o_videoCodecs[[[o_userSelections objectForKey:@"trnscdVideoCodec"] intValue]][1],
                 [[o_userSelections objectForKey:@"trnscdVideoBitrate"] intValue]];
             if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
             {
@@ -1467,14 +1411,14 @@ static VLCWizard *_o_sharedInstance = nil;
                 [o_trnscdCmd appendString: @"}:"];
             }
         }
+
         /* check whether the user requested local playback. if yes, prepare the
          * string, if not, let it empty */
         if ([[o_userSelections objectForKey:@"localPb"] isEqualToString:@"YES"])
         {
             [o_duplicateCmd appendString: @"duplicate{dst=display,dst=\""];
         }
+
         if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
         {
             if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualToString:@"NO"])
@@ -1482,20 +1426,20 @@ static VLCWizard *_o_sharedInstance = nil;
                 /* in case we transcode the audio only, add this */
                 [o_trnscdCmd appendString: @"transcode{"];
             }
-            [o_trnscdCmd appendFormat: @"acodec=%@,ab=%i}:", 
-                [[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:@"trnscdAudioCodec"] intValue]] objectAtIndex:1],
+            [o_trnscdCmd appendFormat: @"acodec=%@,ab=%i}:",
+                o_audioCodecs[[[o_userSelections objectForKey:@"trnscdAudioCodec"] intValue]][1],
                 [[o_userSelections objectForKey:@"trnscdAudioBitrate"] intValue]];
         }
+
         if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"trnscd"])
         {
             /* we are just transcoding and dumping the stuff to a file */
             [o_opts_string appendFormat:
-                @":sout=#%@%@standard{mux=%@,dst=%@,access=file}", 
+                @":sout=#%@%@standard{mux=%@,access=file{no-overwrite},dst=%@}",
                 o_duplicateCmd,
-                o_trnscdCmd, 
-                [[o_encapFormats objectAtIndex: [[o_userSelections objectForKey:@"encapFormat"] intValue]] objectAtIndex:0],
-                [[o_userSelections objectForKey: @"trnscdFilePath"] objectAtIndex: x]];
+                o_trnscdCmd,
+                o_encapFormats[[[o_userSelections objectForKey:@"encapFormat"] intValue]][0],
+                [o_userSelections objectForKey: @"trnscdFilePath"][x]];
         }
         else
         {
@@ -1514,13 +1458,13 @@ static VLCWizard *_o_sharedInstance = nil;
                     [o_sap_option appendFormat: @"sap,name=\"%@\"",
                         [o_userSelections objectForKey:@"sapText"]];
                 }
-                if( [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] == @"rtp" )
+                if ([o_strmgMthds[[[o_userSelections objectForKey: @"stmgMhd"] intValue]][0] isEqualToString:@"rtp"])
                 {
                     /* RTP is no access out, but a stream out module */
                     [o_opts_string appendFormat:
                                              @":sout=#%@%@rtp{mux=%@,dst=%@,%@}",
                         o_duplicateCmd, o_trnscdCmd,
-                        [[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0], 
+                        o_encapFormats[[[o_userSelections objectForKey: @"encapFormat"] intValue]][0],
                         [o_userSelections objectForKey: @"stmgDest"],
                         o_sap_option];
                 }
@@ -1529,23 +1473,23 @@ static VLCWizard *_o_sharedInstance = nil;
                     [o_opts_string appendFormat:
                                              @":sout=#%@%@standard{mux=%@,dst=%@,access=%@,%@}",
                         o_duplicateCmd, o_trnscdCmd,
-                        [[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0], 
+                        o_encapFormats[[[o_userSelections objectForKey: @"encapFormat"] intValue]][0],
                         [o_userSelections objectForKey: @"stmgDest"],
-                        [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0], 
+                        o_strmgMthds[[[o_userSelections objectForKey: @"stmgMhd"] intValue]][0],
                         o_sap_option];
                 }
             }
             else
             {
                 /* no SAP, just streaming */
-                if( [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0] == @"rtp" )
+                if ([o_strmgMthds[[[o_userSelections objectForKey: @"stmgMhd"] intValue]][0] isEqualToString:@"rtp"])
                 {
                     /* RTP is different from the other protocols, as it isn't provided through an access out module anymore */
                     [o_opts_string appendFormat:
                                              @":sout=#%@%@rtp{mux=%@,dst=%@}",
                         o_duplicateCmd,
                         o_trnscdCmd,
-                        [[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0], 
+                        o_encapFormats[[[o_userSelections objectForKey: @"encapFormat"] intValue]][0],
                         [o_userSelections objectForKey: @"stmgDest"]];
                 }
                 else
@@ -1555,9 +1499,9 @@ static VLCWizard *_o_sharedInstance = nil;
                                              @":sout=#%@%@standard{mux=%@,dst=%@,access=%@}",
                         o_duplicateCmd,
                         o_trnscdCmd,
-                        [[o_encapFormats objectAtIndex: [[o_userSelections objectForKey: @"encapFormat"] intValue]] objectAtIndex:0], 
+                        o_encapFormats[[[o_userSelections objectForKey: @"encapFormat"] intValue]][0],
                         [o_userSelections objectForKey: @"stmgDest"],
-                        [[o_strmgMthds objectAtIndex: [[o_userSelections objectForKey: @"stmgMhd"] intValue]] objectAtIndex:0]];
+                        o_strmgMthds[[[o_userSelections objectForKey: @"stmgMhd"] intValue]][0]];
                 }
             }
         }
@@ -1568,7 +1512,7 @@ static VLCWizard *_o_sharedInstance = nil;
         {
             [o_opts_string appendString: @"\"}"];
         }
+
         /* add subtitles to the video if desired */
         if ([[o_userSelections objectForKey:@"soverlay"] intValue] > 0)
             [o_opts_string appendString: @" --sout-transcode-soverlay"];
@@ -1586,7 +1530,9 @@ static VLCWizard *_o_sharedInstance = nil;
 
 - (IBAction)prevTab:(id)sender
 {
-    if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Summary"])
+    NSString * selectedTabViewItemLabel = [[o_tab_pageHolder selectedTabViewItem] label];
+
+    if ([selectedTabViewItemLabel isEqualToString: @"Summary"])
     {
         /* check whether we are streaming or transcoding and go back */
         if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"strmg"])
@@ -1600,32 +1546,27 @@ static VLCWizard *_o_sharedInstance = nil;
         /* rename the forward-button */
         [o_btn_forward setTitle: _NS("Next")];
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Transcode 2"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Transcode 2"])
     {
         /* show "Encap" */
         [o_tab_pageHolder selectTabViewItemAtIndex:4];
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Streaming 2"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Streaming 2"])
     {
         /* show "Encap" */
         [o_tab_pageHolder selectTabViewItemAtIndex:4];
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Encap"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Encap"])
     {
         /* show "Transcode 1" */
         [o_tab_pageHolder selectTabViewItemAtIndex:3];
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Streaming 1"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Streaming 1"])
     {
         /* show "Input" */
         [o_tab_pageHolder selectTabViewItemAtIndex:1];
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Transcode 1"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Transcode 1"])
     {
         if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"strmg"])
         {
@@ -1636,8 +1577,7 @@ static VLCWizard *_o_sharedInstance = nil;
             [o_tab_pageHolder selectTabViewItemAtIndex:1];
         }
     }
-    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:
-        @"Input"])
+    else if ([selectedTabViewItemLabel isEqualToString: @"Input"])
     {
         /* reset the wizard before going backwards. Otherwise, we might get
          * unwanted behaviour in the Encap-Selection */
@@ -1653,7 +1593,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Stream to network"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("This allows streaming on a network."));
 }
 
@@ -1661,7 +1601,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Transcode/Save to file"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("This allows saving a stream to a file. The "
         "can be reencoded on the fly. Whatever "
         "VLC can read can be saved.\nPlease note that VLC is not very suited "
@@ -1673,18 +1613,10 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     NSOpenPanel * openPanel = [NSOpenPanel openPanel];
     SEL sel = @selector(t2_getNewStreamFromDialog:returnCode:contextInfo:);
-    [openPanel beginSheetForDirectory:nil file:nil types:nil modalForWindow:
-        o_wizard_window modalDelegate:self didEndSelector:sel contextInfo:nil];
-}
-
-- (void)t2_getNewStreamFromDialog: (NSOpenPanel *)sheet 
-                       returnCode: (int)returnCode
-                      contextInfo: (void *)contextInfo
-{
-    if (returnCode == NSOKButton)
-    {
-        [o_t2_fld_pathToNewStrm setStringValue: [[sheet URL] absoluteString]];
-    }
+    [openPanel beginSheetModalForWindow: o_wizard_window completionHandler: ^(NSInteger returnCode) {
+        if (returnCode == NSOKButton)
+            [o_t2_fld_pathToNewStrm setStringValue: [[openPanel URL] absoluteString]];
+    }];
 }
 
 - (IBAction)t2_chooseStreamOrPlst:(id)sender
@@ -1693,7 +1625,7 @@ static VLCWizard *_o_sharedInstance = nil;
     NSString *o_mode;
     o_mode = [[o_t2_matrix_inputSourceType selectedCell] title];
 
-    if( [o_mode isEqualToString: _NS("Select a stream")] )
+    if ([o_mode isEqualToString: _NS("Select a stream")])
     {
         [o_t2_btn_chooseFile setEnabled:YES];
         [o_t2_fld_pathToNewStrm setEnabled:YES];
@@ -1726,61 +1658,49 @@ static VLCWizard *_o_sharedInstance = nil;
      * streaming method */
     int mode;
     mode = [[o_t3_matrix_stmgMhd selectedCell] tag];
-    if( mode == 0 )
+    if (mode == 0)
     {
         /* HTTP */
-        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:0]
-            objectAtIndex:2]];
-        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:0]
-            objectAtIndex:3]];
+        [o_t3_txt_destInfo setStringValue: o_strmgMthds[0][2]];
+        [o_t3_txt_strgMthdInfo setStringValue: o_strmgMthds[0][3]];
     }
-    else if( mode == 1 )
+    else if (mode == 1)
     {
         /* MMS */
-        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:1]
-            objectAtIndex:2]];
-        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:1]
-            objectAtIndex:3]];
+        [o_t3_txt_destInfo setStringValue: o_strmgMthds[1][2]];
+        [o_t3_txt_strgMthdInfo setStringValue: o_strmgMthds[1][3]];
     }
-    else if( mode == 2 )
+    else if (mode == 2)
     {
         /* UDP-Unicast */
-        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:2]
-            objectAtIndex:2]];
-        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:2]
-        objectAtIndex:3]];
+        [o_t3_txt_destInfo setStringValue: o_strmgMthds[2][2]];
+        [o_t3_txt_strgMthdInfo setStringValue: o_strmgMthds[2][3]];
     }
-    else if( mode == 3 )
+    else if (mode == 3)
     {
         /* UDP-Multicast */
-        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:3]
-            objectAtIndex:2]];
-        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:3]
-        objectAtIndex:3]];
+        [o_t3_txt_destInfo setStringValue: o_strmgMthds[3][2]];
+        [o_t3_txt_strgMthdInfo setStringValue: o_strmgMthds[3][3]];
     }
-    else if( mode == 4 )
+    else if (mode == 4)
     {
         /* RTP-Unicast */
-        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:4]
-            objectAtIndex:2]];
-        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:4]
-            objectAtIndex:3]];
+        [o_t3_txt_destInfo setStringValue: o_strmgMthds[4][2]];
+        [o_t3_txt_strgMthdInfo setStringValue: o_strmgMthds[4][3]];
     }
-    else if( mode == 5 )
+    else if (mode == 5)
     {
         /* RTP-Multicast */
-        [o_t3_txt_destInfo setStringValue: [[o_strmgMthds objectAtIndex:5]
-            objectAtIndex:2]];
-        [o_t3_txt_strgMthdInfo setStringValue: [[o_strmgMthds objectAtIndex:5]
-        objectAtIndex:3]];
+        [o_t3_txt_destInfo setStringValue: o_strmgMthds[5][2]];
+        [o_t3_txt_strgMthdInfo setStringValue: o_strmgMthds[5][3]];
     }
 }
 
 - (IBAction)t4_AudCdcChanged:(id)sender
 {
     /* update codec info */
-    [o_t4_txt_hintAudio setStringValue:[[o_audioCodecs objectAtIndex:
-        [[o_t4_pop_audioCodec selectedItem]tag]] objectAtIndex:2]];
+    [o_t4_txt_hintAudio setStringValue:o_audioCodecs[
+        [[o_t4_pop_audioCodec selectedItem]tag]][2]];
 }
 
 - (IBAction)t4_enblAudTrnscd:(id)sender
@@ -1821,8 +1741,8 @@ static VLCWizard *_o_sharedInstance = nil;
 - (IBAction)t4_VidCdcChanged:(id)sender
 {
     /* update codec info */
-    [o_t4_txt_hintVideo setStringValue:[[o_videoCodecs objectAtIndex:
-        [[o_t4_pop_videoCodec selectedItem]tag]] objectAtIndex:2]];
+    [o_t4_txt_hintVideo setStringValue:o_videoCodecs[
+        [[o_t4_pop_videoCodec selectedItem]tag]][2]];
 }
 
 - (IBAction)t6_enblSapAnnce:(id)sender
@@ -1841,7 +1761,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Time-To-Live (TTL)"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("This allows defining the TTL (Time-To-Live) of the stream. "
             "This parameter is the maximum number of routers your stream can "
             "go through. If you don't know what it means, or if you want to "
@@ -1851,8 +1771,8 @@ static VLCWizard *_o_sharedInstance = nil;
 - (IBAction)t6_mrInfo_sap:(id)sender
 {
     /* show a sheet for the help */
-    NSBeginInformationalAlertSheet(_NS("SAP Announce"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+    NSBeginInformationalAlertSheet(_NS("SAP Announcement"),
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("When streaming using UDP, the streams can be "
         "announced using the SAP/SDP announcing protocol. This "
         "way, the clients won't have to type in the multicast address, it "
@@ -1865,7 +1785,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Local playback"),
-            _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+            _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
             _NS("When this option is enabled, the stream will be both played "
             "and transcoded/streamed.\n\nNote that this requires much more "
             "CPU power than simple transcoding or streaming."));
@@ -1877,18 +1797,19 @@ static VLCWizard *_o_sharedInstance = nil;
      * his/her new file. We take a modified NSOpenPanel to select a folder
      * and a plain NSSavePanel to save a single file. */
 
-    SEL sel = @selector(t7_getTrnscdDestFile:returnCode:contextInfo:);
-    if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
+    if ([[o_userSelections objectForKey:@"pathToStrm"] count] > 1)
     {
         NSOpenPanel * saveFolderPanel = [[NSOpenPanel alloc] init];
+
         [saveFolderPanel setCanChooseDirectories: YES];
         [saveFolderPanel setCanChooseFiles: NO];
         [saveFolderPanel setCanSelectHiddenExtension: NO];
         [saveFolderPanel setCanCreateDirectories: YES];
-        [saveFolderPanel beginSheetForDirectory:nil file:nil modalForWindow:
-        o_wizard_window modalDelegate:self didEndSelector:sel contextInfo:nil];
+        [saveFolderPanel beginSheetModalForWindow: o_wizard_window completionHandler:^(NSInteger returnCode) {
+            if (returnCode == NSOKButton)
+                [o_t7_fld_filePath setStringValue: [NSString stringWithFormat: @"%@/", [[saveFolderPanel URL] path]]];
+        }];
+        [saveFolderPanel release];
     }
     else
     {
@@ -1897,35 +1818,21 @@ static VLCWizard *_o_sharedInstance = nil;
         /* don't use ".ps" as suffix, since the OSX Finder confuses our
          * creations with PostScript-files and wants to open them with
          * Preview.app */
-        NSString * theEncapFormat = [[o_encapFormats objectAtIndex:
-        [[o_userSelections objectForKey:@"encapFormat"] intValue]]
-        objectAtIndex:0];
-        if( theEncapFormat != @"ps" )
-            [saveFilePanel setAllowedFileTypes: [NSArray arrayWithObject:theEncapFormat]];
+        NSString * theEncapFormat = o_encapFormats[
+        [[o_userSelections objectForKey:@"encapFormat"] intValue]][0];
+        if (![theEncapFormat isEqualToString:@"ps"])
+            [saveFilePanel setAllowedFileTypes: @[theEncapFormat]];
         else
-            [saveFilePanel setAllowedFileTypes: [NSArray arrayWithObject:@"mpg"]];
+            [saveFilePanel setAllowedFileTypes: @[@"mpg"]];
 
         [saveFilePanel setCanSelectHiddenExtension: YES];
         [saveFilePanel setCanCreateDirectories: YES];
-        [saveFilePanel beginSheetForDirectory:nil file:nil modalForWindow:
-        o_wizard_window modalDelegate:self didEndSelector:sel contextInfo:nil];
-    }
-}
-
-- (void)t7_getTrnscdDestFile: (NSOpenPanel *)sheet returnCode:
-    (int)returnCode contextInfo: (void *)contextInfo
-{
-    if (returnCode == NSOKButton)
-    {
-        /* output returned path to text-field, add a / to the end if the user
-         * selected a folder */
-        if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )
-            [o_t7_fld_filePath setStringValue: [NSString stringWithFormat:
-                @"%@/", [[sheet URL] path]]];
-        else
-            [o_t7_fld_filePath setStringValue:[[sheet URL] path]];
+        [saveFilePanel beginSheetModalForWindow: o_wizard_window completionHandler:^(NSInteger returnCode) {
+            if (returnCode == NSOKButton)
+                [o_t7_fld_filePath setStringValue:[[saveFilePanel URL] path]];
+        }];
+        [saveFilePanel release];
     }
-    [sheet release];
 }
 
 @end