changeset 33894:b2e63fe7fe17

Remove needless guiInfo member FilenameChanged. Use existing member NewPlay for this, because FilenameChanged and NewPlay == GUI_FILE_NEW mean the same.
author ib
date Fri, 12 Aug 2011 14:09:36 +0000
parents acfe0bf9a847
children 53fd5dbe675b
files gui/interface.c gui/interface.h gui/ui/gtk/fileselect.c gui/ui/gtk/playlist.c gui/ui/gtk/url.c gui/win32/interface.c
diffstat 6 files changed, 9 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Fri Aug 12 13:31:44 2011 +0000
+++ b/gui/interface.c	Fri Aug 12 14:09:36 2011 +0000
@@ -382,8 +382,8 @@
 
     case GUI_SET_FILE:
 
-// if ( guiInfo.Playing == 1 && guiInfo.FilenameChanged )
-        if (guiInfo.FilenameChanged) {
+// if ( guiInfo.Playing == 1 && guiInfo.NewPlay == GUI_FILE_NEW )
+        if (guiInfo.NewPlay == GUI_FILE_NEW) {
             audio_id  = -1;
             video_id  = -1;
             dvdsub_id = -1;
@@ -628,12 +628,11 @@
 
         if (guiInfo.AudioFile)
             audio_stream = gstrdup(guiInfo.AudioFile);
-        else if (guiInfo.FilenameChanged)
+        else if (guiInfo.NewPlay == GUI_FILE_NEW)
             nfree(audio_stream);
 
 // audio_stream = NULL;
 
-        guiInfo.FilenameChanged = 0;
         guiInfo.NewPlay = 0;
 
 #ifdef CONFIG_ASS
@@ -788,12 +787,11 @@
             plLastPlayed = next;
             setddup(&guiInfo.Filename, next->path, next->name);
             guiInfo.StreamType      = STREAMTYPE_FILE;
-            guiInfo.FilenameChanged = 1;
             guiInfo.NewPlay = GUI_FILE_NEW;
             nfree(guiInfo.AudioFile);
             nfree(guiInfo.Subtitlename);
         } else {
-            if (guiInfo.FilenameChanged || (guiInfo.NewPlay == GUI_FILE_NEW))
+            if (guiInfo.NewPlay == GUI_FILE_NEW)
                 break;
 
             guiInfo.TimeSec       = 0;
--- a/gui/interface.h	Fri Aug 12 13:31:44 2011 +0000
+++ b/gui/interface.h	Fri Aug 12 14:09:36 2011 +0000
@@ -129,7 +129,6 @@
     int LengthInSec;
 
     char *Filename;
-    int FilenameChanged;
 
     char *Subtitlename;
 
--- a/gui/ui/gtk/fileselect.c	Fri Aug 12 13:31:44 2011 +0000
+++ b/gui/ui/gtk/fileselect.c	Fri Aug 12 14:09:36 2011 +0000
@@ -491,7 +491,7 @@
    case fsVideoSelector:
           setddup( &guiInfo.Filename,fsSelectedDirectory,fsSelectedFile );
           guiInfo.StreamType=STREAMTYPE_FILE;
-          guiInfo.FilenameChanged=1; sub_fps=0;
+          guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0;
 	  nfree( guiInfo.AudioFile );
 	  nfree( guiInfo.Subtitlename );
           fs_PersistantHistory( get_current_dir_name_utf8() );      //totem, write into history
--- a/gui/ui/gtk/playlist.c	Fri Aug 12 13:31:44 2011 +0000
+++ b/gui/ui/gtk/playlist.c	Fri Aug 12 14:09:36 2011 +0000
@@ -209,7 +209,7 @@
 	 {
 	  uiSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
 //	  setddup( &guiInfo.Filename,plCurrent->path,plCurrent->name );
-//	  guiInfo.FilenameChanged=1;
+//	  guiInfo.NewPlay=GUI_FILE_NEW;
 //	  guiInfo.StreamType=STREAMTYPE_FILE;
 	 }
        }
--- a/gui/ui/gtk/url.c	Fri Aug 12 13:31:44 2011 +0000
+++ b/gui/ui/gtk/url.c	Fri Aug 12 14:09:36 2011 +0000
@@ -103,7 +103,7 @@
      item->url=gstrdup( str );
      listSet( gtkAddURLItem,item );
 
-     setdup( &guiInfo.Filename,str ); guiInfo.FilenameChanged=1;
+     setdup( &guiInfo.Filename,str ); guiInfo.NewPlay=GUI_FILE_NEW;
      uiEventHandling( evPlayNetwork,0 );
     }
   }
--- a/gui/win32/interface.c	Fri Aug 12 13:31:44 2011 +0000
+++ b/gui/win32/interface.c	Fri Aug 12 14:09:36 2011 +0000
@@ -242,7 +242,6 @@
 #endif
                 default:
                 {
-                    guiInfo.FilenameChanged = 1;
                     guiInfo.NewPlay = GUI_FILE_NEW;
                     update_playlistwindow();
                     uiGotoTheNext = guiInfo.Playing? 0 : 1;
@@ -448,7 +447,6 @@
         case GUI_PREPARE:
         {
             gui(GUI_SET_FILE, 0);
-            guiInfo.FilenameChanged = 0;
             guiInfo.NewPlay = 0;
             switch(guiInfo.StreamType)
             {
@@ -657,13 +655,13 @@
               if(movie_aspect >= 0)
                   movie_aspect = -1;
 
-              uiGotoTheNext = guiInfo.FilenameChanged = 1;
+              uiGotoTheNext = 1;
               guiInfo.NewPlay = GUI_FILE_NEW;
               uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_STREAM);
               //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename);
           }
 
-          if(guiInfo.FilenameChanged && (guiInfo.NewPlay == GUI_FILE_NEW))
+          if(guiInfo.NewPlay == GUI_FILE_NEW)
               break;
 
           guiInfo.TimeSec = 0;