]> git.sesse.net Git - vlc/commitdiff
* playlist.m: fixed some "makes integer from pointer without a cast" warnings and...
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 9 Aug 2005 17:34:37 +0000 (17:34 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 9 Aug 2005 17:34:37 +0000 (17:34 +0000)
* wizard.m: run "resetWizard" when returning to the first page. Otherwise the encap-tab might not work properly (when switching from Streaming to Transcoding after having passed the streaming-method-tab)

modules/gui/macosx/playlist.m
modules/gui/macosx/wizard.m

index 1b74cceb49530de53e7276bb7144359aa278d17a..cc2cae683a3cb002660a97392268d54b9d5180f0 100644 (file)
@@ -990,9 +990,9 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
             NSMutableString *o_temp, *o_temp2;
             o_temp = [NSMutableString stringWithString: o_uri];
             o_temp2 = [NSMutableString stringWithCString: mounts[i_index].f_mntfromname];
-            [o_temp replaceOccurrencesOfString: @"/dev/rdisk" withString: @"/dev/disk" options:NULL range:NSMakeRange(0, [o_temp length]) ];
-            [o_temp2 replaceOccurrencesOfString: @"s0" withString: @"" options:NULL range:NSMakeRange(0, [o_temp2 length]) ];
-            [o_temp2 replaceOccurrencesOfString: @"s1" withString: @"" options:NULL range:NSMakeRange(0, [o_temp2 length]) ];
+            [o_temp replaceOccurrencesOfString: @"/dev/rdisk" withString: @"/dev/disk" options:nil range:NSMakeRange(0, [o_temp length]) ];
+            [o_temp2 replaceOccurrencesOfString: @"s0" withString: @"" options:nil range:NSMakeRange(0, [o_temp2 length]) ];
+            [o_temp2 replaceOccurrencesOfString: @"s1" withString: @"" options:nil range:NSMakeRange(0, [o_temp2 length]) ];
 
             if( strstr( [o_temp fileSystemRepresentation], [o_temp2 fileSystemRepresentation] ) != NULL )
             {
@@ -1017,9 +1017,9 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
         statfs( [o_uri fileSystemRepresentation], buf );
         psz_dev = strdup(buf->f_mntfromname);
         o_temp = [NSMutableString stringWithCString: psz_dev ];
-        [o_temp replaceOccurrencesOfString: @"/dev/disk" withString: @"/dev/rdisk" options:NULL range:NSMakeRange(0, [o_temp length]) ];
-        [o_temp replaceOccurrencesOfString: @"s0" withString: @"" options:NULL range:NSMakeRange(0, [o_temp length]) ];
-        [o_temp replaceOccurrencesOfString: @"s1" withString: @"" options:NULL range:NSMakeRange(0, [o_temp length]) ];
+        [o_temp replaceOccurrencesOfString: @"/dev/disk" withString: @"/dev/rdisk" options:nil range:NSMakeRange(0, [o_temp length]) ];
+        [o_temp replaceOccurrencesOfString: @"s0" withString: @"" options:nil range:NSMakeRange(0, [o_temp length]) ];
+        [o_temp replaceOccurrencesOfString: @"s1" withString: @"" options:nil range:NSMakeRange(0, [o_temp length]) ];
         o_uri = o_temp;
     }
 
@@ -1482,7 +1482,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
 /* Required for drag & drop and reordering */
 - (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
 {
-    unsigned int i,j;
+    unsigned int i;
     playlist_t *p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
                                                FIND_ANYWHERE );
 
@@ -1518,6 +1518,8 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     [self removeItemsFrom: o_items_array ifChildrenOf: o_nodes_array];
 
 #if 0
+    unsigned int j;
+
     for( i = 0 ; i < [o_nodes_array count] ; i++ )
     {
         for ( j = 0 ; j < [o_nodes_array count] ; j++ )
index bbc674a2587084fcd76de6ac6a902097d1bea078..e5edf1b8f1461e77b4c0f77d31346593eedca711 100644 (file)
@@ -461,7 +461,7 @@ static VLCWizard *_o_sharedInstance = nil;
     ofItem: (NSString *)item
 {
     [self resetWizard];
-    msg_Dbg(VLCIntf, "wizard was resetted");
+    msg_Dbg(VLCIntf, "wizard was reseted");
     [o_userSelections setObject:@"trnscd" forKey:@"trnscdOrStrmg"];
     [o_btn_backward setEnabled:YES];
     [o_tab_pageHolder selectTabViewItemAtIndex:1];
@@ -1379,6 +1379,9 @@ static VLCWizard *_o_sharedInstance = nil;
     else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: \
         @"Input"])
     {
+        /* reset the wizard before going backwards. Otherwise, we might get
+         * unwanted behaviours in the Encap-Selection */
+        [self resetWizard];
         /* show "Hello" */
         [o_tab_pageHolder selectTabViewItemAtIndex:0];
         /* disable backwards-btn */