/*****************************************************************************
* GotoTime.cpp : GotoTime and About dialogs
****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2007 the VideoLAN team
* $Id: Messages.cpp 16024 2006-07-13 13:51:05Z xtophe $
*
* Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
{
+ setWindowFlags( Qt::Tool );
setWindowTitle( qtr( "Go to Time" ) );
- resize( 250, 180 );
+ resize( 260, 160 );
QGridLayout *mainLayout = new QGridLayout( this );
QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
QDialogButtonBox *buttonBox = new QDialogButtonBox;
+ gotoButton->setDefault( true );
buttonBox->addButton( gotoButton, QDialogButtonBox::AcceptRole );
buttonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
- QGroupBox *timeGroupBox = new QGroupBox( "Time" );
+ QGroupBox *timeGroupBox = new QGroupBox( qtr("Time") );
QGridLayout *boxLayout = new QGridLayout( timeGroupBox );
QLabel *timeIntro = new
QSpacerItem *spacerBox = new QSpacerItem(20, 10, QSizePolicy::Minimum,
QSizePolicy::Fixed);
- QSpacerItem *spacerItem = new QSpacerItem(20, 5, QSizePolicy::Minimum,
+ QSpacerItem *spacerItem = new QSpacerItem(20, 3, QSizePolicy::Minimum,
QSizePolicy::Expanding);
boxLayout->addWidget( timeIntro, 0, 0, 1, 2 );
void GotoTimeDialog::close()
{
- vlc_value_t val;
-
if ( THEMIM->getIM()->hasInput() )
{
- val.i_time = QTime( 0, 0, 0 ).msecsTo( timeEdit->time() );
- var_Set( THEMIM->getInput(), "time", val );
+ int64_t i_time = (int64_t)
+ ( QTime( 0, 0, 0 ).msecsTo( timeEdit->time() ) ) * 1000;
+ var_SetTime( THEMIM->getInput(), "time", i_time );
}
this->toggleVisible();
}