/* include the icon graphic */
#include "../../../share/vlc32x32.xpm"
/* include a small icon graphic for the systray icon */
+#ifdef wxHAS_TASK_BAR_ICON
#include "../../../share/vlc16x16.xpm"
+#endif
/*****************************************************************************
* Local class declarations.
END_EVENT_TABLE()
/* Systray integration */
+#ifdef wxHAS_TASK_BAR_ICON
class Systray: public wxTaskBarIcon
{
public:
Interface* p_main_interface;
DECLARE_EVENT_TABLE()
};
-
+#endif
/*****************************************************************************
* Event Table.
END_EVENT_TABLE()
+#ifdef wxHAS_TASK_BAR_ICON
BEGIN_EVENT_TABLE(Systray, wxTaskBarIcon)
/* Mouse events */
EVT_TASKBAR_LEFT_DOWN(Systray::OnLeftClick)
EVT_MENU(PrevStream_Event, Systray::OnPrevStream)
EVT_MENU(StopStream_Event, Systray::OnStopStream)
END_EVENT_TABLE()
+#endif
/*****************************************************************************
* Constructor.
extra_window = NULL;
/* Give our interface a nice little icon */
- SetIcon( wxIcon( vlc16x16_xpm ) );
+ SetIcon( wxIcon( vlc_xpm ) );
/* Create a sizer for the main frame */
frame_sizer = new wxBoxSizer( wxVERTICAL );
p_dummy->SetFocus();
frame_sizer->Add( p_dummy, 0, 0 );
+#ifdef wxHAS_TASK_BAR_ICON
/* Systray integration */
p_systray = NULL;
if ( config_GetInt( p_intf, "wxwin-systray" ) )
{
p_systray = new Systray(this);
- p_systray->SetIcon( wxIcon( vlc_xpm ), wxT("VLC media player") );
+ p_systray->SetIcon( wxIcon( vlc16x16_xpm ), wxT("VLC media player") );
if ( (! p_systray->IsOk()) || (! p_systray->IsIconInstalled()) )
{
msg_Warn(p_intf, "Cannot set systray icon, weird things may happen");
}
}
+#endif
/* Creation of the menu bar */
CreateOurMenuBar();
Interface::~Interface()
{
+#ifdef wxHAS_TASK_BAR_ICON
if( p_systray )
{
delete p_systray;
}
+#endif
if( p_intf->p_sys->p_wxwindow )
{
* Definition of Systray class.
*****************************************************************************/
+#ifdef wxHAS_TASK_BAR_ICON
Systray::Systray( Interface *_p_main_interface )
{
p_main_interface = _p_main_interface;
systray_menu->Append( Iconize_Event, wxU(_("Show/Hide interface")) );
return systray_menu;
}
+#endif
BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
add_bool( "wxwin-taskbar", 1, NULL,
TASKBAR_TEXT, TASKBAR_LONGTEXT, VLC_FALSE );
+#ifdef wxHAS_TASK_BAR_ICON
add_bool( "wxwin-systray", 0, NULL,
SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
+#endif
add_submodule();
set_description( _("wxWindows dialogs provider") );