]> git.sesse.net Git - vlc/commitdiff
* Fix title display above the scrollbar
authorBenjamin Pracht <bigben@videolan.org>
Fri, 24 Dec 2004 11:50:03 +0000 (11:50 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Fri, 24 Dec 2004 11:50:03 +0000 (11:50 +0000)
* Fix the shuffle checkbox
* Expand playlist to the currently playing item and select it

extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/intf.m
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.m

index bf4d14e970958d4f52298291e4a14990d1572458..71c8ea783ae8aee6a3dc95e3e27ccf03b4187659 100644 (file)
@@ -3,15 +3,15 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>25 92 505 517 0 0 1280 938 </string>
+       <string>470 105 505 517 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1617</key>
                <string>542 480 104 149 0 0 1024 746 </string>
                <key>2197</key>
-               <string>237 313 596 367 0 0 1024 746 </string>
+               <string>91 300 596 367 0 0 1024 746 </string>
                <key>29</key>
-               <string>326 879 419 44 0 0 1280 938 </string>
+               <string>229 690 419 44 0 0 1024 746 </string>
                <key>915</key>
                <string>731 416 165 180 0 0 1024 746 </string>
        </dict>
@@ -27,7 +27,6 @@
        <key>IBOpenObjects</key>
        <array>
                <integer>21</integer>
-               <integer>29</integer>
        </array>
        <key>IBSystem Version</key>
        <string>7S215</string>
index 2616b76788eac7069bb8ea39b39630c5589672ac..79db8569e17ee6fd35eb7818e9d6d90f50f7dbe2 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 5a45a806b046b4141790346e23c7ca2b04d9ef97..853cac625a2a310b735018b0fbb4d071c35b071e 100644 (file)
@@ -883,14 +883,12 @@ static VLCMain *_o_sharedMainInstance = nil;
             {
                 return;
             }
-#if 0
             o_temp = [NSString stringWithUTF8String:
-                p_playlist->p_input.psz_name];
+                p_playlist->status.p_item->input.psz_name];
             if( o_temp == NULL )
                 o_temp = [NSString stringWithCString:
-                    p_playlist->p_input.psz_name];
+                    p_playlist->status.p_item->input.psz_name];
             [o_scrollfield setStringValue: o_temp ];
-#endif
 
             p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
                                                     FIND_ANYWHERE );
@@ -908,7 +906,7 @@ static VLCMain *_o_sharedMainInstance = nil;
                 }
                 vlc_object_release( (vlc_object_t *)p_vout );
             }
-            //[o_playlist updateRowSelection];
+            [o_playlist updateRowSelection];
             vlc_object_release( p_playlist );
             p_intf->p_sys->b_current_title_update = FALSE;
         }
index 0f56d6edc81e8f59aad60e8b6b2bb20e4872769c..e771893b3da98b50758ed5391326fda220bf9b3b 100644 (file)
@@ -76,6 +76,7 @@
 - (void)updateTogglePlaylistState;
 - (void)playlistUpdated;
 - (void)sortNode:(int)i_mode;
+- (void)updateRowSelection;
 
 - (IBAction)playItem:(id)sender;
 - (IBAction)deleteItem:(id)sender;
index 95a84a98e9cf33d8debdab6f09c078970cc4a28e..12f18d8244ef1485377b4a3710b8abe3173a1993 100644 (file)
@@ -259,6 +259,51 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     }
 }
 
+- (void)updateRowSelection
+{
+    playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
+                                          FIND_ANYWHERE );
+    playlist_item_t * p_item, * p_temp_item;
+    NSMutableArray * o_array = [NSMutableArray array];
+    int i,i_row;
+    unsigned int j;
+
+    if (p_playlist == NULL)
+        return;
+
+    p_item = p_playlist->status.p_item;
+    p_temp_item = p_item;
+
+    while (p_temp_item->i_parents > 0)
+    {
+        [o_array insertObject: [NSValue valueWithPointer: p_temp_item] atIndex: 0];
+        for (i = 0 ; i < p_temp_item->i_parents ; i++)
+        {
+            if (p_temp_item->pp_parents[i]->i_view == VIEW_SIMPLE)
+            {
+                p_temp_item = p_temp_item->pp_parents[i]->p_parent;
+                break;
+            }
+        }
+    }
+
+    for (j = 0 ; j < [o_array count] - 1 ; j++)
+    {
+        [o_outline_view expandItem: [o_outline_dict objectForKey:
+                            [NSString stringWithFormat: @"%p",
+                            [[o_array objectAtIndex:j] pointerValue]]]];
+
+    }
+
+    i_row = [o_outline_view rowForItem:[o_outline_dict
+            objectForKey:[NSString stringWithFormat: @"%p", p_item]]];
+
+    [o_outline_view selectRow: i_row byExtendingSelection: NO];
+    [o_outline_view scrollRowToVisible: i_row];
+
+    vlc_object_release(p_playlist);
+}
+
 - (bool)isItem:(playlist_item_t *)p_item inNode:(playlist_item_t *)p_node
 {
     playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,