[vlc-devel] commit: Fix some interaction issues. Ref #1808 (Jean-Baptiste Kempf )
git version control
git at videolan.org
Wed Aug 6 00:34:17 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Aug 5 15:32:30 2008 -0700| [4d95527fac93462e37c594b0f9df5555c0dd4cc4] | committer: Jean-Baptiste Kempf
Fix some interaction issues. Ref #1808
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d95527fac93462e37c594b0f9df5555c0dd4cc4
---
modules/gui/qt4/dialogs/interaction.cpp | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/dialogs/interaction.cpp b/modules/gui/qt4/dialogs/interaction.cpp
index a8d55f7..fab6569 100644
--- a/modules/gui/qt4/dialogs/interaction.cpp
+++ b/modules/gui/qt4/dialogs/interaction.cpp
@@ -43,9 +43,11 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
p_intf( _p_intf), p_dialog( _p_dialog )
{
QVBoxLayout *layout = NULL;
+ description = NULL;
int i_ret = -1;
panel = NULL;
dialog = NULL;
+ altButton = NULL;
if( p_dialog->i_flags & DIALOG_BLOCKING_ERROR )
{
@@ -102,6 +104,17 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
panel->setLayout( grid );
layout->addWidget( panel );
}
+ else if( p_dialog->i_flags & DIALOG_INTF_PROGRESS )
+ {
+ if( p_intf->p_sys->p_mi )
+ {
+ progressBar = p_intf->p_sys->p_mi->pgBar;
+ progressBar->show();
+ i_ret = 2;
+ }
+ else
+ p_dialog->i_flags = DIALOG_USER_PROGRESS;
+ }
else if( p_dialog->i_flags & DIALOG_USER_PROGRESS )
{
dialog = new QWidget( 0 );layout = new QVBoxLayout( dialog );
@@ -115,12 +128,6 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
progressBar->setOrientation( Qt::Horizontal );
layout->addWidget( progressBar );
}
- else if( p_dialog->i_flags & DIALOG_INTF_PROGRESS )
- {
- progressBar = p_intf->p_sys->p_mi->pgBar;
- progressBar->show();
- i_ret = 2;
- }
else if( p_dialog->i_flags & DIALOG_PSZ_INPUT_OK_CANCEL )
{
dialog = new QWidget( 0 );layout = new QVBoxLayout( dialog );
@@ -195,15 +202,24 @@ void InteractionDialog::update()
{
assert( progressBar );
progressBar->setValue( (int)( p_dialog->val.f_float * 10 ) );
- description->setText( qfu( p_dialog->psz_description ) );
+ if( description )
+ description->setText( qfu( p_dialog->psz_description ) );
}
+ else return;
if( ( p_dialog->i_flags & DIALOG_INTF_PROGRESS ) &&
( p_dialog->val.f_float >= 100.0 ) )
+ {
progressBar->hide();
+ msg_Dbg( p_intf, "Progress Done" );
+ }
+
if( ( p_dialog->i_flags & DIALOG_USER_PROGRESS ) &&
( p_dialog->val.f_float >= 100.0 ) )
+ {
+ assert( altButton );
altButton->setText( qtr( "&Close" ) );
+ }
}
InteractionDialog::~InteractionDialog()
More information about the vlc-devel
mailing list