Patch by RĂ©mi Duraffort.
DialogEvent *de = static_cast<DialogEvent*>(event);
switch( de->i_dialog )
{
- case INTF_DIALOG_FILE_SIMPLE:
- case INTF_DIALOG_FILE:
- openDialog(); break;
- case INTF_DIALOG_DISC:
- openDiscDialog(); break;
- case INTF_DIALOG_NET:
- openNetDialog(); break;
- case INTF_DIALOG_SAT:
- case INTF_DIALOG_CAPTURE:
- openCaptureDialog(); break;
- case INTF_DIALOG_DIRECTORY:
- PLAppendDir(); break;
- case INTF_DIALOG_PLAYLIST:
- playlistDialog(); break;
- case INTF_DIALOG_MESSAGES:
- messagesDialog(); break;
- case INTF_DIALOG_FILEINFO:
- mediaInfoDialog(); break;
- case INTF_DIALOG_PREFS:
- prefsDialog(); break;
- case INTF_DIALOG_BOOKMARKS:
- bookmarksDialog(); break;
- case INTF_DIALOG_EXTENDED:
- extendedDialog(); break;
- case INTF_DIALOG_VLM:
- vlmDialog(); break;
- case INTF_DIALOG_INTERACTION:
- doInteraction( de->p_arg ); break;
- case INTF_DIALOG_POPUPMENU:
- QVLCMenu::PopupMenu( p_intf, (de->i_arg != 0) ); break;
- case INTF_DIALOG_AUDIOPOPUPMENU:
- QVLCMenu::AudioPopupMenu( p_intf ); break;
- case INTF_DIALOG_VIDEOPOPUPMENU:
- QVLCMenu::VideoPopupMenu( p_intf ); break;
- case INTF_DIALOG_MISCPOPUPMENU:
- QVLCMenu::MiscPopupMenu( p_intf ); break;
- case INTF_DIALOG_WIZARD:
- case INTF_DIALOG_STREAMWIZARD:
- case INTF_DIALOG_UPDATEVLC:
- case INTF_DIALOG_EXIT:
- default:
- msg_Warn( p_intf, "unimplemented dialog\n" );
+ case INTF_DIALOG_FILE_SIMPLE:
+ case INTF_DIALOG_FILE:
+ openDialog(); break;
+ case INTF_DIALOG_DISC:
+ openDiscDialog(); break;
+ case INTF_DIALOG_NET:
+ openNetDialog(); break;
+ case INTF_DIALOG_SAT:
+ case INTF_DIALOG_CAPTURE:
+ openCaptureDialog(); break;
+ case INTF_DIALOG_DIRECTORY:
+ PLAppendDir(); break;
+ case INTF_DIALOG_PLAYLIST:
+ playlistDialog(); break;
+ case INTF_DIALOG_MESSAGES:
+ messagesDialog(); break;
+ case INTF_DIALOG_FILEINFO:
+ mediaInfoDialog(); break;
+ case INTF_DIALOG_PREFS:
+ prefsDialog(); break;
+ case INTF_DIALOG_BOOKMARKS:
+ bookmarksDialog(); break;
+ case INTF_DIALOG_EXTENDED:
+ extendedDialog(); break;
+ case INTF_DIALOG_VLM:
+ vlmDialog(); break;
+ case INTF_DIALOG_INTERACTION:
+ doInteraction( de->p_arg ); break;
+ case INTF_DIALOG_POPUPMENU:
+ QVLCMenu::PopupMenu( p_intf, (de->i_arg != 0) ); break;
+ case INTF_DIALOG_AUDIOPOPUPMENU:
+ QVLCMenu::AudioPopupMenu( p_intf ); break;
+ case INTF_DIALOG_VIDEOPOPUPMENU:
+ QVLCMenu::VideoPopupMenu( p_intf ); break;
+ case INTF_DIALOG_MISCPOPUPMENU:
+ QVLCMenu::MiscPopupMenu( p_intf ); break;
+ case INTF_DIALOG_WIZARD:
+ case INTF_DIALOG_STREAMWIZARD:
+ case INTF_DIALOG_UPDATEVLC:
+ case INTF_DIALOG_EXIT:
+ default:
+ msg_Warn( p_intf, "unimplemented dialog" );
}
}
}
void DialogsProvider::saveAPlaylist()
{
QFileDialog *qfd = new QFileDialog( NULL,
- qtr("Choose a filename to save playlist"),
+ qtr( "Choose a filename to save playlist" ),
qfu( p_intf->p_libvlc->psz_homedir ),
- qtr("XSPF playlist (*.xspf);; ") +
- qtr("M3U playlist (*.m3u);; Any (*.*) ") );
+ qtr( "XSPF playlist (*.xspf);; " ) +
+ qtr( "M3U playlist (*.m3u);; Any (*.*) " ) );
qfd->setFileMode( QFileDialog::AnyFile );
qfd->setAcceptMode( QFileDialog::AcceptSave );
qfd->setConfirmOverwrite( true );
QString file = qfd->selectedFiles().first();
QString filter = qfd->selectedFilter();
- if( file.contains(".xsp") ||
- ( filter.contains(".xspf") && !file.contains(".m3u") ) )
+ if( file.contains( ".xsp" ) ||
+ ( filter.contains( ".xspf" ) && !file.contains( ".m3u" ) ) )
{
psz_module = psz_xspf;
if( !file.contains( ".xsp" ) )
file.append( ".m3u" );
}
- playlist_Export( THEPL, qtu(file), THEPL->p_local_category,
+ playlist_Export( THEPL, qtu( file ), THEPL->p_local_category,
psz_module);
}
}
b_transcode_only );
if( s->exec() == QDialog::Accepted )
{
- msg_Err( p_intf, "mrl %s\n", qta( s->getMrl() ) );
+ msg_Err( p_intf, "mrl %s", qta( s->getMrl() ) );
/* Just do it */
int i_len = strlen( qtu( s->getMrl() ) ) + 10;
- char *psz_option = (char*)malloc(i_len);
+ char *psz_option = (char*)malloc( i_len );
snprintf( psz_option, i_len - 1, "%s", qtu( s->getMrl() ) );
playlist_AddExt( THEPL, qtu( mrl ), "Streaming",
#include <QTimer>
#include <QApplication>
-#define ADD_FILTER_MEDIA( string ) \
- string += qtr("Media Files"); \
- string += " ( "; \
- string += EXTENSIONS_MEDIA; \
+#define ADD_FILTER_MEDIA( string ) \
+ string += qtr( "Media Files" ); \
+ string += " ( "; \
+ string += EXTENSIONS_MEDIA; \
string += ");;";
-#define ADD_FILTER_VIDEO( string ) \
- string += qtr("Video Files"); \
- string += " ( "; \
- string += EXTENSIONS_VIDEO; \
+#define ADD_FILTER_VIDEO( string ) \
+ string += qtr( "Video Files" ); \
+ string += " ( "; \
+ string += EXTENSIONS_VIDEO; \
string += ");;";
-#define ADD_FILTER_AUDIO( string ) \
- string += qtr("Audio Files"); \
- string += " ( "; \
- string += EXTENSIONS_AUDIO; \
+#define ADD_FILTER_AUDIO( string ) \
+ string += qtr( "Audio Files" ); \
+ string += " ( "; \
+ string += EXTENSIONS_AUDIO; \
string += ");;";
-#define ADD_FILTER_PLAYLIST( string )\
- string += qtr("Playlist Files"); \
- string += " ( "; \
- string += EXTENSIONS_PLAYLIST; \
+#define ADD_FILTER_PLAYLIST( string ) \
+ string += qtr( "Playlist Files" ); \
+ string += " ( "; \
+ string += EXTENSIONS_PLAYLIST; \
string += ");;";
-#define ADD_FILTER_SUBTITLE( string )\
- string += qtr("Subtitles Files"); \
- string += " ( "; \
- string += EXTENSIONS_SUBTITLE; \
+#define ADD_FILTER_SUBTITLE( string ) \
+ string += qtr( "Subtitles Files" );\
+ string += " ( "; \
+ string += EXTENSIONS_SUBTITLE; \
string += ");;";
-#define ADD_FILTER_ALL( string ) \
- string += qtr("All Files"); \
+#define ADD_FILTER_ALL( string ) \
+ string += qtr( "All Files" ); \
string += " (*.*)";
#define EXT_FILTER_MEDIA 0x01
public slots:
void doInteraction( intf_dialog_args_t * );
void menuAction( QObject *);
- void menuUpdateAction( QObject *);
+ void menuUpdateAction( QObject * );
void SDMenuAction( QString );
void playlistDialog();
QObject( parent ), p_intf( _p_intf )
{
i_old_playing_status = END_S;
- old_name="";
+ old_name = "";
p_input = NULL;
i_rate = 0;
ON_TIMEOUT( update() );
if( i_old_playing_status != val.i_int )
{
i_old_playing_status = val.i_int;
- emit statusChanged( val.i_int == PAUSE_S ? PAUSE_S : PLAYING_S );
+ emit statusChanged( val.i_int == PAUSE_S ? PAUSE_S : PLAYING_S );
}
}
{
Q_OBJECT;
public:
- InputManager( QObject *, intf_thread_t *);
+ InputManager( QObject *, intf_thread_t * );
virtual ~InputManager();
void delInput();
InputManager *getIM() { return im; };
private:
- MainInputManager( intf_thread_t *);
+ MainInputManager( intf_thread_t * );
InputManager *im;
intf_thread_t *p_intf;
private slots:
void updateInput();
signals:
- void inputChanged( input_thread_t *);
+ void inputChanged( input_thread_t * );
};
#endif
handleMainUi( settings );
/* Create a Dock to get the playlist */
- dockPL = new QDockWidget( qtr("Playlist"), this );
+ dockPL = new QDockWidget( qtr( "Playlist" ), this );
dockPL->setSizePolicy( QSizePolicy::Preferred,
QSizePolicy::MinimumExpanding );
dockPL->setFeatures( QDockWidget::AllDockWidgetFeatures );
void MainInterface::setRate( int rate )
{
QString str;
- str.setNum( ( 1000 / (double)rate), 'f', 2 );
+ str.setNum( ( 1000 / (double)rate ), 'f', 2 );
str.append( "x" );
speedLabel->setText( str );
speedControl->updateControls( rate );
* Duration
*/
-void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m)
+void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
{
parentItem = parent;
i_id = _i_id; i_input_id = _i_input_id;
{
switch( i_index )
{
- case VLC_META_ENGINE_ARTIST:
- strings.append( qtr( VLC_META_ARTIST ) );
- break;
- case VLC_META_ENGINE_TITLE:
- strings.append( qtr( VLC_META_TITLE ) );
- break;
- case VLC_META_ENGINE_DESCRIPTION:
- strings.append( qtr( VLC_META_DESCRIPTION ) );
- break;
- case VLC_META_ENGINE_DURATION:
- strings.append( qtr( "Duration" ) );
- break;
- case VLC_META_ENGINE_GENRE:
- strings.append( qtr( VLC_META_GENRE ) );
- break;
- case VLC_META_ENGINE_COLLECTION:
- strings.append( qtr( VLC_META_COLLECTION ) );
- break;
- case VLC_META_ENGINE_SEQ_NUM:
- strings.append( qtr( VLC_META_SEQ_NUM ) );
- break;
- case VLC_META_ENGINE_RATING:
- strings.append( qtr( VLC_META_RATING ) );
- break;
- default:
- break;
+ case VLC_META_ENGINE_ARTIST:
+ strings.append( qtr( VLC_META_ARTIST ) );
+ break;
+ case VLC_META_ENGINE_TITLE:
+ strings.append( qtr( VLC_META_TITLE ) );
+ break;
+ case VLC_META_ENGINE_DESCRIPTION:
+ strings.append( qtr( VLC_META_DESCRIPTION ) );
+ break;
+ case VLC_META_ENGINE_DURATION:
+ strings.append( qtr( "Duration" ) );
+ break;
+ case VLC_META_ENGINE_GENRE:
+ strings.append( qtr( VLC_META_GENRE ) );
+ break;
+ case VLC_META_ENGINE_COLLECTION:
+ strings.append( qtr( VLC_META_COLLECTION ) );
+ break;
+ case VLC_META_ENGINE_SEQ_NUM:
+ strings.append( qtr( VLC_META_SEQ_NUM ) );
+ break;
+ case VLC_META_ENGINE_RATING:
+ strings.append( qtr( VLC_META_RATING ) );
+ break;
+ default:
+ break;
}
}
}
}
-PLItem::PLItem( int _i_id, int _i_input_id, PLItem *parent, PLModel *m)
+PLItem::PLItem( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
{
init( _i_id, _i_input_id, parent, m );
}
PLItem::~PLItem()
{
- qDeleteAll(children);
+ qDeleteAll( children );
children.clear();
}
int PLItem::row() const
{
if( parentItem )
- return parentItem->children.indexOf(const_cast<PLItem*>(this));
+ return parentItem->children.indexOf( const_cast<PLItem*>(this) );
return 0;
}
{
switch( i_index )
{
- case VLC_META_ENGINE_ARTIST:
- ADD_META( p_item, Artist );
- break;
- case VLC_META_ENGINE_TITLE:
- char *psz_title, *psz_name;
- psz_title = input_item_GetTitle( p_item->p_input );
- psz_name = input_item_GetName( p_item->p_input );
- if( psz_title )
- {
- ADD_META( p_item, Title );
- } else {
- strings.append( qfu( psz_name ) );
- }
- free( psz_title );
- free( psz_name );
- break;
- case VLC_META_ENGINE_DESCRIPTION:
- ADD_META( p_item, Description );
- break;
- case VLC_META_ENGINE_DURATION:
- secstotimestr( psz_duration,
- input_item_GetDuration( p_item->p_input ) / 1000000 );
- strings.append( QString( psz_duration ) );
- break;
- case VLC_META_ENGINE_GENRE:
- ADD_META( p_item, Genre );
- break;
- case VLC_META_ENGINE_COLLECTION:
- ADD_META( p_item, Album );
- break;
- case VLC_META_ENGINE_SEQ_NUM:
- ADD_META( p_item, TrackNum );
- break;
- case VLC_META_ENGINE_RATING:
- ADD_META( p_item, Rating );
- default:
- break;
+ case VLC_META_ENGINE_ARTIST:
+ ADD_META( p_item, Artist );
+ break;
+ case VLC_META_ENGINE_TITLE:
+ char *psz_title, *psz_name;
+ psz_title = input_item_GetTitle( p_item->p_input );
+ psz_name = input_item_GetName( p_item->p_input );
+ if( psz_title )
+ {
+ ADD_META( p_item, Title );
+ } else {
+ strings.append( qfu( psz_name ) );
+ }
+ free( psz_title );
+ free( psz_name );
+ break;
+ case VLC_META_ENGINE_DESCRIPTION:
+ ADD_META( p_item, Description );
+ break;
+ case VLC_META_ENGINE_DURATION:
+ secstotimestr( psz_duration,
+ input_item_GetDuration( p_item->p_input ) / 1000000 );
+ strings.append( QString( psz_duration ) );
+ break;
+ case VLC_META_ENGINE_GENRE:
+ ADD_META( p_item, Genre );
+ break;
+ case VLC_META_ENGINE_COLLECTION:
+ ADD_META( p_item, Album );
+ break;
+ case VLC_META_ENGINE_SEQ_NUM:
+ ADD_META( p_item, TrackNum );
+ break;
+ case VLC_META_ENGINE_RATING:
+ ADD_META( p_item, Rating );
+ default:
+ break;
}
}
*************************************************************************/
PLModel::PLModel( playlist_t *_p_playlist, intf_thread_t *_p_intf,
- playlist_item_t * p_root, int _i_depth, QObject *parent)
- : QAbstractItemModel(parent)
+ playlist_item_t * p_root, int _i_depth, QObject *parent )
+ : QAbstractItemModel( parent )
{
i_depth = _i_depth;
assert( i_depth == 1 || i_depth == -1 );
return Qt::CopyAction;
}
-Qt::ItemFlags PLModel::flags(const QModelIndex &index) const
+Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
{
- Qt::ItemFlags defaultFlags = QAbstractItemModel::flags(index);
+ Qt::ItemFlags defaultFlags = QAbstractItemModel::flags( index );
if( index.isValid() )
return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
else
return types;
}
-QMimeData *PLModel::mimeData(const QModelIndexList &indexes) const
+QMimeData *PLModel::mimeData( const QModelIndexList &indexes ) const
{
QMimeData *mimeData = new QMimeData();
QByteArray encodedData;
- QDataStream stream(&encodedData, QIODevice::WriteOnly);
+ QDataStream stream( &encodedData, QIODevice::WriteOnly );
- foreach (QModelIndex index, indexes) {
- if (index.isValid() && index.column() == 0 )
- stream << itemId(index);
+ foreach( QModelIndex index, indexes ) {
+ if( index.isValid() && index.column() == 0 )
+ stream << itemId( index );
}
- mimeData->setData("vlc/playlist-item-id", encodedData);
+ mimeData->setData( "vlc/playlist-item-id", encodedData );
return mimeData;
}
-bool PLModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &target)
+bool PLModel::dropMimeData( const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &target )
{
- if ( data->hasFormat("vlc/playlist-item-id") )
+ if( data->hasFormat( "vlc/playlist-item-id" ) )
{
- if (action == Qt::IgnoreAction)
+ if( action == Qt::IgnoreAction )
return true;
PLItem *targetItem;
else
targetItem = rootItem;
- QByteArray encodedData = data->data("vlc/playlist-item-id");
- QDataStream stream(&encodedData, QIODevice::ReadOnly);
+ QByteArray encodedData = data->data( "vlc/playlist-item-id" );
+ QDataStream stream( &encodedData, QIODevice::ReadOnly );
PLItem *newParentItem;
- while (!stream.atEnd())
+ while( !stream.atEnd() )
{
int i;
int srcId;
}
/****************** Base model mandatory implementations *****************/
-QVariant PLModel::data(const QModelIndex &index, int role) const
+QVariant PLModel::data( const QModelIndex &index, int role ) const
{
- if(!index.isValid() ) return QVariant();
+ if( !index.isValid() ) return QVariant();
PLItem *item = static_cast<PLItem*>(index.internalPointer());
if( role == Qt::DisplayRole )
{
}
QVariant PLModel::headerData( int section, Qt::Orientation orientation,
- int role) const
+ int role ) const
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
return QVariant( rootItem->columnString( section ) );
return QVariant();
}
-QModelIndex PLModel::index(int row, int column, const QModelIndex &parent)
+QModelIndex PLModel::index( int row, int column, const QModelIndex &parent )
const
{
PLItem *parentItem;
- if (!parent.isValid())
+ if( !parent.isValid() )
parentItem = rootItem;
else
parentItem = static_cast<PLItem*>(parent.internalPointer());
- PLItem *childItem = parentItem->child(row);
- if (childItem)
- return createIndex(row, column, childItem);
+ PLItem *childItem = parentItem->child( row );
+ if( childItem )
+ return createIndex( row, column, childItem );
else
return QModelIndex();
}
return QModelIndex();
}
-QModelIndex PLModel::parent(const QModelIndex &index) const
+QModelIndex PLModel::parent( const QModelIndex &index ) const
{
if( !index.isValid() ) return QModelIndex();
PLItem *childItem = static_cast<PLItem*>(index.internalPointer());
- if( !childItem ) { msg_Err( p_playlist, "NULL CHILD \n" ); return QModelIndex(); }
+ if( !childItem ) { msg_Err( p_playlist, "NULL CHILD" ); return QModelIndex(); }
PLItem *parentItem = childItem->parent();
if( !parentItem || parentItem == rootItem ) return QModelIndex();
if( ! parentItem->parentItem )
return rootItem->strings.count();
}
-int PLModel::childrenCount(const QModelIndex &parent) const
+int PLModel::childrenCount( const QModelIndex &parent ) const
{
return rowCount( parent );
}
-int PLModel::rowCount(const QModelIndex &parent) const
+int PLModel::rowCount( const QModelIndex &parent ) const
{
PLItem *parentItem;
- if (!parent.isValid())
+ if( !parent.isValid() )
parentItem = rootItem;
else
parentItem = static_cast<PLItem*>(parent.internalPointer());
}
}
-void PLModel::recurseDelete( QList<PLItem*> children, QModelIndexList *fullList)
+void PLModel::recurseDelete( QList<PLItem*> children, QModelIndexList *fullList )
{
for( int i = children.size() - 1; i >= 0 ; i-- )
{
int index=0;
switch( meta )
{
- case VLC_META_ENGINE_TITLE:
- index=0;
- break;
- case VLC_META_ENGINE_DURATION:
- index=1;
- break;
- case VLC_META_ENGINE_ARTIST:
- index=2;
- break;
- case VLC_META_ENGINE_GENRE:
- index=3;
- break;
- case VLC_META_ENGINE_COPYRIGHT:
- index=4;
- break;
- case VLC_META_ENGINE_COLLECTION:
- index=5;
- break;
- case VLC_META_ENGINE_SEQ_NUM:
- index=6;
- break;
- case VLC_META_ENGINE_DESCRIPTION:
- index=7;
- break;
- default:
- break;
+ case VLC_META_ENGINE_TITLE:
+ index=0;
+ break;
+ case VLC_META_ENGINE_DURATION:
+ index=1;
+ break;
+ case VLC_META_ENGINE_ARTIST:
+ index=2;
+ break;
+ case VLC_META_ENGINE_GENRE:
+ index=3;
+ break;
+ case VLC_META_ENGINE_COPYRIGHT:
+ index=4;
+ break;
+ case VLC_META_ENGINE_COLLECTION:
+ index=5;
+ break;
+ case VLC_META_ENGINE_SEQ_NUM:
+ index=6;
+ break;
+ case VLC_META_ENGINE_DESCRIPTION:
+ index=7;
+ break;
+ default:
+ break;
}
emit layoutAboutToBeChanged();
index = __MIN( index , rootItem->strings.count() );
class PLItem
{
public:
- PLItem( int, int, PLItem *parent , PLModel *);
- PLItem( playlist_item_t *, PLItem *parent, PLModel *);
+ PLItem( int, int, PLItem *parent , PLModel * );
+ PLItem( playlist_item_t *, PLItem *parent, PLModel * );
~PLItem();
int row() const;
QString columnString( int col ) { return strings.value( col ); };
PLItem *parent() { return parentItem; };
- void update( playlist_item_t *, bool);
+ void update( playlist_item_t *, bool );
protected:
QList<PLItem*> children;
QList<QString> strings;
public:
PLModel( playlist_t *, intf_thread_t *,
- playlist_item_t *, int, QObject *parent = 0);
+ playlist_item_t *, int, QObject *parent = 0 );
~PLModel();
/* All types of lookups / QModel stuff */
- QVariant data( const QModelIndex &index, int role) const;
- Qt::ItemFlags flags( const QModelIndex &index) const;
+ QVariant data( const QModelIndex &index, int role ) const;
+ Qt::ItemFlags flags( const QModelIndex &index ) const;
QVariant headerData( int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const;
+ int role = Qt::DisplayRole ) const;
QModelIndex index( int r, int c, const QModelIndex &parent ) const;
QModelIndex index( PLItem *, int c ) const;
int itemId( const QModelIndex &index ) const;
bool isCurrent( const QModelIndex &index );
- QModelIndex parent( const QModelIndex &index) const;
+ QModelIndex parent( const QModelIndex &index ) const;
int childrenCount( const QModelIndex &parent = QModelIndex() ) const;
int rowCount( const QModelIndex &parent = QModelIndex() ) const;
int columnCount( const QModelIndex &parent = QModelIndex() ) const;
bool b_need_update;
int i_items_to_append;
- void rebuild(); void rebuild( playlist_item_t *);
+ void rebuild(); void rebuild( playlist_item_t * );
bool hasRandom(); bool hasLoop(); bool hasRepeat();
/* Actions made by the views */
/* DnD handling */
Qt::DropActions supportedDropActions() const;
- QMimeData* mimeData(const QModelIndexList &indexes) const;
- bool dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &target);
+ QMimeData* mimeData( const QModelIndexList &indexes ) const;
+ bool dropMimeData( const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &target );
QStringList mimeTypes() const;
void sendArt( QString url );
void UpdateNodeChildren( playlist_item_t *, PLItem * );
/* Actions */
- void recurseDelete( QList<PLItem*> children, QModelIndexList *fullList);
+ void recurseDelete( QList<PLItem*> children, QModelIndexList *fullList );
void doDeleteItem( PLItem *item, QModelIndexList *fullList );
/* Popup */
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define ALWAYS_VIDEO_TEXT N_("Always show video area")
-#define ALWAYS_VIDEO_LONGTEXT N_("Start VLC with a cone image, and display it" \
- " when there is no video track." )
+#define ALWAYS_VIDEO_TEXT N_( "Always show video area" )
+#define ALWAYS_VIDEO_LONGTEXT N_( "Start VLC with a cone image, and display it" \
+ " when there is no video track." )
-#define ADVANCED_PREFS_TEXT N_("Show advanced prefs over simple ones")
-#define ADVANCED_PREFS_LONGTEXT N_("Show advanced preferences and not simple " \
- "preferences when opening the preferences " \
- "dialog.")
+#define ADVANCED_PREFS_TEXT N_( "Show advanced prefs over simple ones" )
+#define ADVANCED_PREFS_LONGTEXT N_( "Show advanced preferences and not simple " \
+ "preferences when opening the preferences " \
+ "dialog." )
-#define SYSTRAY_TEXT N_("Systray icon")
-#define SYSTRAY_LONGTEXT N_("Show an icon in the systray " \
- "allowing you to control VLC media player " \
- "for basic actions")
+#define SYSTRAY_TEXT N_( "Systray icon" )
+#define SYSTRAY_LONGTEXT N_( "Show an icon in the systray " \
+ "allowing you to control VLC media player " \
+ "for basic actions" )
-#define MINIMIZED_TEXT N_("Start VLC with only a systray icon")
-#define MINIMIZED_LONGTEXT N_("When you launch VLC with that option, " \
- "VLC will start with just an icon in" \
- "your taskbar")
+#define MINIMIZED_TEXT N_( "Start VLC with only a systray icon" )
+#define MINIMIZED_LONGTEXT N_( "When you launch VLC with that option, " \
+ "VLC will start with just an icon in" \
+ "your taskbar" )
-#define TITLE_TEXT N_("Show playing item name in window title")
-#define TITLE_LONGTEXT N_("Show the name of the song or video in the " \
- "controler window title")
+#define TITLE_TEXT N_( "Show playing item name in window title" )
+#define TITLE_LONGTEXT N_( "Show the name of the song or video in the " \
+ "controler window title" )
-#define FILEDIALOG_PATH_TEXT N_("Path to use in openfile dialog")
+#define FILEDIALOG_PATH_TEXT N_( "Path to use in openfile dialog" )
-#define NOTIFICATION_TEXT N_("Show notification popup on track change")
+#define NOTIFICATION_TEXT N_( "Show notification popup on track change" )
#define NOTIFICATION_LONGTEXT N_( \
"Show a notification popup with the artist and track name when " \
"the current playlist item changes, when VLC is minimized or hidden." )
-#define ADVANCED_OPTIONS_TEXT N_("Advanced options")
-#define ADVANCED_OPTIONS_LONGTEXT N_("Show all the advanced options " \
- "in the dialogs")
+#define ADVANCED_OPTIONS_TEXT N_( "Advanced options" )
+#define ADVANCED_OPTIONS_LONGTEXT N_( "Show all the advanced options " \
+ "in the dialogs" )
-#define OPACITY_TEXT N_("Windows opacity between 0.1 and 1.")
-#define OPACITY_LONGTEXT N_("Sets the windows opacity between 0.1 and 1 " \
- "for main interface, playlist and extended panel." \
- " This option only works with Windows and " \
- "X11 with composite extensions.")
+#define OPACITY_TEXT N_( "Windows opacity between 0.1 and 1." )
+#define OPACITY_LONGTEXT N_( "Sets the windows opacity between 0.1 and 1 " \
+ "for main interface, playlist and extended panel." \
+ " This option only works with Windows and " \
+ "X11 with composite extensions." )
-#define SHOWFLAGS_TEXT N_("Define what columns to show in playlist window")
-#define SHOWFLAGS_LONGTEXT N_("Enter the sum of the options that you want: \n" \
- "Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
- "Copyright: 16; Collection/album: 32; Rating: 256." )
+#define SHOWFLAGS_TEXT N_( "Define what columns to show in playlist window" )
+#define SHOWFLAGS_LONGTEXT N_( "Enter the sum of the options that you want: \n" \
+ "Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
+ "Copyright: 16; Collection/album: 32; Rating: 256." )
-#define ERROR_TEXT N_("Show unimportant error and warnings dialogs" )
-#define MINIMAL_TEXT N_("Start in minimal view (menus hidden)." )
+#define ERROR_TEXT N_( "Show unimportant error and warnings dialogs" )
+#define MINIMAL_TEXT N_( "Start in minimal view (menus hidden)." )
-#define UPDATER_TEXT N_("Activate the new updates notification")
-#define UPDATER_LONGTEXT N_("Activate the automatic notification of new " \
+#define UPDATER_TEXT N_( "Activate the new updates notification" )
+#define UPDATER_LONGTEXT N_( "Activate the automatic notification of new " \
"versions of the software. It runs once a week." )
-#define COMPLETEVOL_TEXT N_("Allow the volume to be set to 400%" )
-#define COMPLETEVOL_LONGTEXT N_("Allow the volume to have range from 0% to " \
- "400%, instead of 0% to 200%. This option " \
- "can distort the audio, since it uses " \
- "software amplification.")
+#define COMPLETEVOL_TEXT N_( "Allow the volume to be set to 400%" )
+#define COMPLETEVOL_LONGTEXT N_( "Allow the volume to have range from 0% to " \
+ "400%, instead of 0% to 200%. This option " \
+ "can distort the audio, since it uses " \
+ "software amplification." )
-#define BLING_TEXT N_("Use non native buttons and volume slider")
+#define BLING_TEXT N_( "Use non native buttons and volume slider" )
-#define PRIVACY_TEXT N_("Ask for network policy at start")
+#define PRIVACY_TEXT N_( "Ask for network policy at start" )
vlc_module_begin();
set_shortname( (char *)"Qt" );
BLING_TEXT, VLC_FALSE );
add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT,
- COMPLETEVOL_LONGTEXT, VLC_TRUE);
+ COMPLETEVOL_LONGTEXT, VLC_TRUE );
add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
- FILEDIALOG_PATH_TEXT, VLC_TRUE);
+ FILEDIALOG_PATH_TEXT, VLC_TRUE );
change_autosave();
change_internal();
return VLC_EGENERIC;
}
#endif
- p_intf->p_sys = (intf_sys_t *)malloc(sizeof( intf_sys_t ) );
+ p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
if( !p_intf->p_sys )
{
- msg_Err(p_intf, "Out of memory");
+ msg_Err( p_intf, "Out of memory" );
return VLC_ENOMEM;
}
memset( p_intf->p_sys, 0, sizeof( intf_sys_t ) );
* disables icon theme use because that makes Cleanlooks style bug
* because it asks gconf for some settings that timeout because of threads
* see commits 21610 21622 21654 for reference */
- QApplication::setDesktopSettingsAware(false);
+ QApplication::setDesktopSettingsAware( false );
#endif
/* Start the QApplication here */
/*if( p_intf->pf_show_dialog )*/
vlc_thread_ready( p_intf );
// Translation - get locale
- QLocale ql = QLocale::system ();
+ QLocale ql = QLocale::system();
// Translations for qt's own dialogs
QTranslator qtTranslator( 0 );
// Let's find the right path for the translation file
#if !defined( WIN32 )
- QString path = QString(QT4LOCALEDIR);
+ QString path = QString( QT4LOCALEDIR );
#else
QString path = QString( QString(system_VLCPath()) + DIR_SEP +
"locale" + DIR_SEP );
// files depending on locale
bool b_loaded = qtTranslator.load( path + "qt_" + ql.name());
if (!b_loaded)
- msg_Dbg(p_intf, "Error while initializing qt-specific localization");
- app->installTranslator(&qtTranslator);
+ msg_Dbg( p_intf, "Error while initializing qt-specific localization" );
+ app->installTranslator( &qtTranslator );
/* Start playing if needed */
if( !p_intf->pf_show_dialog && p_intf->b_play )
/* Add define for duration, VLC_META_ENGINE doesn't include it */
#define VLC_META_ENGINE_DURATION 0x00000002
-#define VLC_META_DURATION N_("Duration")
+#define VLC_META_DURATION N_( "Duration" )
class QApplication;
class QMenu;