[PD-cvs] pd/src g_editor.c, 1.8, 1.9 g_graph.c, 1.7, 1.8 makefile.nt, 1.4, 1.5 notes.txt, 1.13, 1.14 s_file.c, 1.5, 1.6 s_main.c, 1.12, 1.13 s_midi.c, 1.5, 1.6 s_midi_pm.c, 1.5, 1.6 u_main.tk, 1.11, 1.12

Miller Puckette millerpuckette at users.sourceforge.net
Fri Jul 8 02:02:48 CEST 2005


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26832/pd/src

Modified Files:
	g_editor.c g_graph.c makefile.nt notes.txt s_file.c s_main.c 
	s_midi.c s_midi_pm.c u_main.tk 
Log Message:
Bug fixes: took out some unwanted "red rectangle" apparitions when making
arrays on new canvases; got the array dialog to come back; made graphical
updating a bit more reliable.

Tested and fixed a couple of problems on Mac and Windoes.



Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** notes.txt	2 Jul 2005 05:03:06 -0000	1.13
--- notes.txt	8 Jul 2005 00:02:44 -0000	1.14
***************
*** 16,19 ****
--- 16,27 ----
  
  ------------ 0.39 ---------
+ problems:
+ array dimension change gives TK erro (doesn't update)
+ throwing new array on canvas makes red rectangle?
+ dialog doesn't start array dialog, just canvas one
+ arrays that don't fit in bounds don't update (same as red rectangle problem?)
+ 
+ 
+ flag for array to suppress printing name
  
  check:

Index: g_graph.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** g_graph.c	2 Jul 2005 05:03:06 -0000	1.7
--- g_graph.c	8 Jul 2005 00:02:44 -0000	1.8
***************
*** 40,44 ****
      if (x->gl_editor && (ob = pd_checkobject(&y->g_pd)))
          rtext_new(x, ob);
!     if (x->gl_editor && x->gl_isgraph && !x->gl_goprect)
      {
          x->gl_goprect = 1;
--- 40,45 ----
      if (x->gl_editor && (ob = pd_checkobject(&y->g_pd)))
          rtext_new(x, ob);
!     if (x->gl_editor && x->gl_isgraph && !x->gl_goprect
!         && pd_checkobject(&y->g_pd))
      {
          x->gl_goprect = 1;
***************
*** 1060,1065 ****
  }
  
- void garray_properties(t_garray *x);
- 
  t_widgetbehavior graph_widgetbehavior =
  {
--- 1061,1064 ----

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** s_main.c	30 May 2005 03:04:19 -0000	1.12
--- s_main.c	8 Jul 2005 00:02:45 -0000	1.13
***************
*** 3,7 ****
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
  
! char pd_version[] = "Pd version 0.39 TEST 2\n";
  char pd_compiletime[] = __TIME__;
  char pd_compiledate[] = __DATE__;
--- 3,7 ----
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
  
! char pd_version[] = "Pd version 0.39 TEST 3\n";
  char pd_compiletime[] = __TIME__;
  char pd_compiledate[] = __DATE__;

Index: s_file.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_file.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** s_file.c	30 May 2005 03:04:18 -0000	1.5
--- s_file.c	8 Jul 2005 00:02:45 -0000	1.6
***************
*** 271,276 ****
          && sscanf(prefbuf, "%d", &api) > 0)
              sys_set_audio_api(api);
!     if (sys_getpreference("noaudioin", prefbuf, MAXPDSTRING))
!         naudioindev = 0;
      else
      {
--- 271,277 ----
          && sscanf(prefbuf, "%d", &api) > 0)
              sys_set_audio_api(api);
!     if (sys_getpreference("noaudioin", prefbuf, MAXPDSTRING) &&
!         !strcmp(prefbuf, ".") || !strcmp(prefbuf, "True"))
!             naudioindev = 0;
      else
      {
***************
*** 288,293 ****
              naudioindev = -1;
      }
!     if (sys_getpreference("noaudioout", prefbuf, MAXPDSTRING))
!         naudiooutdev = 0;
      else
      {
--- 289,295 ----
              naudioindev = -1;
      }
!     if (sys_getpreference("noaudioout", prefbuf, MAXPDSTRING) &&
!         !strcmp(prefbuf, ".") || !strcmp(prefbuf, "True"))
!             naudiooutdev = 0;
      else
      {
***************
*** 312,317 ****
          
          /* load MIDI preferences */
!     if (sys_getpreference("nomidiin", prefbuf, MAXPDSTRING))
!         nmidiindev = 0;
      else for (i = 0, nmidiindev = 0; i < MAXMIDIINDEV; i++)
      {
--- 314,320 ----
          
          /* load MIDI preferences */
!     if (sys_getpreference("nomidiin", prefbuf, MAXPDSTRING) &&
!         !strcmp(prefbuf, ".") || !strcmp(prefbuf, "True"))
!             nmidiindev = 0;
      else for (i = 0, nmidiindev = 0; i < MAXMIDIINDEV; i++)
      {
***************
*** 323,328 ****
          nmidiindev++;
      }
!     if (sys_getpreference("nomidiout", prefbuf, MAXPDSTRING))
!         nmidioutdev = 0;
      else for (i = 0, nmidioutdev = 0; i < MAXMIDIOUTDEV; i++)
      {
--- 326,332 ----
          nmidiindev++;
      }
!     if (sys_getpreference("nomidiout", prefbuf, MAXPDSTRING) &&
!         !strcmp(prefbuf, ".") || !strcmp(prefbuf, "True"))
!             nmidioutdev = 0;
      else for (i = 0, nmidioutdev = 0; i < MAXMIDIOUTDEV; i++)
      {
***************
*** 398,403 ****
          &naudiooutdev, audiooutdev, choutdev, &rate, &advance);
  
!     if (naudioindev <= 0)
!         sys_putpreference("noaudioin", ".");
      for (i = 0; i < naudioindev; i++)
      {
--- 402,406 ----
          &naudiooutdev, audiooutdev, choutdev, &rate, &advance);
  
!     sys_putpreference("noaudioin", (naudioindev <= 0 ? "True" : "False"));
      for (i = 0; i < naudioindev; i++)
      {
***************
*** 406,411 ****
          sys_putpreference(buf1, buf2);
      }
!     if (naudiooutdev <= 0)
!         sys_putpreference("noaudioout", ".");
      for (i = 0; i < naudiooutdev; i++)
      {
--- 409,413 ----
          sys_putpreference(buf1, buf2);
      }
!     sys_putpreference("noaudioout", (naudiooutdev <= 0 ? "True" : "False"));
      for (i = 0; i < naudiooutdev; i++)
      {
***************
*** 423,428 ****
          /* MIDI settings */
      sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);
!     if (nmidiindev <= 0)
!         sys_putpreference("nomidiin", ".");
      for (i = 0; i < nmidiindev; i++)
      {
--- 425,429 ----
          /* MIDI settings */
      sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);
!     sys_putpreference("nomidiin", (nmidiindev <= 0 ? "True" : "False"));
      for (i = 0; i < nmidiindev; i++)
      {
***************
*** 431,436 ****
          sys_putpreference(buf1, buf2);
      }
!     if (nmidioutdev <= 0)
!         sys_putpreference("nomidiout", ".");
      for (i = 0; i < nmidioutdev; i++)
      {
--- 432,436 ----
          sys_putpreference(buf1, buf2);
      }
!     sys_putpreference("nomidiout", (nmidioutdev <= 0 ? "True" : "False"));
      for (i = 0; i < nmidioutdev; i++)
      {

Index: makefile.nt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.nt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** makefile.nt	2 Jul 2005 05:03:06 -0000	1.4
--- makefile.nt	8 Jul 2005 00:02:44 -0000	1.5
***************
*** 21,25 ****
  
  SYSSRC = s_audio_pa.c s_audio_pablio.c s_audio_paring.c \
!     s_audio_mmio.c s_midi_mmio.c
  
  SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
--- 21,25 ----
  
  SYSSRC = s_audio_pa.c s_audio_pablio.c s_audio_paring.c \
!     s_audio_mmio.c s_midi_pm.c
  
  SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
***************
*** 55,60 ****
  SRCASIO = $(PADIR)/pa_asio/pa_asio.cpp 
  
! ASIOLIB = $(LDIR)\user32.lib $(LDIR)\gdi32.lib $(LDIR)\winspool.lib $(LDIR)\comdlg32.lib \
! $(LDIR)\advapi32.lib $(LDIR)\shell32.lib $(LDIR)\ole32.lib $(LDIR)\oleaut32.lib $(LDIR)\uuid.lib \
  $(LDIR)\odbc32.lib $(LDIR)\odbccp32.lib ..\lib\asio\asiolib.lib
  
--- 55,61 ----
  SRCASIO = $(PADIR)/pa_asio/pa_asio.cpp 
  
! ASIOLIB = $(LDIR)\user32.lib $(LDIR)\gdi32.lib $(LDIR)\winspool.lib \
! $(LDIR)\comdlg32.lib $(LDIR)\advapi32.lib $(LDIR)\shell32.lib \
! $(LDIR)\ole32.lib $(LDIR)\oleaut32.lib $(LDIR)\uuid.lib \
  $(LDIR)\odbc32.lib $(LDIR)\odbccp32.lib ..\lib\asio\asiolib.lib
  
***************
*** 65,70 ****
  	pa_win_wmme.obj
  
  
! OBJC = $(SRC:.c=.obj) $(PAOBJ)
  
  GSRC =  t_main.c t_tkcmd.c
--- 66,81 ----
  	pa_win_wmme.obj
  
+ PMDIR = ..\portmidi
+ INCPM = -I$(PMDIR)\pm_common -I$(PMDIR)\pm_win -I$(PMDIR)\porttime
+ SRCPM = $(PADIR)/pm_common/portmidi.c \
+         $(PMDIR)/pm_common/pmutil.c \
+         $(PMDIR)/porttime/porttime.c \
+         $(PMDIR)/porttime/ptwinmm.c \
+         $(PMDIR)/pm_win/pmwin.c \
+         $(PMDIR)/pm_win/pmwinmm.c
+ 
+ PMOBJ = portmidi.obj pmutil.obj porttime.obj ptwinmm.obj pmwin.obj pmwinmm.obj
  
! OBJC = $(SRC:.c=.obj) $(PAOBJ) $(PMOBJ)
  
  GSRC =  t_main.c t_tkcmd.c
***************
*** 73,77 ****
  .PHONY: pd gui
  
! ALLCF = $(CFLAGS)  $(INCLUDE) $(INCASIO) $(INCPA) $(INCPM) /D_WINDOWS /DPA_NO_DS
  
  .c.obj:
--- 84,89 ----
  .PHONY: pd gui
  
! ALLCF = $(CFLAGS)  $(INCLUDE) $(INCASIO) $(INCPA) $(INCPM) /D_WINDOWS \
!     /DPA_NO_DS
  
  .c.obj:
***************
*** 101,106 ****
  
  ..\bin\pdreceive.exe: u_pdreceive.obj
! 	link $(LFLAGS) /out:..\bin\pdreceive.exe /INCREMENTAL:NO u_pdreceive.obj \
! 	    $(LIB)
  
  # explicit rules to compile portaudio sources:
--- 113,118 ----
  
  ..\bin\pdreceive.exe: u_pdreceive.obj
! 	link $(LFLAGS) /out:..\bin\pdreceive.exe /INCREMENTAL:NO \
! 	    u_pdreceive.obj $(LIB)
  
  # explicit rules to compile portaudio sources:
***************
*** 133,136 ****
--- 145,161 ----
  	cl /c $(ALLCF) $(PADIR)\pa_asio\pa_asio.cpp
  
+ portmidi.obj: $(PMDIR)\pm_common\portmidi.c
+ 	cl /c $(ALLCF) $(PMDIR)\pm_common\portmidi.c
+ pmutil.obj: $(PMDIR)\pm_common\pmutil.c
+ 	cl /c $(ALLCF) $(PMDIR)\pm_common\pmutil.c
+ pmwin.obj: $(PMDIR)\pm_win\pmwin.c
+ 	cl /c $(ALLCF) $(PMDIR)\pm_win\pmwin.c
+ pmwinmm.obj: $(PMDIR)\pm_win\pmwinmm.c
+ 	cl /c $(ALLCF) $(PMDIR)\pm_win\pmwinmm.c
+ porttime.obj: $(PMDIR)\porttime\porttime.c
+ 	cl /c $(ALLCF) $(PMDIR)\porttime\porttime.c
+ ptwinmm.obj: $(PMDIR)\porttime\ptwinmm.c
+ 	cl /c $(ALLCF) $(PMDIR)\porttime\ptwinmm.c
+ 
  # the following should also clean up "bin" but it doesn't because "bin" holds
  # precious stuff from elsewhere.

Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** g_editor.c	2 Jul 2005 05:03:06 -0000	1.8
--- g_editor.c	8 Jul 2005 00:02:44 -0000	1.9
***************
*** 854,857 ****
--- 854,859 ----
  }
  
+ void garray_properties(t_garray *x);
+ 
      /* tell GUI to create a properties dialog on the canvas.  We tell
      the user the negative of the "pixel" y scale to make it appear to grow
***************
*** 859,862 ****
--- 861,865 ----
  void canvas_properties(t_glist *x)
  {
+     t_gobj *y;
      char graphbuf[200];
      if (glist_isgraph(x) != 0)
***************
*** 876,879 ****
--- 879,886 ----
                  (int)x->gl_xmargin, (int)x->gl_ymargin);
      gfxstub_new(&x->gl_pd, x, graphbuf);
+         /* if any arrays are in the graph, put out their dialogs too */
+     for (y = x->gl_list; y; y = y->g_next)
+         if (pd_class(&y->g_pd) == garray_class) 
+             garray_properties((t_garray *)y);
  }
  
***************
*** 947,951 ****
          /* LATER avoid doing 2 redraws here (possibly one inside setgraph) */
      canvas_setgraph(x, graphme, 0);
!     canvas_redraw(x);
  }
  
--- 954,960 ----
          /* LATER avoid doing 2 redraws here (possibly one inside setgraph) */
      canvas_setgraph(x, graphme, 0);
!     if (x->gl_havewindow)
!         canvas_redraw(x);
!     else gobj_redraw(&x->gl_gobj, x->gl_owner);
  }
  

Index: s_midi_pm.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_midi_pm.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** s_midi_pm.c	30 May 2005 03:04:19 -0000	1.5
--- s_midi_pm.c	8 Jul 2005 00:02:45 -0000	1.6
***************
*** 38,53 ****
      Pt_Start(1, 0, 0); /* start a timer with millisecond accuracy */
  
-         /* protect the unwary from having MIDI inputs open; they're
-         bad news if you close Pd's terminal window.  see sys_nmidiin
-         in s_main.c too. */
- #ifdef MSW
-     if (nmidiin)
-     {
-         post(
-          "midi input enabled; warning, don't close the DOS window directly!");
-     }
-     else post("not using MIDI input (use 'pd -midiindev 1' to override)");
- #endif
- 
      mac_nmidiindev = 0;
      for (i = 0; i < nmidiin; i++)
--- 38,41 ----

Index: s_midi.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_midi.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** s_midi.c	6 Nov 2004 16:07:34 -0000	1.5
--- s_midi.c	8 Jul 2005 00:02:45 -0000	1.6
***************
*** 508,516 ****
  #define DEVDESCSIZE 80
  
- #ifdef MSW
- #define DEVONSET 0  /* microsoft device list starts at 0 (the "mapper"). */
- #else               /* (see also MSW ifdef in sys_parsedevlist(), s_main.c)  */
  #define DEVONSET 1  /* To agree with command line flags, normally start at 1 */
- #endif
  
  void sys_listmididevs(void )
--- 508,512 ----

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** u_main.tk	2 Jul 2005 05:03:06 -0000	1.11
--- u_main.tk	8 Jul 2005 00:02:45 -0000	1.12
***************
*** 103,124 ****
      .mbar add cascade -label "Windows" -menu .mbar.windows
      .mbar add cascade -label "Media" -menu .mbar.audio
! # a menu on the main menubar named $whatever.help while be treated
! # as a special menu with specific behaviors on different platforms.
! # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
! 	 menu .mbar.help -tearoff $pd_tearoff
! 	 .mbar add cascade -label "Help" -menu .mbar.help
  } else {
! 	 menu .mbar.apple -tearoff 0
! 	 .mbar add cascade -label "Apple" -menu .mbar.apple 
  # arrange menus according to Apple HIG
      .mbar add cascade -label "Media" -menu .mbar.audio
      .mbar add cascade -label "Window" -menu .mbar.windows
! # a menu on the main menubar named "$whatever.help" while be treated
! # as a special menu with specific behaviors on different platforms.
! # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
! # Apple doesn't allow cascading menus in their Help so I had to call this 
! # one $mbar.docs # <hans at at.or.at>
! 	 menu .mbar.docs -tearoff $pd_tearoff
! 	 .mbar add cascade -label "Help" -menu .mbar.docs
  }
  
--- 103,116 ----
      .mbar add cascade -label "Windows" -menu .mbar.windows
      .mbar add cascade -label "Media" -menu .mbar.audio
!     menu .mbar.help -tearoff $pd_tearoff
!     .mbar add cascade -label "Help" -menu .mbar.help
  } else {
!     menu .mbar.apple -tearoff 0
!     .mbar add cascade -label "Apple" -menu .mbar.apple 
  # arrange menus according to Apple HIG
      .mbar add cascade -label "Media" -menu .mbar.audio
      .mbar add cascade -label "Window" -menu .mbar.windows
!     menu .mbar.help -tearoff $pd_tearoff
!     .mbar add cascade -label "Help" -menu .mbar.help
  }
  
***************
*** 507,535 ****
  
  
! #          the "Help" menu
! 	 if {$pd_nt != 2} {
! # a menu on the main menubar named "$whatever.help" while be treated
! # as a special menu with specific behaviors on different platforms.
! # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
!     $mbar.help add command -label {About Pd} \
! 	-command {menu_doc_open doc/1.manual 1.introduction.txt} 
!     $mbar.help add command -label {Pure Documentation...} \
! 	-command {menu_documentation} 
! 		  # add menu items for each section instead of using Pd patches
! 		  $mbar.help add separator
! 		  set helpmenuname help
! 	 } else {
! # Apple doesn't allow cascading menus in their Help so I had to call this 
! # one "docs"  <hans at at.or.at>
! 		  set helpmenuname docs
! 	 }
! 
! 	 $mbar.$helpmenuname add command -label {1 manual...} \
! 		  -command {menu_doc_open doc/1.manual index.htm} 
! 	 doc_submenu $mbar.$helpmenuname 2.control.examples
! 	 doc_submenu $mbar.$helpmenuname 3.audio.examples
! 	 doc_submenu $mbar.$helpmenuname 4.fft.examples
! 	 doc_submenu $mbar.$helpmenuname 5.reference
! 	 doc_submenu $mbar.$helpmenuname 6.externs
  }
  
--- 499,511 ----
  
  
!     	# the "Help" menu
!     if {$pd_nt != 2} {
!     	$mbar.help add command -label {About Pd} \
! 	    -command {menu_doc_open doc/1.manual 1.introduction.txt} 
!     }
!     $mbar.help add command -label {Html ...} \
!     	-command {menu_doc_open doc/1.manual index.htm} 
!     $mbar.help add command -label {Browser ...} \
!     	-command {menu_documentation} 
  }
  
***************
*** 1105,1120 ****
  # the help menu
  
- # a menu on the main menubar named "$whatever.help" while be treated
- # as a special menu with specific behaviors on different platforms.
- # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
- 	 if {$pd_nt != 2} {
      menu $name.m.help -tearoff $pd_tearoff
      $name.m add cascade -label Help -menu $name.m.help
- 	 } else {
- 		  # Apple doesn't allow cascading menus in their Help
- 		  # so I had to call this one "docs". <hans at at.or.at>
- 		  menu $name.m.docs -tearoff $pd_tearoff
- 		  $name.m add cascade -label Help -menu  $name.m.docs
- 	 }
  
      menu_addstd $name.m
--- 1081,1086 ----





More information about the Pd-cvs mailing list