/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
#include <errno.h> /* ENOMEM */
-#include <string.h> /* strerror() */
-#include <stdio.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <vlc/vlc.h>
#include <vlc_interface.h>
"on the toolbar (or both)." )
static int pi_playlist_views[] = { 0,1,2 };
-static char *psz_playlist_views[] = { N_("Normal" ), N_("Embedded" ) ,
- N_("Both") };
+static const char *psz_playlist_views[] = { N_("Normal" ), N_("Embedded" ) ,
+ N_("Both") };
vlc_module_begin();
-#ifdef WIN32
int i_score = 150;
-#else
- int i_score = getenv( "DISPLAY" ) == NULL ? 15 : 150;
-#endif
set_shortname( (char*) "wxWidgets" );
set_description( (char *) _("wxWidgets interface module") );
set_category( CAT_INTERFACE );
add_shortcut( "wxwin" );
add_shortcut( "wx" );
add_shortcut( "wxwidgets" );
- set_program( "wxvlc" );
add_bool( "wx-embed", 1, NULL,
EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
- add_deprecated( "wxwin-enbed", VLC_FALSE); /*Deprecated since 0.8.4*/
+ add_deprecated_alias( "wxwin-enbed" ); /*Deprecated since 0.8.4*/
add_bool( "wx-bookmarks", 0, NULL,
BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
- add_deprecated( "wxwin-bookmarks", VLC_FALSE); /*Deprecated since 0.8.4*/
+ add_deprecated_alias( "wxwin-bookmarks" ); /*Deprecated since 0.8.4*/
add_bool( "wx-taskbar", 1, NULL,
TASKBAR_TEXT, TASKBAR_LONGTEXT, VLC_FALSE );
- add_deprecated( "wxwin-taskbar", VLC_FALSE); /*Deprecated since 0.8.4*/
+ add_deprecated_alias( "wxwin-taskbar" ); /*Deprecated since 0.8.4*/
add_bool( "wx-extended", 0, NULL,
EXTENDED_TEXT, EXTENDED_LONGTEXT, VLC_FALSE );
add_bool( "wx-minimal", 0, NULL,
MINIMAL_TEXT, MINIMAL_LONGTEXT, VLC_TRUE );
- add_deprecated( "wxwin-minimal", VLC_FALSE); /*Deprecated since 0.8.4*/
+ add_deprecated_alias( "wxwin-minimal" ); /*Deprecated since 0.8.4*/
add_bool( "wx-autosize", 1, NULL,
SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, VLC_TRUE );
+ add_deprecated_alias( "wxwin-autosize" ); /*Deprecated since 0.8.4*/
add_integer( "wx-playlist-view", 0, NULL, PLAYLIST_TEXT, PLAYLIST_LONGTEXT,
VLC_FALSE );
change_integer_list( pi_playlist_views, psz_playlist_views, 0 );
- 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
add_bool( "wx-systray", 0, NULL,
SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
- add_deprecated( "wxwin-systray", VLC_FALSE); /*Deprecated since 0.8.4*/
+ add_deprecated_alias( "wxwin-systray" ); /*Deprecated since 0.8.4*/
#endif
#endif
add_bool( "wx-labels", 0, NULL, LABEL_TEXT, LABEL_LONGTEXT, VLC_TRUE);
N_("last config"), N_("last config"), VLC_TRUE );
change_autosave();
change_internal();
- add_deprecated( "wxwin-config-last", VLC_FALSE); /*Deprecated since 0.8.4*/
+ add_deprecated_alias( "wxwin-config-last" ); /*Deprecated since 0.8.4*/
add_submodule();
set_description( _("wxWidgets dialogs provider") );
static int Open( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
-
+ /* Test in we have an X*/
+#if defined HAVE_GETENV && (defined __WXGTK__ || defined __WXX11)
+ if( !getenv( "DISPLAY" ) )
+ {
+ msg_Err( p_intf, "no X server");
+ return VLC_EGENERIC;
+ }
+#endif
/* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
FIND_ANYWHERE );
if( p_playlist )
{
- playlist_Control( p_playlist, PLAYLIST_AUTOPLAY, VLC_FALSE );
+ playlist_Control( p_playlist, PLAYLIST_PLAY, VLC_FALSE );
vlc_object_release( p_playlist );
}
}