[vlc-commits] [Git][videolan/vlc][master] qt: disable Go when seeking is unavailable

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Tue Oct 6 08:43:46 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
e041ea8e by Mohak Malviya at 2026-10-06T10:06:39+02:00
qt: disable Go when seeking is unavailable

Keep the Go to Time dialog available and update its Go button when
playback state or seekability changes. Leave the dialog open when
playback stops or the media changes, preserving the entered time.

Check the current state again before seeking.

Fixes #17188

- - - - -


1 changed file:

- modules/gui/qt/dialogs/gototime/gototime.cpp


Changes:

=====================================
modules/gui/qt/dialogs/gototime/gototime.cpp
=====================================
@@ -75,6 +75,15 @@ GotoTimeDialog::GotoTimeDialog( qt_intf_t *_p_intf)
 
     BUTTONACT( resetButton, &GotoTimeDialog::reset );
 
+    const auto updateAvailability = [this, gotoButton]() {
+        gotoButton->setEnabled( THEMIM->isStarted() && THEMIM->isSeekable() );
+    };
+    updateAvailability();
+    connect( THEMIM, &PlayerController::playingStateChanged,
+             this, updateAvailability );
+    connect( THEMIM, &PlayerController::seekableChanged,
+             this, updateAvailability );
+
     QVLCTools::restoreWidgetPosition( p_intf, "gototimedialog", this );
 }
 
@@ -104,11 +113,11 @@ void GotoTimeDialog::reject()
 
 void GotoTimeDialog::accept()
 {
-    if ( THEMIM->hasInput() )
-    {
-        int i_time = QTime( 0, 0, 0 ).msecsTo( timeEdit->time() );
-        THEMIM->setTime( VLC_TICK_FROM_MS(i_time) );
-    }
+    if ( !THEMIM->isStarted() || !THEMIM->isSeekable() )
+        return;
+
+    int i_time = QTime( 0, 0, 0 ).msecsTo( timeEdit->time() );
+    THEMIM->setTime( VLC_TICK_FROM_MS(i_time) );
 
     QVLCDialog::accept();
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e041ea8e5a41449fed2f582b6b2e26dc721db819

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e041ea8e5a41449fed2f582b6b2e26dc721db819
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list