changeset 34074:360ed500a6e9

Set all buttons related to seek operations according to stream type. Setting just evSetMoviePosition isn't enough. The check in uiAbsSeek() isn't necessary, because the related button and event are disabled anyway.
author ib
date Fri, 30 Sep 2011 14:33:13 +0000
parents ac52c68c17f5
children b9cab6c0992c
files gui/interface.c gui/ui/actions.c
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Fri Sep 30 14:18:26 2011 +0000
+++ b/gui/interface.c	Fri Sep 30 14:33:13 2011 +0000
@@ -323,6 +323,7 @@
     dvd_priv_t *dvd;
 #endif
     plItem *next;
+    int state;
 
     if (guiInfo.mpcontext)
         mixer = mpctx_get_mixer(guiInfo.mpcontext);
@@ -641,10 +642,14 @@
 
         guiInfo.sh_video = data;
 
-        if (guiInfo.StreamType == STREAMTYPE_STREAM)
-            btnSet(evSetMoviePosition, btnDisabled);
-        else
-            btnSet(evSetMoviePosition, btnReleased);
+        state = (guiInfo.StreamType == STREAMTYPE_STREAM ? btnDisabled : btnReleased);
+        btnSet(evForward10sec, state);
+        btnSet(evBackward10sec, state);
+        btnSet(evForward1min, state);
+        btnSet(evBackward1min, state);
+        btnSet(evForward10min, state);
+        btnSet(evBackward10min, state);
+        btnSet(evSetMoviePosition, state);
 
 #ifdef CONFIG_DXR3
         if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (((demuxer_t *)mpctx_get_demuxer(guiInfo.mpcontext))->file_format != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) {
--- a/gui/ui/actions.c	Fri Sep 30 14:18:26 2011 +0000
+++ b/gui/ui/actions.c	Fri Sep 30 14:33:13 2011 +0000
@@ -112,9 +112,6 @@
 
 void uiAbsSeek(float percent)
 {
-    if (guiInfo.StreamType == STREAMTYPE_STREAM)
-        return;
-
     rel_seek_secs = percent / 100.0;
     abs_seek_pos  = 3;
 }