Commit 82d59e50 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* more systray related ifndefs for the Darwin platform

parent de649c2a
...@@ -171,12 +171,15 @@ void InputManager::UpdateButtons( vlc_bool_t b_play ) ...@@ -171,12 +171,15 @@ void InputManager::UpdateButtons( vlc_bool_t b_play )
p_main_intf->statusbar->SetStatusText( wxT(""), 0 ); p_main_intf->statusbar->SetStatusText( wxT(""), 0 );
p_main_intf->statusbar->SetStatusText( wxT(""), 2 ); p_main_intf->statusbar->SetStatusText( wxT(""), 2 );
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
if( p_main_intf->p_systray ) if( p_main_intf->p_systray )
{ {
p_main_intf->p_systray->UpdateTooltip( p_main_intf->p_systray->UpdateTooltip(
wxString(wxT("VLC media player - ")) + wxU(_("Stopped")) ); wxString(wxT("VLC media player - ")) + wxU(_("Stopped")) );
} }
#endif
#endif #endif
return; return;
...@@ -192,6 +195,8 @@ void InputManager::UpdateButtons( vlc_bool_t b_play ) ...@@ -192,6 +195,8 @@ void InputManager::UpdateButtons( vlc_bool_t b_play )
p_main_intf->TogglePlayButton( val.i_int == STATUS_PAUSE ? p_main_intf->TogglePlayButton( val.i_int == STATUS_PAUSE ?
PAUSE_S : PLAYING_S ); PAUSE_S : PLAYING_S );
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
if( p_main_intf->p_systray ) if( p_main_intf->p_systray )
{ {
...@@ -199,6 +204,7 @@ void InputManager::UpdateButtons( vlc_bool_t b_play ) ...@@ -199,6 +204,7 @@ void InputManager::UpdateButtons( vlc_bool_t b_play )
wxU(p_input->input.p_item->psz_name) + wxString(wxT(" - ")) + wxU(p_input->input.p_item->psz_name) + wxString(wxT(" - ")) +
(val.i_int == PAUSE_S ? wxU(_("Paused")) : wxU(_("Playing")))); (val.i_int == PAUSE_S ? wxU(_("Paused")) : wxU(_("Playing"))));
} }
#endif
#endif #endif
} }
} }
......
...@@ -396,6 +396,8 @@ Interface::Interface( intf_thread_t *_p_intf, long style ): ...@@ -396,6 +396,8 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
/* Put this in the splitter */ /* Put this in the splitter */
splitter->Initialize( main_panel ); splitter->Initialize( main_panel );
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
/* Systray integration */ /* Systray integration */
p_systray = NULL; p_systray = NULL;
...@@ -403,6 +405,7 @@ Interface::Interface( intf_thread_t *_p_intf, long style ): ...@@ -403,6 +405,7 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
{ {
p_systray = new Systray( this, p_intf ); p_systray = new Systray( this, p_intf );
} }
#endif
#endif #endif
/* Creation of the menu bar */ /* Creation of the menu bar */
...@@ -493,8 +496,11 @@ Interface::~Interface() ...@@ -493,8 +496,11 @@ Interface::~Interface()
if( video_window ) delete video_window; if( video_window ) delete video_window;
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
if( p_systray ) delete p_systray; if( p_systray ) delete p_systray;
#endif
#endif #endif
p_intf->b_interaction = VLC_FALSE; p_intf->b_interaction = VLC_FALSE;
......
...@@ -54,6 +54,8 @@ namespace wxvlc ...@@ -54,6 +54,8 @@ namespace wxvlc
#endif #endif
/* Systray integration */ /* Systray integration */
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
class Systray: public wxTaskBarIcon class Systray: public wxTaskBarIcon
{ {
...@@ -75,6 +77,7 @@ namespace wxvlc ...@@ -75,6 +77,7 @@ namespace wxvlc
intf_thread_t *p_intf; intf_thread_t *p_intf;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#endif
#endif #endif
/* Main Interface */ /* Main Interface */
...@@ -104,8 +107,11 @@ namespace wxvlc ...@@ -104,8 +107,11 @@ namespace wxvlc
wxControl *volctrl; wxControl *volctrl;
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
Systray *p_systray; Systray *p_systray;
#endif
#endif #endif
wxWindow *video_window; wxWindow *video_window;
......
...@@ -135,10 +135,13 @@ vlc_module_begin(); ...@@ -135,10 +135,13 @@ vlc_module_begin();
add_bool( "wx-autosize", 1, NULL, add_bool( "wx-autosize", 1, NULL,
SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, VLC_TRUE ); SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, VLC_TRUE );
add_deprecated( "wxwin-autosize", VLC_FALSE); /*Deprecated since 0.8.4*/ add_deprecated( "wxwin-autosize", VLC_FALSE); /*Deprecated since 0.8.4*/
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON #ifdef wxHAS_TASK_BAR_ICON
add_bool( "wx-systray", 0, NULL, add_bool( "wx-systray", 0, NULL,
SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE ); SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
add_deprecated( "wxwin-systray", VLC_FALSE); /*Deprecated since 0.8.4*/ add_deprecated( "wxwin-systray", VLC_FALSE); /*Deprecated since 0.8.4*/
#endif
#endif #endif
add_string( "wx-config-last", NULL, NULL, add_string( "wx-config-last", NULL, NULL,
"last config", "last config", VLC_TRUE ); "last config", "last config", VLC_TRUE );
......
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