[vlc-devel] commit: Qt: allow more flexibility on tab selection for Open. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Sun Jun 14 18:25:40 CEST 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun 14 15:23:44 2009 +0200| [d811cff9f831144b95eeb5435b9c8805388b72e5] | committer: Jean-Baptiste Kempf
Qt: allow more flexibility on tab selection for Open.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d811cff9f831144b95eeb5435b9c8805388b72e5
---
.../gui/qt4/components/playlist/standardpanel.cpp | 1 +
modules/gui/qt4/dialogs_provider.cpp | 8 ++++----
modules/gui/qt4/dialogs_provider.hpp | 7 ++++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index b172502..9339e40 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -251,6 +251,7 @@ void StandardPLPanel::popupAdd()
popup.addAction( qtr(I_PL_ADDF), THEDP, SLOT( MLAppendDialog() ) );
popup.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) );
}
+
popup.exec( QCursor::pos() - addButton->mapFromGlobal( QCursor::pos() )
+ QPoint( 0, addButton->height() ) );
}
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 50ab5c3..3f8c2f1 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -349,17 +349,17 @@ void DialogsProvider::openCaptureDialog()
}
/* Same as the open one, but force the enqueue */
-void DialogsProvider::PLAppendDialog()
+void DialogsProvider::PLAppendDialog( int tab )
{
OpenDialog::getInstance( p_intf->p_sys->p_mi, p_intf, false,
- OPEN_AND_ENQUEUE )->showTab( OPEN_FILE_TAB );
+ OPEN_AND_ENQUEUE )->showTab( tab );
}
-void DialogsProvider::MLAppendDialog()
+void DialogsProvider::MLAppendDialog( int tab )
{
OpenDialog::getInstance( p_intf->p_sys->p_mi, p_intf, false,
OPEN_AND_ENQUEUE, false, false )
- ->showTab( OPEN_FILE_TAB );
+ ->showTab( tab );
}
/**
diff --git a/modules/gui/qt4/dialogs_provider.hpp b/modules/gui/qt4/dialogs_provider.hpp
index 105697c..d65de88 100644
--- a/modules/gui/qt4/dialogs_provider.hpp
+++ b/modules/gui/qt4/dialogs_provider.hpp
@@ -33,7 +33,9 @@
#include "qt4.hpp"
+#include "dialogs/open.hpp"
#include <QObject>
+#include <QStringList>
#define ADD_FILTER_MEDIA( string ) \
string += qtr( "Media Files" ); \
@@ -82,7 +84,6 @@ enum {
class QEvent;
class QSignalMapper;
class QVLCMenu;
-#include <QStringList>
class DialogsProvider : public QObject
{
@@ -171,8 +172,8 @@ public slots:
void openNetDialog();
void openCaptureDialog();
- void PLAppendDialog();
- void MLAppendDialog();
+ void PLAppendDialog( int tab = OPEN_FILE_TAB );
+ void MLAppendDialog( int tab = OPEN_FILE_TAB );
void PLOpenDir();
void PLAppendDir();
More information about the vlc-devel
mailing list