#include <QLineEdit>
#include <QLabel>
+PluginDialog *PluginDialog::instance = NULL;
+
PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
- setAttribute( Qt::WA_DeleteOnClose );
-
setWindowTitle( qtr( "Plugins and extensions" ) );
+ setWindowRole( "vlc-plugins" );
QGridLayout *layout = new QGridLayout( this );
/* Main Tree for modules */
treePlugins->setColumnWidth( 0, 200 );
QStringList headerNames;
- headerNames << _("Name") << _("Capability" ) << _( "Score" );
+ headerNames << qtr("Name") << qtr("Capability" ) << qtr( "Score" );
treePlugins->setHeaderLabels( headerNames );
FillTree();
treePlugins->setSortingEnabled( true );
treePlugins->sortByColumn( 1, Qt::AscendingOrder );
- QLabel *label = new QLabel( _("&Search:"), this );
+ QLabel *label = new QLabel( qtr("&Search:"), this );
edit = new SearchLineEdit( this );
label->setBuddy( edit );
layout->addWidget( label, 1, 0 );
layout->addWidget( edit, 1, 1, 1, -1 );
- CONNECT( edit, textChanged( QString ),
- this, search( QString ) );
+ CONNECT( edit, textChanged( const QString& ),
+ this, search( const QString& ) );
QDialogButtonBox *box = new QDialogButtonBox;
- QPushButton *okButton = new QPushButton( "ok", this );
+ QPushButton *okButton = new QPushButton( qtr( "&Close" ), this );
box->addButton( okButton, QDialogButtonBox::AcceptRole );
layout->addWidget( box, 2, 2 );
BUTTONACT( okButton, close() );
setMinimumSize( 500, 300 );
- readSettings( "Plugins", QSize( 500, 300 ) );
+ readSettings( "Plugins", QSize( 540, 400 ) );
}
inline void PluginDialog::FillTree()
qs_item << qfu( module_get_name( p_module, true ) )
<< qfu( module_get_capability( p_module ) )
<< QString::number( module_get_score( p_module ) );
+#ifndef DEBUG
+ if( qs_item.at(1).isEmpty() ) continue;
+#endif
QTreeWidgetItem *item = new QTreeWidgetItem( qs_item );
treePlugins->addTopLevelItem( item );
}
}
-void PluginDialog::search( const QString qs )
+void PluginDialog::search( const QString& qs )
{
QList<QTreeWidgetItem *> items = treePlugins->findItems( qs, Qt::MatchContains );
items += treePlugins->findItems( qs, Qt::MatchContains, 1 );