changeset 35571:29761b2b8cb0

Reset media information while changing tracks in stop mode.
author ib
date Tue, 11 Dec 2012 13:48:19 +0000
parents ca631388b039
children 0827fa4c3401
files gui/ui/actions.c
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Tue Dec 11 13:44:31 2012 +0000
+++ b/gui/ui/actions.c	Tue Dec 11 13:48:19 2012 +0000
@@ -358,8 +358,8 @@
  */
 void uiPrev(void)
 {
-    int stop = False;
-    plItem *prev;
+    int stop = False, unset = True;
+    plItem *prev = NULL;
 
     if (guiInfo.Playing == GUI_PAUSE)
         return;
@@ -392,7 +392,8 @@
                 guiInfo.Track = 1;
                 stop = True;
             }
-        }
+        } else
+            unset = False;
 
         break;
 
@@ -415,6 +416,8 @@
 
     if (guiInfo.Playing == GUI_PLAY)
         uiEventHandling(evPlay, 0);
+    else if (!stop && !prev && unset)
+        uiUnsetMedia(True);
 }
 
 /**
@@ -422,8 +425,8 @@
  */
 void uiNext(void)
 {
-    int stop = False;
-    plItem *next;
+    int stop = False, unset = True;
+    plItem *next = NULL;
 
     if (guiInfo.Playing == GUI_PAUSE)
         return;
@@ -449,7 +452,8 @@
                 guiInfo.Chapter = guiInfo.Chapters;
                 stop = True;
             }
-        }
+        } else
+            unset = False;
 
         break;
 
@@ -472,4 +476,6 @@
 
     if (guiInfo.Playing == GUI_PLAY)
         uiEventHandling(evPlay, 0);
+    else if (!stop && !next && unset)
+        uiUnsetMedia(True);
 }