Commit 3b2f1606 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: don't attach the core dialogs to the Main Interface but to the Dialog Provider.

This fix all the dialogs (Fix AVI, HTTP login) that didn't show in skins interface.
parent f56161ec
...@@ -59,8 +59,8 @@ int QVLCVariable::callback (vlc_object_t *object, const char *, ...@@ -59,8 +59,8 @@ int QVLCVariable::callback (vlc_object_t *object, const char *,
} }
DialogHandler::DialogHandler (intf_thread_t *intf) DialogHandler::DialogHandler (intf_thread_t *intf, QObject *_parent)
: intf (intf), : intf (intf), QObject( _parent ),
message (VLC_OBJECT(intf), "dialog-fatal", VLC_VAR_ADDRESS), message (VLC_OBJECT(intf), "dialog-fatal", VLC_VAR_ADDRESS),
login (VLC_OBJECT(intf), "dialog-login", VLC_VAR_ADDRESS), login (VLC_OBJECT(intf), "dialog-login", VLC_VAR_ADDRESS),
question (VLC_OBJECT(intf), "dialog-question", VLC_VAR_ADDRESS), question (VLC_OBJECT(intf), "dialog-question", VLC_VAR_ADDRESS),
......
...@@ -51,7 +51,7 @@ class DialogHandler : public QObject ...@@ -51,7 +51,7 @@ class DialogHandler : public QObject
friend class QVLCProgressDialog; friend class QVLCProgressDialog;
public: public:
DialogHandler (intf_thread_t *); DialogHandler (intf_thread_t *, QObject *parent);
~DialogHandler (void); ~DialogHandler (void);
private: private:
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "dialogs/podcast_configuration.hpp" #include "dialogs/podcast_configuration.hpp"
#include "dialogs/toolbar.hpp" #include "dialogs/toolbar.hpp"
#include "dialogs/plugins.hpp" #include "dialogs/plugins.hpp"
#include "dialogs/external.hpp"
#include <QEvent> #include <QEvent>
#include <QApplication> #include <QApplication>
...@@ -76,6 +77,8 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) : ...@@ -76,6 +77,8 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
SDMapper = new QSignalMapper(); SDMapper = new QSignalMapper();
CONNECT( SDMapper, mapped (QString), this, SDMenuAction( QString ) ); CONNECT( SDMapper, mapped (QString), this, SDMenuAction( QString ) );
DialogHandler *dialogHandler = new DialogHandler (p_intf, this );
} }
DialogsProvider::~DialogsProvider() DialogsProvider::~DialogsProvider()
......
...@@ -206,8 +206,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -206,8 +206,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* END CONNECTS ON IM */ /* END CONNECTS ON IM */
dialogHandler = new DialogHandler (p_intf);
/************ /************
* Callbacks * Callbacks
************/ ************/
...@@ -284,8 +282,6 @@ MainInterface::~MainInterface() ...@@ -284,8 +282,6 @@ MainInterface::~MainInterface()
{ {
msg_Dbg( p_intf, "Destroying the main interface" ); msg_Dbg( p_intf, "Destroying the main interface" );
delete dialogHandler;
/* Unsure we hide the videoWidget before destroying it */ /* Unsure we hide the videoWidget before destroying it */
if( videoIsActive ) videoWidget->hide(); if( videoIsActive ) videoWidget->hide();
......
...@@ -49,7 +49,6 @@ class FullscreenControllerWidget; ...@@ -49,7 +49,6 @@ class FullscreenControllerWidget;
class SpeedControlWidget; class SpeedControlWidget;
class QMenu; class QMenu;
class QSize; class QSize;
class DialogHandler;
enum { enum {
CONTROLS_VISIBLE = 0x1, CONTROLS_VISIBLE = 0x1,
...@@ -110,7 +109,6 @@ private: ...@@ -110,7 +109,6 @@ private:
ControlsWidget *controls; ControlsWidget *controls;
InputControlsWidget *inputC; InputControlsWidget *inputC;
FullscreenControllerWidget *fullscreenControls; FullscreenControllerWidget *fullscreenControls;
DialogHandler *dialogHandler;
void createMainWidget( QSettings* ); void createMainWidget( QSettings* );
void createStatusBar(); void createStatusBar();
......
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