]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/intf.m
macosx: Set nib deplyment target to 10.4, and don't use toolbar from nib as this...
[vlc] / modules / gui / macosx / intf.m
index 8e9ca2df37b5a87fe2d5c43e82bf916e11e7ef6c..51292a47ab0607b9be20c0ea5c73894ec3b65d31 100644 (file)
@@ -392,6 +392,15 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_msgs_panel setExcludedFromWindowsMenu: YES];
     [o_msgs_panel setDelegate: self];
 
+    /* In code and not in Nib for 10.4 compat */
+    NSToolbar * toolbar = [[[NSToolbar alloc] initWithIdentifier:@"mainControllerToolbar"] autorelease];
+    [toolbar setDelegate:self];
+    [toolbar setShowsBaselineSeparator:NO];
+    [toolbar setAllowsUserCustomization:NO];
+    [toolbar setDisplayMode:NSToolbarDisplayModeIconOnly];
+    [toolbar setAutosavesConfiguration:YES];
+    [o_window setToolbar:toolbar];
+
     i_key = config_GetInt( p_intf, "key-quit" );
     [o_mi_quit setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
     [o_mi_quit setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
@@ -621,7 +630,7 @@ static NSString * VLCToolbarMediaControl     = @"VLCToolbarMediaControl";
 
 - (void)initStrings
 {
-    [o_window setTitle: _NS("VLC")];
+    [o_window setTitle: _NS("VLC media player")];
     [self setScrollField:_NS("VLC media player") stopAfter:-1];
 
     /* button controls */
@@ -1221,6 +1230,7 @@ static NSString * VLCToolbarMediaControl     = @"VLCToolbarMediaControl";
     pl_Release( p_intf );
 
     vlc_object_lock( p_intf );
+
     while( vlc_object_alive( p_intf ) )
     {
         vlc_mutex_lock( &p_intf->change_lock );
@@ -1245,6 +1255,10 @@ static NSString * VLCToolbarMediaControl     = @"VLCToolbarMediaControl";
             vlc_object_release( p_input );
             p_input = NULL;
         }
+        else if( cachedInputState != input_GetState( p_input ) )
+        {
+            p_intf->p_sys->b_intf_update = true;
+        }
 
         /* Manage volume status */
         [self manageVolumeSlider];
@@ -1304,10 +1318,10 @@ static NSString * VLCToolbarMediaControl     = @"VLCToolbarMediaControl";
         if( ( b_input = ( p_input != NULL ) ) )
         {
             /* seekable streams */
-            int state = input_GetState( p_input );
-            if ( state == INIT_S ||
-                 state == OPENING_S ||
-                 state == BUFFERING_S )
+            cachedInputState = input_GetState( p_input );
+            if ( cachedInputState == INIT_S ||
+                 cachedInputState == OPENING_S ||
+                 cachedInputState == BUFFERING_S )
             {
                 b_buffering = YES;
             }
@@ -2184,8 +2198,8 @@ end:
 
 - (void)notifyCrashLogToUser:(NSString *)crashLogPath
 {
-    int ret = NSRunInformationalAlertPanel(_NS("VLC has previously crashed"),
-                _NS("VLC has previously crashed, do you want to send an email with the crash to VLC's team?"),
+    int ret = NSRunInformationalAlertPanel(_NS("VLC crashed previously"),
+                _NS("VLC crashed previously. Do you want to send an email with details on the crash to VLC's development team?"),
                 _NS("Send"), _NS("Don't Send"), nil, nil);
     if( ret == NSAlertDefaultReturn )
     {
@@ -2365,7 +2379,7 @@ end:
 
 - (void)windowDidResize:(NSNotification *)notif
 {
-    if( [o_window frame].size.height > 200 && b_small_window )
+    if( [o_window contentRectForFrameRect:[o_window frame]].size.height > 169. && b_small_window )
     {
         /* If large and coming from small then show */
         [o_playlist_view setAutoresizesSubviews: YES];