* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "dialogs/gototime.hpp"
-#include "dialogs_provider.hpp"
-#include "main_interface.hpp"
#include "input_manager.hpp"
#include <QTabWidget>
-#include <QFile>
#include <QLabel>
#include <QTimeEdit>
#include <QGroupBox>
#include <QDialogButtonBox>
+#include <QPushButton>
-GotoTimeDialog *GotoTimeDialog::instance = NULL;
-
-GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
+GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf)
+ : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
setWindowFlags( Qt::Tool );
- setWindowTitle( qtr( "Go to time" ) );
+ setWindowTitle( qtr( "Go to Time" ) );
+ setWindowRole( "vlc-goto-time" );
QGridLayout *mainLayout = new QGridLayout( this );
+ mainLayout->setSizeConstraint( QLayout::SetFixedSize );
QPushButton *gotoButton = new QPushButton( qtr( "&Go" ) );
QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
QGroupBox *timeGroupBox = new QGroupBox;
QGridLayout *boxLayout = new QGridLayout( timeGroupBox );
- QLabel *timeIntro = new QLabel( qtr( "Go to time:" ) );
+ QLabel *timeIntro = new QLabel( qtr( "Go to time" ) + ":" );
timeIntro->setWordWrap( true );
timeIntro->setAlignment( Qt::AlignCenter );
QLabel *helpFormat = new QLabel( timeEdit->displayFormat() );
helpFormat->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
- QSpacerItem *spacerBox = new QSpacerItem(20, 10, QSizePolicy::Minimum,
- QSizePolicy::Fixed);
+ QSpacerItem *spacerBox = new QSpacerItem( 20, 10, QSizePolicy::Minimum,
+ QSizePolicy::Fixed );
- QSpacerItem *spacerItem = new QSpacerItem(20, 3, QSizePolicy::Minimum,
- QSizePolicy::Expanding);
+ QSpacerItem *spacerItem = new QSpacerItem( 20, 3, QSizePolicy::Minimum,
+ QSizePolicy::Expanding );
boxLayout->addWidget( timeIntro, 0, 0, 1, 2 );
boxLayout->addItem( spacerBox, 1, 0, 1, 2 );
void GotoTimeDialog::cancel()
{
timeEdit->setTime( QTime( 0, 0, 0) );
- this->toggleVisible();
+ toggleVisible();
}
void GotoTimeDialog::close()
( QTime( 0, 0, 0 ).msecsTo( timeEdit->time() ) ) * 1000;
var_SetTime( THEMIM->getInput(), "time", i_time );
}
- this->toggleVisible();
+ toggleVisible();
timeEdit->setTime( QTime( 0, 0, 0) );
- THEMIM->getIM()->update();
}