[PD-cvs] externals/unauthorized/playlist CHANGES.LOG,1.2,1.3 help-playlist.pd,1.3,1.4 playlist.c,1.6,1.7

Yves Degoyon sevyves at users.sourceforge.net
Mon Jul 19 01:55:29 CEST 2004


Update of /cvsroot/pure-data/externals/unauthorized/playlist
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21216

Modified Files:
	CHANGES.LOG help-playlist.pd playlist.c 
Log Message:
playlist 0.9

Index: CHANGES.LOG
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/playlist/CHANGES.LOG,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CHANGES.LOG	30 Mar 2004 03:59:41 -0000	1.2
--- CHANGES.LOG	18 Jul 2004 23:55:26 -0000	1.3
***************
*** 1,2 ****
--- 1,5 ----
+ 0.9
+   do not output directories ( for clicks and seeks )
+   fixed cut&paste of playlists
  0.8
    added colors and font properties 

Index: playlist.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/playlist/playlist.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** playlist.c	30 Mar 2004 03:59:41 -0000	1.6
--- playlist.c	18 Jul 2004 23:55:27 -0000	1.7
***************
*** 54,58 ****
  static int guidebug=0;
  
! static char   *playlist_version = "playlist: 1 click file chooser : version 0.8, written by Yves Degoyon (ydegoyon at free.fr)";
  
  #define MAX_DIR_LENGTH 2048 // maximum length for a directory name
--- 54,58 ----
  static int guidebug=0;
  
! static char   *playlist_version = "playlist: 1 click file chooser : version 0.9, written by Yves Degoyon (ydegoyon at free.fr)";
  
  #define MAX_DIR_LENGTH 2048 // maximum length for a directory name
***************
*** 240,243 ****
--- 240,250 ----
  {
      // output the selected dir+file
+     // check that it's not a directory 
+     if ( chdir( x->x_dentries[x->x_itemselected] ) == 0 )
+     {
+        chdir( x->x_curdir );
+        return;
+     }
+ 
      if ( x->x_dentries && x->x_itemselected < x->x_nentries && x->x_itemselected >= 0 )
      {
***************
*** 639,643 ****
  t_playlist *playlist_new(t_symbol *s, int argc, t_atom *argv )
  {
!   t_int i;
    t_playlist *x;
    char *tmpcurdir;
--- 646,650 ----
  t_playlist *playlist_new(t_symbol *s, int argc, t_atom *argv )
  {
!   t_int i, argoffset=0;
    t_playlist *x;
    char *tmpcurdir;
***************
*** 709,757 ****
     if ( argc >= 6 )
     {
!       if ( argv[3].a_type != A_SYMBOL || argv[4].a_type != A_FLOAT  || 
             argv[5].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (font : 4,5,6)" );
          return NULL;
        }
!       sprintf( x->x_font, "%s %d %s", argv[3].a_w.w_symbol->s_name, 
!                            (t_int)argv[4].a_w.w_float, argv[5].a_w.w_symbol->s_name );
!       x->x_charheight = (t_int)argv[4].a_w.w_float;
     }
!    if ( argc >= 7 )
     {
!       if ( argv[6].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (background color : 7)" );
          return NULL;
        }
!       strcpy( x->x_bgcolor, argv[6].a_w.w_symbol->s_name );
     }
!    if ( argc >= 8 )
     {
!       if ( argv[7].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (scrollbar color : 8)" );
          return NULL;
        }
!       strcpy( x->x_sbcolor, argv[7].a_w.w_symbol->s_name );
     }
!    if ( argc >= 9 )
     {
!       if ( argv[8].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (foreground color : 9)" );
          return NULL;
        }
!       strcpy( x->x_fgcolor, argv[8].a_w.w_symbol->s_name );
     }
!    if ( argc >= 10 )
     {
!       if ( argv[9].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (selection color : 10)" );
          return NULL;
        }
!       strcpy( x->x_secolor, argv[9].a_w.w_symbol->s_name );
     }
  
--- 716,783 ----
     if ( argc >= 6 )
     {
!       if ( argv[3].a_type != A_SYMBOL || 
             argv[5].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (font : 4,6)" );
!         error( "argument types : %d %d", argv[3].a_type, argv[5].a_type );
          return NULL;
        }
!       if ( argv[4].a_type != A_SYMBOL &&
!            argv[4].a_type != A_FLOAT )
!       {
!         error( "playlist : wrong arguments (font size : 5)" );
!         error( "argument types : %d", argv[4].a_type );
!         return NULL;
!       }
!       if ( argv[4].a_type == A_SYMBOL )
!       {
!         sprintf( x->x_font, "%s", argv[3].a_w.w_symbol->s_name );
!         x->x_charheight = (t_int)atoi( strstr( argv[3].a_w.w_symbol->s_name, " ") );
!         argoffset=2;
!       }
!       if ( argv[4].a_type == A_FLOAT )
!       {
!         x->x_charheight = (t_int)argv[4].a_w.w_float;
!         sprintf( x->x_font, "%s %d %s", argv[3].a_w.w_symbol->s_name, 
!                            x->x_charheight, argv[5].a_w.w_symbol->s_name );
!         argoffset=0;
!       }
!       post( "playlist : font : %s, size : %d", x->x_font, x->x_charheight );
     }
!    if ( argc >= 7-argoffset )
     {
!       if ( argv[6-argoffset].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (background color : %d)", 7-argoffset );
          return NULL;
        }
!       strcpy( x->x_bgcolor, argv[6-argoffset].a_w.w_symbol->s_name );
     }
!    if ( argc >= 8-argoffset )
     {
!       if ( argv[7-argoffset].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (scrollbar color : %d)", 8-argoffset );
          return NULL;
        }
!       strcpy( x->x_sbcolor, argv[7-argoffset].a_w.w_symbol->s_name );
     }
!    if ( argc >= 9-argoffset )
     {
!       if ( argv[8-argoffset].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (foreground color : %d)", 9-argoffset );
          return NULL;
        }
!       strcpy( x->x_fgcolor, argv[8-argoffset].a_w.w_symbol->s_name );
     }
!    if ( argc >= 10-argoffset )
     {
!       if ( argv[9-argoffset].a_type != A_SYMBOL )
        {
!         error( "playlist : wrong arguments (selection color : %d)", 10-argoffset );
          return NULL;
        }
!       strcpy( x->x_secolor, argv[9-argoffset].a_w.w_symbol->s_name );
     }
  
***************
*** 782,786 ****
      // post( "playlist : built extension=%s width=%d height=%d", x->x_extension, x->x_width, x->x_height );
  
!     return (x);
  }
  
--- 808,812 ----
      // post( "playlist : built extension=%s width=%d height=%d", x->x_extension, x->x_width, x->x_height );
  
!    return (x);
  }
  
***************
*** 839,844 ****
     SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", x->x_glist, x, x->x_itemselected, x->x_fgcolor); 
     x->x_itemselected = iout;
!    SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", 
!               x->x_glist, x, x->x_itemselected, x->x_secolor); 
     playlist_output_current(x);
  }
--- 865,869 ----
     SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", x->x_glist, x, x->x_itemselected, x->x_fgcolor); 
     x->x_itemselected = iout;
!    SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", x->x_glist, x, x->x_itemselected, x->x_secolor); 
     playlist_output_current(x);
  }

Index: help-playlist.pd
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/playlist/help-playlist.pd,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** help-playlist.pd	30 Mar 2004 03:59:41 -0000	1.3
--- help-playlist.pd	18 Jul 2004 23:55:27 -0000	1.4
***************
*** 4,13 ****
  #X text 88 107 playlist mp3 200 200;
  #X text 30 78 Examples :;
! #X text 80 454 Comments and bugs @ ydegoyon at free.fr;
  #X symbolatom 292 399 50 0 0 0 - - -;
! #X text 17 342 Note : you can scroll the list by dragging;
! #X text 15 353 the mouse in the yellow area;
! #X text 17 364 You can select and scroll in the blue area;
! #X obj 292 181 playlist all 400 200;
  #X msg 301 84 seek \$1;
  #X text 406 66 You can seek a file in the list;
--- 4,14 ----
  #X text 88 107 playlist mp3 200 200;
  #X text 30 78 Examples :;
! #X text 72 507 Comments and bugs @ ydegoyon at free.fr;
  #X symbolatom 292 399 50 0 0 0 - - -;
! #X text 17 444 Note : you can scroll the list by dragging;
! #X text 15 455 the mouse in the yellow area;
! #X text 17 466 You can select and scroll in the blue area;
! #X obj 292 181 playlist all 400 200 {Helvetica 10 bold} #457782 yellow
! black red;
  #X msg 301 84 seek \$1;
  #X text 406 66 You can seek a file in the list;
***************
*** 21,28 ****
  #X msg 151 163 location ..;
  #X msg 150 140 location /tmp;
! #X text 60 211 You can change change location;
! #X text 60 221 with a message.;
! #X text 60 233 Thus \, you can initialize the object;
! #X text 59 242 in a particular folder.;
  #X msg 151 185 location patches;
  #X msg 299 111 sort \$1;
--- 22,29 ----
  #X msg 151 163 location ..;
  #X msg 150 140 location /tmp;
! #X text 33 212 You can change change location;
! #X text 33 222 with a message.;
! #X text 33 234 Thus \, you can initialize the object;
! #X text 32 243 in a particular folder.;
  #X msg 151 185 location patches;
  #X msg 299 111 sort \$1;
***************
*** 31,37 ****
  #X text 405 109 Use alphabetical or creation time order;
  #X obj 87 140 loadbang;
! #X text 597 135 Change the font;
  #X msg 300 136 font Helvetica normal 14;
! #X msg 458 135 font Courier bold 24;
  #X connect 9 0 5 0;
  #X connect 9 1 17 0;
--- 32,38 ----
  #X text 405 109 Use alphabetical or creation time order;
  #X obj 87 140 loadbang;
! #X text 628 136 Change the font;
  #X msg 300 136 font Helvetica normal 14;
! #X msg 478 136 font Courier bold 24;
  #X connect 9 0 5 0;
  #X connect 9 1 17 0;





More information about the Pd-cvs mailing list