#include "podcast_configuration.hpp"
-PodcastConfigurationDialog::PodcastConfigurationDialog( intf_thread_t *_p_intf )
- :p_intf( _p_intf )
+PodcastConfigDialog *PodcastConfigDialog::instance = NULL;
+
+PodcastConfigDialog::PodcastConfigDialog( intf_thread_t *_p_intf)
+ : QVLCFrame( _p_intf )
+
{
ui.setupUi( this );
-
+
QPushButton *okButton = new QPushButton( qtr( "OK" ), this );
QPushButton *cancelButton = new QPushButton( qtr( "Cancel" ), this );
ui.okCancel->addButton( okButton, QDialogButtonBox::AcceptRole );
}
}
-void PodcastConfigurationDialog::accept()
+PodcastConfigDialog::~PodcastConfigDialog()
+{
+}
+
+void PodcastConfigDialog::accept()
{
QString urls = "";
for( int i = 0; i < ui.podcastList->count(); i++ )
{
msg_Dbg( p_intf, "You will need to reload the podcast module to take into account deleted podcast urls" );
}
-
- QDialog::accept();
}
-void PodcastConfigurationDialog::add()
+void PodcastConfigDialog::add()
{
if( ui.podcastURL->text() != QString( "" ) )
{
}
}
-void PodcastConfigurationDialog::remove()
+void PodcastConfigDialog::remove()
{
delete ui.podcastList->currentItem();
}
#ifndef _PODCAST_CONFIGURATION_DIALOG_H_
#define _PODCAST_CONFIGURATION_DIALOG_H_
-#include "qt4.hpp"
+#include "util/qvlcframe.hpp"
#include "ui/podcast_configuration.h"
-class PodcastConfigurationDialog : public QDialog
+class PodcastConfigDialog : public QVLCFrame
{
Q_OBJECT;
-
public:
- PodcastConfigurationDialog( intf_thread_t *p_intf );
+ static PodcastConfigDialog * getInstance( intf_thread_t *p_intf )
+ {
+ if( !instance)
+ instance = new PodcastConfigDialog( p_intf );
+ return instance;
+ }
+ virtual ~PodcastConfigDialog();
private:
+ PodcastConfigDialog( intf_thread_t *);
+ static PodcastConfigDialog *instance;
Ui::PodcastConfiguration ui;
- intf_thread_t *p_intf;
-
-private slots:
+public slots:
void accept();
void add();
void remove();
bookmarksDialog(); break;
case INTF_DIALOG_EXTENDED:
extendedDialog(); break;
- /* We might want to make it better with custom functions */
+ 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::VideoPopupMenu( p_intf ); break;
case INTF_DIALOG_MISCPOPUPMENU:
QVLCMenu::MiscPopupMenu( p_intf ); break;
- case INTF_DIALOG_INTERACTION:
- doInteraction( de->p_arg ); break;
- case INTF_DIALOG_VLM:
- vlmDialog(); break;
case INTF_DIALOG_WIZARD:
case INTF_DIALOG_STREAMWIZARD:
case INTF_DIALOG_UPDATEVLC:
/* BookmarkDialog::getInstance( p_intf )->toggleVisible(); */
}
+void DialogsProvider::podcastConfigureDialog()
+{
+ PodcastConfigDialog::getInstance( p_intf )->toggleVisible();
+}
+
+
/****************************************************************************
* All the open/add stuff
* Open Dialog first - Simple Open then
}
}
-void DialogsProvider::podcastConfigureDialog()
-{
- PodcastConfigurationDialog c( p_intf );
- c.exec();
-}
-
void DialogsProvider::switchToSkins()
{
var_SetString( p_intf, "intf-switch", "skins2" );
<ui version="4.0" >
<class>PodcastConfiguration</class>
- <widget class="QDialog" name="PodcastConfiguration" >
+ <widget class="QWidget" name="PodcastConfiguration" >
<property name="geometry" >
<rect>
<x>0</x>