]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlistinfo.m
* OSX lowlevel work
[vlc] / modules / gui / macosx / playlistinfo.m
index 86f0c038c6fb2ae8426028b2746189a7235acd65..04b6b210d81b676510eb5ae7050e67249adac517 100644 (file)
@@ -76,8 +76,8 @@
     }
     else
     {
-        i_item = [[[NSApp delegate] getPlaylist] selectedPlaylistItem];
-        o_selected = [[[NSApp delegate] getPlaylist] selectedPlaylistItemsList];
+        i_item = [[[VLCMain sharedInstance] getPlaylist] selectedPlaylistItem];
+        o_selected = [[[VLCMain sharedInstance] getPlaylist] selectedPlaylistItemsList];
         [o_selected retain];
         [self initPanel:sender];
     }
@@ -91,7 +91,7 @@
     }
     else
     {
-        intf_thread_t * p_intf = [NSApp getIntf];
+        intf_thread_t * p_intf = VLCIntf;
         playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
 
 
 - (void)initPanel:(id)sender
 {
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist;
 
     p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
 - (IBAction)infoOk:(id)sender
 {
     int i,i_row,c;
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
     vlc_value_t val;
 
 - (IBAction)handleGroup:(id)sender
 {
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
 
         if ([[o_group_cbx stringValue] isEqual:
                     [o_group_cbx objectValueOfSelectedItem]])
         {
-            [o_group_color setBackgroundColor:[[[NSApp delegate] getPlaylist]
+            [o_group_color setBackgroundColor:[[[VLCMain sharedInstance] getPlaylist]
                 getColor: p_playlist->pp_groups[
                 [o_group_cbx indexOfSelectedItem]]->i_id]];
         }
         else
         {
-            [o_group_color setBackgroundColor:[[[NSApp delegate] getPlaylist]
+            [o_group_color setBackgroundColor:[[[VLCMain sharedInstance] getPlaylist]
                 getColor:p_playlist->pp_groups[
                 [o_group_cbx numberOfItems] - 1]->i_id + 1]];
         }
 
 - (IBAction)deleteOutlineGroup:(id)sender
 {
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
 
         if ([[o_group_cbx stringValue] isEqual:
                     [o_group_cbx objectValueOfSelectedItem]])
         {
-            [[[NSApp delegate] getPlaylist] deleteGroup:p_playlist->pp_groups[
+            [[[VLCMain sharedInstance] getPlaylist] deleteGroup:p_playlist->pp_groups[
                     [o_group_cbx indexOfSelectedItem]]->i_id];
             [self createComboBox];
             [self handleGroup:self];
 
 - (IBAction)createOutlineGroup:(id)sender;
 {
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
     if(p_playlist)
                     strdup([[o_group_cbx stringValue] cString]));
         [self createComboBox];
         [o_group_cbx reloadData];
-        [[[NSApp delegate] getPlaylist] playlistUpdated];
+        [[[VLCMain sharedInstance] getPlaylist] playlistUpdated];
         vlc_object_release(p_playlist);
     }
 }
 
 -(void)createComboBox
 {
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
     int i;
 {
     BOOL bEnabled = TRUE;
 
-    intf_thread_t * p_intf = [NSApp getIntf];
+    intf_thread_t * p_intf = VLCIntf;
     input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
                                                        FIND_ANYWHERE );
 
@@ -387,7 +387,7 @@ static VLCInfoTreeItem *o_root_item = nil;
         o_value = [o_item_value copy];
         i_object_id = i_id;
         o_parent = o_parent_item;
-        i_item = [[[NSApp delegate] getInfo] getItem];
+        i_item = [[[VLCMain sharedInstance] getInfo] getItem];
     }
     return( self );
 }
@@ -410,7 +410,7 @@ static VLCInfoTreeItem *o_root_item = nil;
 {
     if (o_children == NULL)
     {
-        intf_thread_t * p_intf = [NSApp getIntf];
+        intf_thread_t * p_intf = VLCIntf;
         playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                           FIND_ANYWHERE );
         int i;
@@ -491,7 +491,7 @@ static VLCInfoTreeItem *o_root_item = nil;
 */
 - (void)refresh
 {
-    i_item = [[[NSApp delegate] getInfo] getItem];
+    i_item = [[[VLCMain sharedInstance] getInfo] getItem];
     if (o_children != NULL)
     {
         [o_children release];