/*****************************************************************************
* qt4.cpp : QT4 interface
****************************************************************************
- * Copyright © 2006-2008 the VideoLAN team
+ * Copyright © 2006-2009 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
#include <QWaitCondition>
#include "qt4.hpp"
+
#include "input_manager.hpp" /* THEMIM creation */
#include "dialogs_provider.hpp" /* THEDP creation */
#include "main_interface.hpp" /* MainInterface creation */
#include "dialogs/help.hpp" /* Launch Update */
#include "recents.hpp" /* Recents Item destruction */
-#include "util/qvlcapp.hpp"
+#include "util/qvlcapp.hpp" /* QVLCApplication definition */
#ifdef HAVE_X11_XLIB_H
-#include <X11/Xlib.h>
+ #include <X11/Xlib.h>
#endif
#include "../../../share/vlc32x32.xpm"
#define QT_FULLSCREEN_TEXT N_( "Show a controller in fullscreen mode" )
+/* Various modes definition */
static const int i_mode_list[] =
{ QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
static const char *const psz_mode_list_text[] =
{ QT_NORMAL_MODE_TEXT, QT_ALWAYS_VIDEO_MODE_TEXT, QT_MINIMAL_MODE_TEXT };
+
+/**********************************************************************/
vlc_module_begin ()
set_shortname( "Qt" )
set_description( N_("Qt interface") )
vlc_module_end ()
+/*****************************************/
+
/* Ugly, but the Qt4 interface assumes single instance anyway */
static struct
{
/*****************************************************************************
* Module callbacks
*****************************************************************************/
+
+/* Open Interface */
static int Open( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
- intf_sys_t *p_sys;
#ifdef Q_WS_X11
char *psz_display = var_CreateGetNonEmptyString( p_intf, "x11-display" );
}
#endif
- /* Allocations */
- p_sys = p_intf->p_sys = new intf_sys_t;
+ /* Allocations of p_sys */
+ intf_sys_t *p_sys = p_intf->p_sys = new intf_sys_t;
p_sys->b_isDialogProvider = false;
- p_sys->p_popup_menu = NULL; /* ??? */
- p_sys->p_playlist = pl_Hold( p_intf );
+ p_sys->p_popup_menu = NULL;
p_sys->p_mi = NULL;
+ p_sys->p_playlist = pl_Hold( p_intf );
#ifdef Q_WS_X11
p_sys->display = p_display;
#endif
+ /* */
if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
{
pl_Release (p_sys->p_playlist);
return VLC_SUCCESS;
}
+/* Open Dialog Provider */
static int OpenDialogs( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
delete p_sys;
}
-
-
static QMutex windowLock;
static QWaitCondition windowWait;
#endif
p_intf->p_sys->p_app = &app;
+
+ /* All the settings are in the .conf/.ini style */
p_intf->p_sys->mainSettings = new QSettings(
#ifdef WIN32
QSettings::IniFormat,
QSettings::UserScope, "vlc", "vlc-qt-interface" );
/* Icon setting */
- if( QDate::currentDate().dayOfYear() >= 354 )
+ if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */
app.setWindowIcon( QIcon( QPixmap(vlc_christmas_xpm) ) );
else
app.setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );