Qt4 - Goto Time, IA
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 1 Apr 2007 16:29:04 +0000 (16:29 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 1 Apr 2007 16:29:04 +0000 (16:29 +0000)
modules/gui/qt4/dialogs/gototime.cpp
modules/gui/qt4/dialogs/gototime.hpp

index 78f54f3..e3fed0d 100644 (file)
 #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>
 #include <QFile>
@@ -89,8 +91,20 @@ GotoTimeDialog::~GotoTimeDialog()
 {
 }
 
+void GotoTimeDialog::cancel()
+{
+    timeEdit->setTime( QTime( 0, 0, 0) );
+    this->toggleVisible();
+}
+
 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 );
+    }
     this->toggleVisible();
 }
index d5ca3b1..0d18793 100644 (file)
@@ -45,6 +45,7 @@ private:
     static GotoTimeDialog *instance;
 public slots:
     void close();
+    void cancel();
 };
 
 #endif