Commit 3b0df15c authored by Christophe Massiot's avatar Christophe Massiot

MacOS X port :

* Fixed a segfault in the "Close Window" code,
* Fullscreen state is now retained between files,
* Preferences items now feature LONGTEXT tooltips (maybe we should wrap them ?).
parent 7c68013f
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This header provides portable declarations for mutexes & conditions * This header provides portable declarations for mutexes & conditions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN * Copyright (C) 1999, 2002 VideoLAN
* $Id: vlc_threads.h,v 1.19 2002/12/30 17:36:01 gbazin Exp $ * $Id: vlc_threads.h,v 1.20 2003/01/05 16:23:57 massiot Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
/* Thread priorities */ /* Thread priorities */
#ifdef SYS_DARWIN #ifdef SYS_DARWIN
# define VLC_THREAD_PRIORITY_LOW 31 # define VLC_THREAD_PRIORITY_LOW 31
# define VLC_THREAD_PRIORITY_INPUT 37 # define VLC_THREAD_PRIORITY_INPUT 35
# define VLC_THREAD_PRIORITY_AUDIO 38 # define VLC_THREAD_PRIORITY_AUDIO 36
# define VLC_THREAD_PRIORITY_VIDEO 31 # define VLC_THREAD_PRIORITY_VIDEO 31
# define VLC_THREAD_PRIORITY_OUTPUT 31 # define VLC_THREAD_PRIORITY_OUTPUT 31
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin * controls.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: controls.m,v 1.5 2003/01/04 04:11:08 jlj Exp $ * $Id: controls.m,v 1.6 2003/01/05 16:23:57 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
p_intf->p_sys->b_stopping = 1;
} }
- (IBAction)faster:(id)sender - (IBAction)faster:(id)sender
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin * intf.h: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: intf.h,v 1.10 2003/01/05 01:55:07 massiot Exp $ * $Id: intf.h,v 1.11 2003/01/05 16:23:57 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -58,6 +58,7 @@ struct intf_sys_t ...@@ -58,6 +58,7 @@ struct intf_sys_t
/* special actions */ /* special actions */
vlc_bool_t b_loop; vlc_bool_t b_loop;
vlc_bool_t b_playing; vlc_bool_t b_playing;
vlc_bool_t b_stopping;
vlc_bool_t b_mute; vlc_bool_t b_mute;
/* menus handlers */ /* menus handlers */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: intf.m,v 1.18 2003/01/05 01:55:07 massiot Exp $ * $Id: intf.m,v 1.19 2003/01/05 16:23:57 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -305,17 +305,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -305,17 +305,8 @@ static void Run( intf_thread_t *p_intf )
} }
else if( p_intf->p_sys->p_input->b_dead ) else if( p_intf->p_sys->p_input->b_dead )
{ {
vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
vlc_object_release( p_intf->p_sys->p_input ); vlc_object_release( p_intf->p_sys->p_input );
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
if ( p_vout != NULL )
{
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vout_Destroy( p_vout );
}
} }
if( p_intf->p_sys->p_input != NULL ) if( p_intf->p_sys->p_input != NULL )
...@@ -386,6 +377,20 @@ static void Run( intf_thread_t *p_intf ) ...@@ -386,6 +377,20 @@ static void Run( intf_thread_t *p_intf )
[self displayTime]; [self displayTime];
[self manageMode]; [self manageMode];
p_intf->p_sys->b_playing = 0; p_intf->p_sys->b_playing = 0;
if ( p_intf->p_sys->b_stopping )
{
vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if ( p_vout != NULL )
{
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vout_Destroy( p_vout );
}
p_intf->p_sys->b_stopping = 0;
}
} }
/* update the log window */ /* update the log window */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc * prefs.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: prefs.m,v 1.5 2002/12/30 23:45:21 massiot Exp $ * $Id: prefs.m,v 1.6 2003/01/05 16:23:57 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
[o_view addSubview: [o_text_field autorelease]]; \ [o_view addSubview: [o_text_field autorelease]]; \
} }
#define INPUT_FIELD( ctype, cname, label, w, msg, param ) \ #define INPUT_FIELD( ctype, cname, label, w, msg, param, tip ) \
{ \ { \
s_rc.size.height = 25; \ s_rc.size.height = 25; \
s_rc.size.width = w; \ s_rc.size.width = w; \
...@@ -256,6 +256,7 @@ ...@@ -256,6 +256,7 @@
[o_text_field setAlignment: NSRightTextAlignment]; \ [o_text_field setAlignment: NSRightTextAlignment]; \
CONTROL_CONFIG( o_text_field, o_module_name, ctype, cname ); \ CONTROL_CONFIG( o_text_field, o_module_name, ctype, cname ); \
[o_text_field msg: param]; \ [o_text_field msg: param]; \
[o_text_field setToolTip: [NSApp localizedString: tip]]; \
[o_view addSubview: [o_text_field autorelease]]; \ [o_view addSubview: [o_text_field autorelease]]; \
[[NSNotificationCenter defaultCenter] addObserver: self \ [[NSNotificationCenter defaultCenter] addObserver: self \
selector: @selector(configChanged:) \ selector: @selector(configChanged:) \
...@@ -266,12 +267,12 @@ ...@@ -266,12 +267,12 @@
s_rc.origin.x = X_ORIGIN; \ s_rc.origin.x = X_ORIGIN; \
} }
#define INPUT_FIELD_INTEGER( name, label, w, param ) \ #define INPUT_FIELD_INTEGER( name, label, w, param, tip ) \
INPUT_FIELD( CONFIG_ITEM_INTEGER, name, label, w, setIntValue, param ) INPUT_FIELD( CONFIG_ITEM_INTEGER, name, label, w, setIntValue, param, tip )
#define INPUT_FIELD_FLOAT( name, label, w, param ) \ #define INPUT_FIELD_FLOAT( name, label, w, param, tip ) \
INPUT_FIELD( CONFIG_ITEM_FLOAT, name, label, w, setFloatValue, param ) INPUT_FIELD( CONFIG_ITEM_FLOAT, name, label, w, setFloatValue, param, tip )
#define INPUT_FIELD_STRING( name, label, w, param ) \ #define INPUT_FIELD_STRING( name, label, w, param, tip ) \
INPUT_FIELD( CONFIG_ITEM_STRING, name, label, w, setStringValue, param ) INPUT_FIELD( CONFIG_ITEM_STRING, name, label, w, setStringValue, param, tip )
if( p_item ) do if( p_item ) do
{ {
...@@ -357,6 +358,7 @@ ...@@ -357,6 +358,7 @@
[o_modules setTag: i_module_tag++]; [o_modules setTag: i_module_tag++];
[o_modules setTarget: self]; [o_modules setTarget: self];
[o_modules setAction: @selector(moduleSelected:)]; [o_modules setAction: @selector(moduleSelected:)];
[o_modules setToolTip: [NSApp localizedString: p_item->psz_longtext]];
[o_cview addSubview: [o_modules autorelease]]; [o_cview addSubview: [o_modules autorelease]];
MODULE_BUTTON( o_btn_configure, _NS("Configure"), MODULE_BUTTON( o_btn_configure, _NS("Configure"),
...@@ -426,7 +428,8 @@ ...@@ -426,7 +428,8 @@
p_item->psz_value : ""; p_item->psz_value : "";
INPUT_FIELD_STRING( p_item->psz_name, p_item->psz_text, 150, INPUT_FIELD_STRING( p_item->psz_name, p_item->psz_text, 150,
[NSString stringWithCString: psz_value] ); [NSString stringWithCString: psz_value],
p_item->psz_longtext );
} }
else else
{ {
...@@ -442,6 +445,8 @@ ...@@ -442,6 +445,8 @@
o_combo_box = [[VLCComboBox alloc] initWithFrame: s_rc]; o_combo_box = [[VLCComboBox alloc] initWithFrame: s_rc];
CONTROL_CONFIG( o_combo_box, o_module_name, CONTROL_CONFIG( o_combo_box, o_module_name,
CONFIG_ITEM_STRING, p_item->psz_name ); CONFIG_ITEM_STRING, p_item->psz_name );
[o_combo_box setToolTip:
[NSApp localizedString: p_item->psz_longtext]];
[o_view addSubview: [o_combo_box autorelease]]; [o_view addSubview: [o_combo_box autorelease]];
[[NSNotificationCenter defaultCenter] addObserver: self [[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(configChanged:) selector: @selector(configChanged:)
...@@ -470,14 +475,14 @@ ...@@ -470,14 +475,14 @@
case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_INTEGER:
{ {
INPUT_FIELD_INTEGER( p_item->psz_name, p_item->psz_text, 70, INPUT_FIELD_INTEGER( p_item->psz_name, p_item->psz_text, 70,
p_item->i_value ); p_item->i_value, p_item->psz_longtext );
} }
break; break;
case CONFIG_ITEM_FLOAT: case CONFIG_ITEM_FLOAT:
{ {
INPUT_FIELD_FLOAT( p_item->psz_name, p_item->psz_text, 70, INPUT_FIELD_FLOAT( p_item->psz_name, p_item->psz_text, 70,
p_item->f_value ); p_item->f_value, p_item->psz_longtext );
} }
break; break;
...@@ -495,7 +500,9 @@ ...@@ -495,7 +500,9 @@
[o_btn_bool setButtonType: NSSwitchButton]; [o_btn_bool setButtonType: NSSwitchButton];
[o_btn_bool setIntValue: p_item->i_value]; [o_btn_bool setIntValue: p_item->i_value];
[o_btn_bool setTitle: [o_btn_bool setTitle:
[NSApp localizedString: p_item->psz_text]]; [NSApp localizedString: p_item->psz_text]];
[o_btn_bool setToolTip:
[NSApp localizedString: p_item->psz_longtext]];
[o_btn_bool setTarget: self]; [o_btn_bool setTarget: self];
[o_btn_bool setAction: @selector(configChanged:)]; [o_btn_bool setAction: @selector(configChanged:)];
CONTROL_CONFIG( o_btn_bool, o_module_name, CONTROL_CONFIG( o_btn_bool, o_module_name,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout.m: MacOS X video output plugin * vout.m: MacOS X video output plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: vout.m,v 1.10 2003/01/05 01:55:07 massiot Exp $ * $Id: vout.m,v 1.11 2003/01/05 16:23:57 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org> * Florian G. Pflug <fgp@phlo.org>
...@@ -547,6 +547,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) ...@@ -547,6 +547,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout )
EndFullScreen ( p_vout->p_sys->p_fullscreen_state, NULL ); EndFullScreen ( p_vout->p_sys->p_fullscreen_state, NULL );
p_vout->p_sys->p_fullscreen_state = NULL; p_vout->p_sys->p_fullscreen_state = NULL;
} }
config_PutInt( p_vout, "fullscreen", p_vout->b_fullscreen );
if( CoCreateWindow( p_vout ) ) if( CoCreateWindow( p_vout ) )
{ {
...@@ -874,6 +875,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -874,6 +875,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
p_intf->p_sys->b_stopping = 1;
/* The window will be closed by the intf later. */ /* The window will be closed by the intf later. */
return NO; return NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment