[Mplayer-cvslog] CVS: main/Gui cfg.c,1.32,1.33 interface.c,1.73,1.74 interface.h,1.33,1.34

Zoltan Ponekker pontscho at mplayerhq.hu
Tue Jan 21 14:34:11 CET 2003


Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv6039/Gui

Modified Files:
	cfg.c interface.c interface.h 
Log Message:


- rewrite sub_fps
- add fps support
- rewrite history 


Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- cfg.c	17 Jan 2003 22:50:18 -0000	1.32
+++ cfg.c	21 Jan 2003 13:33:37 -0000	1.33
@@ -230,6 +230,21 @@
   }
  free( cfg );
 
+// -- reade file loader history
+ cfg=get_path( "gui.history" );
+ if ( (f=fopen( cfg,"rt+" )) )
+  {
+   int i = 0;
+   while ( !feof( f ) )
+    {
+     char tmp[512];
+     if ( gfgets( tmp,512,f ) == NULL ) continue;
+     fsHistory[i++]=gstrdup( tmp );
+    }
+   fclose( f );
+  }
+ free( cfg );
+
 #ifdef USE_SETLOCALE
  setlocale( LC_ALL,"" );
 #endif
@@ -311,6 +326,18 @@
      if ( URLList->url ) fprintf( f,"%s\n",URLList->url );
      URLList=URLList->next;
     }
+   fclose( f );
+  }
+ free( cfg );
+
+// -- save file loader history
+ cfg=get_path( "gui.history" );
+ if ( (f=fopen( cfg,"wt+" )) )
+  {
+   int i = 0;
+//   while ( fsHistory[i] != NULL )
+   for ( i=0;i < 5; i++)
+     if( fsHistory[i] ) fprintf( f,"%s\n",fsHistory[i] );
    fclose( f );
   }
  free( cfg );

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- interface.c	17 Jan 2003 22:39:38 -0000	1.73
+++ interface.c	21 Jan 2003 13:33:37 -0000	1.74
@@ -597,7 +597,8 @@
 #endif
 	break;
    case guiSetDefaults:
-        if ( guiIntfStruct.Playing == 1 && guiIntfStruct.FilenameChanged )
+//        if ( guiIntfStruct.Playing == 1 && guiIntfStruct.FilenameChanged )
+	if ( guiIntfStruct.FilenameChanged )
          {
           audio_id=-1;
 	  video_id=-1;
@@ -607,10 +608,12 @@
 	  autosync=0;
 	  vcd_track=0;
 	  dvd_title=0;
+	  force_fps=0;
 	 }				
 	wsPostRedisplay( &appMPlayer.subWindow );
 	break;
    case guiSetParameters:
+        guiGetEvent( guiSetDefaults,NULL );
         switch ( guiIntfStruct.StreamType ) 
          {
 	  case STREAMTYPE_PLAYLIST:
@@ -753,6 +756,8 @@
 plItem * plLastPlayed = NULL;
 
 URLItem *URLList = NULL;
+
+char    *fsHistory[fsPersistant_MaxPos] = { NULL,NULL,NULL,NULL,NULL };
 
 #if defined( MP_DEBUG ) && 0
 void list( void )

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- interface.h	11 Dec 2002 01:21:08 -0000	1.33
+++ interface.h	21 Jan 2003 13:33:37 -0000	1.34
@@ -169,6 +169,10 @@
 
 extern URLItem * URLList;
 
+#define fsPersistant_MaxPath 512
+#define fsPersistant_MaxPos 5
+extern char * fsHistory[fsPersistant_MaxPos];
+
 #define gtkSetContrast       0
 #define gtkSetBrightness     1
 #define gtkSetHue	     2



More information about the MPlayer-cvslog mailing list