]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/intf.m
* Remove the old info window from SVN.
[vlc] / modules / gui / macosx / intf.m
index ba8542d1bcac1dc60cd5c09dd062543132cb1d87..4a692321acbb8eb3bd4cc051403cc5ac431d100e 100644 (file)
@@ -35,7 +35,6 @@
 #include "vout.h"
 #include "prefs.h"
 #include "playlist.h"
-#include "info.h"
 #include "controls.h"
 
 /*****************************************************************************
@@ -59,7 +58,7 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
     memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
     
     p_intf->p_sys->o_pool = [[NSAutoreleasePool alloc] init];
-    
+
     /* Put Cocoa into multithread mode as soon as possible.
      * http://developer.apple.com/techpubs/macosx/Cocoa/
      * TasksAndConcepts/ProgrammingTopics/Multithreading/index.html
@@ -71,10 +70,9 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
     p_intf->b_play = VLC_TRUE;
     p_intf->pf_run = Run;
     
-    [[VLCApplication sharedApplication] autorelease];
+    [VLCApplication sharedApplication];
     [NSApp setIntf: p_intf];
 
-
     [NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
 
     return( 0 );
@@ -211,6 +209,7 @@ static void Run( intf_thread_t *p_intf )
 - (void)terminate:(id)sender
 {
     p_intf->p_vlc->b_die = VLC_TRUE;
+    [super terminate:sender];
 }
 
 
@@ -487,19 +486,18 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
     [self setSubmenusEnabled: FALSE];
     [self manageVolumeSlider];
     
-    /* Check if we need to start playing */
-    if( p_intf->b_play )
-    {
-        p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+    p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
 
-        if( p_playlist )
+    if( p_playlist )
+    {
+        /* Check if we need to start playing */
+        if( p_intf->b_play )
         {
             playlist_Play( p_playlist );
-            vlc_object_release( p_playlist );
         }
+        [o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool )];
+        vlc_object_release( p_playlist );
     }
-    
-    [o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool )];
 }
 
 - (void)initStrings
@@ -527,6 +525,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
     [o_mi_prefs setTitle: _NS("Preferences...")];
     [o_mi_add_intf setTitle: _NS("Add Interface")];
     [o_mu_add_intf setTitle: _NS("Add Interface")];
+    [o_mi_services setTitle: _NS("Services")];
     [o_mi_hide setTitle: _NS("Hide VLC")];
     [o_mi_hide_others setTitle: _NS("Hide Others")];
     [o_mi_show_all setTitle: _NS("Show All")];
@@ -688,6 +687,15 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
     return nil;
 }
 
+- (id)getInfo
+{
+    if ( o_info )
+    {
+        return o_info;
+    }
+    return  nil;
+}
+
 - (void)manage
 {
     NSDate * o_sleep_date;
@@ -812,7 +820,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
             vlc_object_release( (vlc_object_t *)p_vout );
         }
         [o_playlist updateRowSelection];
-        [o_info updateInfo];
+//        [o_info updateInfo];
 
         p_intf->p_sys->b_current_title_update = FALSE;
     }
@@ -1253,6 +1261,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
         o_msg_lock = nil;
     }
 
+    [NSApp terminate: nil];
     [NSApp stop: nil];
 
     /* write cached user defaults to disk */