]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/gototime.cpp
Missing "
[vlc] / modules / gui / qt4 / dialogs / gototime.cpp
index 04ba9cae42fc2858fb14eba7a8bbe6d6b616af47..e67e63163b29132bb9a7b324c43c9d6a23619e1d 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * GotoTime.cpp : GotoTime and About dialogs
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
- * $Id: Messages.cpp 16024 2006-07-13 13:51:05Z xtophe $
+ * Copyright (C) 2007 the VideoLAN team
+ * $Id$
  *
  * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
  *
  * 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 "util/qvlcframe.hpp"
-#include "qt4.hpp"
 #include "input_manager.hpp"
 
 #include <QTabWidget>
 
 GotoTimeDialog *GotoTimeDialog::instance = NULL;
 
-GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) :  QVLCFrame( _p_intf )
+GotoTimeDialog::GotoTimeDialog( QWidget *parent, intf_thread_t *_p_intf)
+               : QVLCDialog( parent, _p_intf )
 {
     setWindowFlags( Qt::Tool );
-    setWindowTitle( qtr( "Go to Time" ) );
-    resize( 250, 180 );
+    setWindowTitle( qtr( "Go to time" ) );
 
     QGridLayout *mainLayout = new QGridLayout( this );
 
@@ -54,11 +55,10 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) :  QVLCFrame( _p_intf )
     buttonBox->addButton( gotoButton, QDialogButtonBox::AcceptRole );
     buttonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
 
-    QGroupBox *timeGroupBox = new QGroupBox( qtr("Time") );
+    QGroupBox *timeGroupBox = new QGroupBox;
     QGridLayout *boxLayout = new QGridLayout( timeGroupBox );
 
-    QLabel *timeIntro = new
-        QLabel( "Enter below the desired time you want to go in the media." );
+    QLabel *timeIntro = new QLabel( qtr( "Go to time:" ) );
     timeIntro->setWordWrap( true );
     timeIntro->setAlignment( Qt::AlignCenter );
 
@@ -70,11 +70,11 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) :  QVLCFrame( _p_intf )
     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 );
@@ -108,4 +108,5 @@ void GotoTimeDialog::close()
         var_SetTime( THEMIM->getInput(), "time", i_time );
     }
     this->toggleVisible();
+    timeEdit->setTime( QTime( 0, 0, 0) );
 }