Commit e957d5d4 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: plugins dialog as a toggle one.

Close #2900
parent 3617f5b4
......@@ -38,6 +38,8 @@
#include <QLineEdit>
#include <QLabel>
PluginDialog *PluginDialog::instance = NULL;
PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
setAttribute( Qt::WA_DeleteOnClose );
......
......@@ -34,11 +34,23 @@ class PluginDialog : public QVLCFrame
{
Q_OBJECT;
public:
PluginDialog( intf_thread_t * );
static PluginDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new PluginDialog( p_intf );
return instance;
}
static void killInstance()
{
delete instance;
instance = NULL;
}
private:
void FillTree();
PluginDialog( intf_thread_t * );
virtual ~PluginDialog();
static PluginDialog *instance;
void FillTree();
QTreeWidget *treePlugins;
SearchLineEdit *edit;
private slots:
......
......@@ -259,8 +259,7 @@ void DialogsProvider::toolbarDialog()
void DialogsProvider::pluginDialog()
{
PluginDialog *diag = new PluginDialog( p_intf );
diag->show();
PluginDialog::getInstance( p_intf )->toggleVisible();
}
/* Generic open file */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment