Qt: Extendedpanel: move to a Dialog
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 18 Nov 2011 02:01:22 +0000 (03:01 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 18 Nov 2011 02:01:22 +0000 (03:01 +0100)
Close #5335

modules/gui/qt4/dialogs/extended.cpp
modules/gui/qt4/dialogs/extended.hpp
modules/gui/qt4/dialogs_provider.cpp

index b5e484b..2740f9d 100644 (file)
@@ -36,7 +36,8 @@
 #include <QPushButton>
 #include <vlc_modules.h>
 
-ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
+ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf )
+               : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
 {
 #ifdef __APPLE__
     setWindowFlags( Qt::Drawer );
@@ -116,7 +117,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
 
 ExtendedDialog::~ExtendedDialog()
 {
-    writeSettings( "EPanel" );
+    getSettings()->setValue("Epanel/geometry", saveGeometry());
 }
 
 void ExtendedDialog::showTab( int i )
index 0c651da..ae5be3f 100644 (file)
@@ -31,7 +31,7 @@
 
 class QTabWidget;
 
-class ExtendedDialog : public QVLCFrame, public Singleton<ExtendedDialog>
+class ExtendedDialog : public QVLCDialog, public Singleton<ExtendedDialog>
 {
     Q_OBJECT
 public:
index d28bf31..5338d1c 100644 (file)
@@ -91,7 +91,6 @@ DialogsProvider::~DialogsProvider()
     PlaylistDialog::killInstance();
     MediaInfoDialog::killInstance();
     MessagesDialog::killInstance();
-    ExtendedDialog::killInstance();
     BookmarksDialog::killInstance();
     HelpDialog::killInstance();
 #ifdef UPDATE_CHECK
@@ -191,20 +190,24 @@ void DialogsProvider::prefsDialog()
 
 void DialogsProvider::extendedDialog()
 {
-    if( !ExtendedDialog::getInstance( p_intf )->isVisible() || /* Hidden */
-        ExtendedDialog::getInstance( p_intf )->currentTab() != 0 )  /* wrong tab */
-        ExtendedDialog::getInstance( p_intf )->showTab( 0 );
+    ExtendedDialog *extDialog = ExtendedDialog::getInstance(p_intf );
+
+    if( !extDialog->isVisible() || /* Hidden */
+        extDialog->currentTab() != 0 )  /* wrong tab */
+        extDialog->showTab( 0 );
     else
-        ExtendedDialog::getInstance( p_intf )->hide();
+        extDialog->hide();
 }
 
 void DialogsProvider::synchroDialog()
 {
-    if( !ExtendedDialog::getInstance( p_intf )->isVisible() || /* Hidden */
-        ExtendedDialog::getInstance( p_intf )->currentTab() != 2 )  /* wrong tab */
-        ExtendedDialog::getInstance( p_intf )->showTab( 2 );
+    ExtendedDialog *extDialog = ExtendedDialog::getInstance(p_intf );
+
+    if( !extDialog->isVisible() || /* Hidden */
+        extDialog->currentTab() != 2 )  /* wrong tab */
+        extDialog->showTab( 2 );
     else
-        ExtendedDialog::getInstance( p_intf )->hide();
+        extDialog->hide();
 }
 
 void DialogsProvider::messagesDialog()