[vlc-commits] Qt: Extendedpanel: move to a Dialog
Jean-Baptiste Kempf
git at videolan.org
Fri Nov 18 03:02:56 CET 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Nov 18 03:01:22 2011 +0100| [9b8667a845054c36f1afbf9105baa70284b9aed1] | committer: Jean-Baptiste Kempf
Qt: Extendedpanel: move to a Dialog
Close #5335
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b8667a845054c36f1afbf9105baa70284b9aed1
---
modules/gui/qt4/dialogs/extended.cpp | 5 +++--
modules/gui/qt4/dialogs/extended.hpp | 2 +-
modules/gui/qt4/dialogs_provider.cpp | 21 ++++++++++++---------
3 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/modules/gui/qt4/dialogs/extended.cpp b/modules/gui/qt4/dialogs/extended.cpp
index b5e484b..2740f9d 100644
--- a/modules/gui/qt4/dialogs/extended.cpp
+++ b/modules/gui/qt4/dialogs/extended.cpp
@@ -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 )
diff --git a/modules/gui/qt4/dialogs/extended.hpp b/modules/gui/qt4/dialogs/extended.hpp
index 0c651da..ae5be3f 100644
--- a/modules/gui/qt4/dialogs/extended.hpp
+++ b/modules/gui/qt4/dialogs/extended.hpp
@@ -31,7 +31,7 @@
class QTabWidget;
-class ExtendedDialog : public QVLCFrame, public Singleton<ExtendedDialog>
+class ExtendedDialog : public QVLCDialog, public Singleton<ExtendedDialog>
{
Q_OBJECT
public:
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index d28bf31..5338d1c 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -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()
More information about the vlc-commits
mailing list