changeset 36936:9afababf229e

Cosmetic: Rename symbolic constants GUI_FILE_SAME and GUI_FILE_NEW. They aren't restricted to files but apply to all media, so change FILE to MEDIUM.
author ib
date Fri, 21 Mar 2014 15:01:48 +0000
parents c666dcd51d10
children ad939f49bb28
files gui/dialog/fileselect.c gui/dialog/playlist.c gui/dialog/url.c gui/interface.c gui/interface.h gui/ui/actions.c gui/win32/interface.c mplayer.c
diffstat 8 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/fileselect.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/dialog/fileselect.c	Fri Mar 21 15:01:48 2014 +0000
@@ -478,7 +478,7 @@
             g_free(selected);
         }
 
-        guiInfo.NewPlay = GUI_FILE_NEW;
+        guiInfo.NewPlay = GUI_MEDIUM_NEW;
         sub_fps = 0;
         fs_PersistantHistory(fsSelectedDirectory);
         break;
--- a/gui/dialog/playlist.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/dialog/playlist.c	Fri Mar 21 15:01:48 2014 +0000
@@ -166,7 +166,7 @@
 	  if ( item )
 	   {
 	    uiSetFile( item->path,item->name,STREAMTYPE_FILE );
-	    guiInfo.NewPlay = GUI_FILE_NEW;
+	    guiInfo.NewPlay = GUI_MEDIUM_NEW;
 	    guiInfo.PlaylistNext = !guiInfo.Playing;
 	    guiInfo.Track = 1;
 	   }
--- a/gui/dialog/url.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/dialog/url.c	Fri Mar 21 15:01:48 2014 +0000
@@ -81,7 +81,7 @@
                     listMgr(URLLIST_ITEM_ADD, item);
                 }
 
-                guiInfo.NewPlay = GUI_FILE_NEW;
+                guiInfo.NewPlay = GUI_MEDIUM_NEW;
                 uiEvent(evPlay, 0);
             }
         }
--- a/gui/interface.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/interface.c	Fri Mar 21 15:01:48 2014 +0000
@@ -404,7 +404,7 @@
         usec_sleep(20000);
         wsEvents();
 
-        if (guiInfo.NewPlay == GUI_FILE_NEW) {
+        if (guiInfo.NewPlay == GUI_MEDIUM_NEW) {
             audio_id  = -1;
             video_id  = -1;
             dvdsub_id = -1;
@@ -593,7 +593,7 @@
 
         if (guiInfo.AudioFilename)
             audio_stream = gstrdup(guiInfo.AudioFilename);
-        else if (guiInfo.NewPlay == GUI_FILE_NEW)
+        else if (guiInfo.NewPlay == GUI_MEDIUM_NEW)
             nfree(audio_stream);
 
 // audio_stream = NULL;
@@ -807,10 +807,10 @@
 
         if (next) {
             uiSetFile(next->path, next->name, STREAMTYPE_FILE);
-            guiInfo.NewPlay = GUI_FILE_NEW;
+            guiInfo.NewPlay = GUI_MEDIUM_NEW;
             guiInfo.Track   = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
         } else {
-            if (guiInfo.NewPlay == GUI_FILE_NEW)
+            if (guiInfo.NewPlay == GUI_MEDIUM_NEW)
                 break;
 
             filename = NULL;
--- a/gui/interface.h	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/interface.h	Fri Mar 21 15:01:48 2014 +0000
@@ -69,8 +69,8 @@
 
 //@{
 /// NewPlay reason
-#define GUI_FILE_SAME 1
-#define GUI_FILE_NEW  2
+#define GUI_MEDIUM_SAME 1
+#define GUI_MEDIUM_NEW  2
 //@}
 
 /// mplayer() instructions
--- a/gui/ui/actions.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/ui/actions.c	Fri Mar 21 15:01:48 2014 +0000
@@ -199,7 +199,7 @@
                 if (!guiInfo.Track)
                     guiInfo.Track = 1;
 
-                guiInfo.NewPlay      = GUI_FILE_NEW;
+                guiInfo.NewPlay      = GUI_MEDIUM_NEW;
                 guiInfo.PlaylistNext = !guiInfo.Playing;
 
                 break;
@@ -213,7 +213,7 @@
                 if (!guiInfo.Track)
                     guiInfo.Track = (guiInfo.StreamType == STREAMTYPE_VCD ? 2 : 1);
 
-                guiInfo.NewPlay = GUI_FILE_SAME;
+                guiInfo.NewPlay = GUI_MEDIUM_SAME;
 
                 break;
             }
--- a/gui/win32/interface.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/gui/win32/interface.c	Fri Mar 21 15:01:48 2014 +0000
@@ -212,7 +212,7 @@
             guiInfo.Track = 1;
             guiInfo.Chapter = 1;
             guiInfo.Angle = 1;
-            guiInfo.NewPlay = GUI_FILE_SAME;
+            guiInfo.NewPlay = GUI_MEDIUM_SAME;
 
 #ifdef __WINE__
             // dvd_device is in the Windows style (D:\), which needs to be
@@ -356,13 +356,13 @@
             {
                 case STREAMTYPE_DVD:
                 {
-                    guiInfo.NewPlay = GUI_FILE_SAME;
+                    guiInfo.NewPlay = GUI_MEDIUM_SAME;
                     gui(GUI_SET_STATE, (void *) GUI_PLAY);
                     break;
                 }
                 default:
                 {
-                    guiInfo.NewPlay = GUI_FILE_NEW;
+                    guiInfo.NewPlay = GUI_MEDIUM_NEW;
                     update_playlistwindow();
                     guiInfo.PlaylistNext = guiInfo.Playing? 0 : 1;
                     gui(GUI_SET_STATE, (void *) GUI_STOP);
@@ -391,7 +391,7 @@
        uiPause();
        return;
    }
-   guiInfo.NewPlay = GUI_FILE_NEW;
+   guiInfo.NewPlay = GUI_MEDIUM_NEW;
    gui(GUI_SET_STATE, (void *) GUI_PLAY);
 }
 
@@ -779,12 +779,12 @@
                   movie_aspect = -1;
 
               guiInfo.PlaylistNext = TRUE;
-              guiInfo.NewPlay = GUI_FILE_NEW;
+              guiInfo.NewPlay = GUI_MEDIUM_NEW;
               uiSetFile(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_FILE);
               //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename);
           }
 
-          if(guiInfo.NewPlay == GUI_FILE_NEW)
+          if(guiInfo.NewPlay == GUI_MEDIUM_NEW)
               break;
 
           guiInfo.ElapsedTime = 0;
--- a/mplayer.c	Fri Mar 21 14:51:39 2014 +0000
+++ b/mplayer.c	Fri Mar 21 15:01:48 2014 +0000
@@ -4139,7 +4139,7 @@
 
 #ifdef CONFIG_GUI
     if (use_gui)
-        if (guiInfo.NewPlay != GUI_FILE_SAME)
+        if (guiInfo.NewPlay != GUI_MEDIUM_SAME)
             gui(GUI_END_FILE, 0);
 #endif