[vlc-devel] commit: Qt menus: prefer THEMIM->getInput() (Jean-Philippe Andre )
git version control
git at videolan.org
Tue Jun 17 05:36:13 CEST 2008
vlc | branch: master | Jean-Philippe Andre <jpeg at via.ecp.fr> | Mon Jun 16 23:01:02 2008 +0200| [e825ac8648c1bf443f0778491a19488d407fc4f6]
Qt menus: prefer THEMIM->getInput()
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e825ac8648c1bf443f0778491a19488d407fc4f6
---
modules/gui/qt4/dialogs_provider.cpp | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 87a26b9..67002de 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -36,6 +36,7 @@
#include "main_interface.hpp"
#include "menus.hpp"
#include <vlc_intf_strings.h>
+#include "input_manager.hpp"
/* The dialogs */
#include "dialogs/playlist.hpp"
@@ -532,19 +533,15 @@ void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg )
void DialogsProvider::loadSubtitlesFile()
{
- playlist_t *p_playlist = pl_Yield( p_intf );
- if( !p_playlist || !p_playlist->p_input )
- {
- msg_Err( p_intf, "cannot get input" );
+ input_thread_t *p_input = THEMIM->getInput();
+ if( !p_input )
return;
- }
QString qsFile = QFileDialog::getOpenFileName(
NULL,
qtr( "Choose subtitles file" ),
"",
qtr( "Subtitles files (*.cdg *.idx *.srt *.sub *.utf);;"
"All files (*)" ) );
- if( !input_AddSubtitles( p_playlist->p_input, qtu( qsFile ), true ) )
+ if( !input_AddSubtitles( p_input, qtu( qsFile ), true ) )
msg_Warn( p_intf, "unable to load subtitles file..." );
- pl_Release( p_playlist );
}
More information about the vlc-devel
mailing list