From 991d444979816bde4c683944c8246017fbe29950 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 25 Jul 2007 20:30:36 +0000 Subject: got things working on 0.40.3, everything seems to work ok; this patch applies cleanly to 0.41.0-test04 and also seems to work fine svn path=/trunk/; revision=8243 --- ...s_pixel_accurate_on_every_platform-0.40.3.patch | 360 ++++++++++----------- 1 file changed, 168 insertions(+), 192 deletions(-) (limited to 'packages') diff --git a/packages/patches/make_sizes_pixel_accurate_on_every_platform-0.40.3.patch b/packages/patches/make_sizes_pixel_accurate_on_every_platform-0.40.3.patch index 76676998..483654f1 100644 --- a/packages/patches/make_sizes_pixel_accurate_on_every_platform-0.40.3.patch +++ b/packages/patches/make_sizes_pixel_accurate_on_every_platform-0.40.3.patch @@ -1,29 +1,13 @@ -Index: g_all_guis.h -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v -retrieving revision 1.5 -retrieving revision 1.5.4.3 -diff -u -w -r1.5 -r1.5.4.3 ---- g_all_guis.h 16 Aug 2005 04:06:28 -0000 1.5 -+++ g_all_guis.h 8 Jul 2007 21:56:30 -0000 1.5.4.3 -@@ -144,7 +144,7 @@ - int x_w; - int x_ldx; - int x_ldy; -- char x_font[16]; -+ char x_font[MAXPDSTRING]; /* font names can be long! */ - t_iem_fstyle_flags x_fsf; - int x_fontsize; - t_iem_init_symargs x_isa; +? configure +? makefile Index: g_all_guis.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v -retrieving revision 1.8 -retrieving revision 1.8.2.3 -diff -u -w -r1.8 -r1.8.2.3 ---- g_all_guis.c 16 Aug 2005 04:06:28 -0000 1.8 -+++ g_all_guis.c 19 May 2007 05:29:33 -0000 1.8.2.3 -@@ -434,7 +434,7 @@ +retrieving revision 1.9 +diff -u -w -r1.9 g_all_guis.c +--- g_all_guis.c 11 Aug 2006 20:09:07 -0000 1.9 ++++ g_all_guis.c 25 Jul 2007 20:26:19 -0000 +@@ -438,7 +438,7 @@ else { f = 0; @@ -32,7 +16,7 @@ diff -u -w -r1.8 -r1.8.2.3 } iemgui->x_fsf.x_font_style = f; f = (int)atom_getintarg(1, ac, av); -@@ -442,8 +442,9 @@ +@@ -446,8 +446,9 @@ f = 4; iemgui->x_fontsize = f; if(glist_isvisible(iemgui->x_glist)) @@ -44,7 +28,7 @@ diff -u -w -r1.8 -r1.8.2.3 } void iemgui_size(void *x, t_iemgui *iemgui) -@@ -618,7 +619,7 @@ +@@ -622,7 +623,7 @@ else { f = 0; @@ -53,14 +37,29 @@ diff -u -w -r1.8 -r1.8.2.3 } iemgui->x_fsf.x_font_style = f; if(fs < 4) +Index: g_all_guis.h +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v +retrieving revision 1.5 +diff -u -w -r1.5 g_all_guis.h +--- g_all_guis.h 16 Aug 2005 04:06:28 -0000 1.5 ++++ g_all_guis.h 25 Jul 2007 20:26:19 -0000 +@@ -144,7 +144,7 @@ + int x_w; + int x_ldx; + int x_ldy; +- char x_font[16]; ++ char x_font[MAXPDSTRING]; /* font names can be long! */ + t_iem_fstyle_flags x_fsf; + int x_fontsize; + t_iem_init_symargs x_isa; Index: g_bang.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v -retrieving revision 1.4 -retrieving revision 1.4.12.3 -diff -u -w -r1.4 -r1.4.12.3 ---- g_bang.c 6 Sep 2004 20:20:33 -0000 1.4 -+++ g_bang.c 19 May 2007 05:29:33 -0000 1.4.12.3 +retrieving revision 1.5 +diff -u -w -r1.5 g_bang.c +--- g_bang.c 8 Sep 2006 23:45:30 -0000 1.5 ++++ g_bang.c 25 Jul 2007 20:26:19 -0000 @@ -55,11 +55,12 @@ xpos + x->x_gui.x_w-1, ypos + x->x_gui.x_h-1, x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol, x); @@ -108,11 +107,10 @@ diff -u -w -r1.4 -r1.4.12.3 Index: g_graph.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v -retrieving revision 1.9 -retrieving revision 1.9.2.5 -diff -u -w -r1.9 -r1.9.2.5 ---- g_graph.c 15 Sep 2005 03:17:27 -0000 1.9 -+++ g_graph.c 19 May 2007 05:29:33 -0000 1.9.2.5 +retrieving revision 1.10 +diff -u -w -r1.10 g_graph.c +--- g_graph.c 3 Jun 2006 19:13:07 -0000 1.10 ++++ g_graph.c 25 Jul 2007 20:26:19 -0000 @@ -741,9 +741,9 @@ { i -= sys_fontheight(glist_getfont(x)); @@ -126,7 +124,7 @@ diff -u -w -r1.9 -r1.9.2.5 } /* draw ticks on horizontal borders. If lperb field is -@@ -821,21 +829,22 @@ +@@ -823,21 +823,22 @@ /* draw x labels */ for (i = 0; i < x->gl_nxlabels; i++) sys_vgui(".x%lx.c create text\ @@ -158,11 +156,10 @@ diff -u -w -r1.9 -r1.9.2.5 Index: g_hdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v -retrieving revision 1.6 -retrieving revision 1.6.2.3 -diff -u -w -r1.6 -r1.6.2.3 ---- g_hdial.c 16 Aug 2005 04:06:28 -0000 1.6 -+++ g_hdial.c 19 May 2007 05:29:33 -0000 1.6.2.3 +retrieving revision 1.7 +diff -u -w -r1.7 g_hdial.c +--- g_hdial.c 8 Sep 2006 23:45:30 -0000 1.7 ++++ g_hdial.c 25 Jul 2007 20:26:19 -0000 @@ -73,10 +73,10 @@ x->x_drawn = x->x_on; } @@ -208,11 +205,10 @@ diff -u -w -r1.6 -r1.6.2.3 Index: g_hslider.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v -retrieving revision 1.5 -retrieving revision 1.5.2.3 -diff -u -w -r1.5 -r1.5.2.3 ---- g_hslider.c 16 Aug 2005 04:06:28 -0000 1.5 -+++ g_hslider.c 19 May 2007 05:29:33 -0000 1.5.2.3 +retrieving revision 1.6 +diff -u -w -r1.6 g_hslider.c +--- g_hslider.c 8 Sep 2006 23:45:30 -0000 1.6 ++++ g_hslider.c 25 Jul 2007 20:26:19 -0000 @@ -76,11 +76,12 @@ canvas, r, ypos+1, r, ypos + x->x_gui.x_h, x->x_gui.x_fcol, x); @@ -261,10 +257,9 @@ Index: g_mycanvas.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_mycanvas.c,v retrieving revision 1.5 -retrieving revision 1.5.14.3 -diff -u -w -r1.5 -r1.5.14.3 +diff -u -w -r1.5 g_mycanvas.c --- g_mycanvas.c 6 Sep 2004 20:20:34 -0000 1.5 -+++ g_mycanvas.c 19 May 2007 05:29:33 -0000 1.5.14.3 ++++ g_mycanvas.c 25 Jul 2007 20:26:19 -0000 @@ -44,10 +44,11 @@ xpos + x->x_gui.x_w, ypos + x->x_gui.x_h, x->x_gui.x_bcol, x); @@ -312,11 +307,10 @@ diff -u -w -r1.5 -r1.5.14.3 Index: g_numbox.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v -retrieving revision 1.7 -retrieving revision 1.7.2.3 -diff -u -w -r1.7 -r1.7.2.3 ---- g_numbox.c 16 Aug 2005 04:06:28 -0000 1.7 -+++ g_numbox.c 19 May 2007 05:29:33 -0000 1.7.2.3 +retrieving revision 1.8 +diff -u -w -r1.8 g_numbox.c +--- g_numbox.c 8 Sep 2006 23:45:30 -0000 1.8 ++++ g_numbox.c 25 Jul 2007 20:26:19 -0000 @@ -195,15 +195,17 @@ xpos, ypos + x->x_gui.x_h, x->x_gui.x_fcol, x); @@ -377,11 +371,10 @@ diff -u -w -r1.7 -r1.7.2.3 Index: g_rtext.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v -retrieving revision 1.5 -retrieving revision 1.5.2.4 -diff -u -w -r1.5 -r1.5.2.4 ---- g_rtext.c 2 Jul 2005 05:03:06 -0000 1.5 -+++ g_rtext.c 19 May 2007 04:04:30 -0000 1.5.2.4 +retrieving revision 1.6 +diff -u -w -r1.6 g_rtext.c +--- g_rtext.c 11 Aug 2006 20:09:07 -0000 1.6 ++++ g_rtext.c 25 Jul 2007 20:26:19 -0000 @@ -15,10 +15,16 @@ #include "g_canvas.h" #include "t_tk.h" @@ -406,12 +399,11 @@ diff -u -w -r1.5 -r1.5.2.4 Index: g_template.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_template.c,v -retrieving revision 1.13 -retrieving revision 1.13.2.4 -diff -u -w -r1.13 -r1.13.2.4 ---- g_template.c 21 Aug 2005 17:46:52 -0000 1.13 -+++ g_template.c 19 May 2007 05:29:33 -0000 1.13.2.4 -@@ -2090,8 +2090,8 @@ +retrieving revision 1.18 +diff -u -w -r1.18 g_template.c +--- g_template.c 9 Oct 2006 04:36:12 -0000 1.18 ++++ g_template.c 25 Jul 2007 20:26:19 -0000 +@@ -2126,8 +2126,8 @@ drawnumber_sprintf(x, buf, &at); sys_vgui(".x%lx.c create text %d %d -anchor nw -fill %s -text {%s}", glist_getcanvas(glist), xloc, yloc, colorstring, buf); @@ -425,11 +417,10 @@ diff -u -w -r1.13 -r1.13.2.4 Index: g_toggle.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v -retrieving revision 1.4 -retrieving revision 1.4.12.3 -diff -u -w -r1.4 -r1.4.12.3 ---- g_toggle.c 6 Sep 2004 20:20:34 -0000 1.4 -+++ g_toggle.c 19 May 2007 05:29:33 -0000 1.4.12.3 +retrieving revision 1.5 +diff -u -w -r1.5 g_toggle.c +--- g_toggle.c 8 Sep 2006 23:45:30 -0000 1.5 ++++ g_toggle.c 25 Jul 2007 20:26:19 -0000 @@ -61,11 +61,12 @@ canvas, xx+w+1, yy + x->x_gui.x_h-w-1, xx + x->x_gui.x_w-w, yy+w, w, (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x); @@ -477,11 +468,10 @@ diff -u -w -r1.4 -r1.4.12.3 Index: g_vdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vdial.c,v -retrieving revision 1.5 -retrieving revision 1.5.2.3 -diff -u -w -r1.5 -r1.5.2.3 ---- g_vdial.c 16 Aug 2005 04:06:28 -0000 1.5 -+++ g_vdial.c 19 May 2007 05:29:33 -0000 1.5.2.3 +retrieving revision 1.6 +diff -u -w -r1.6 g_vdial.c +--- g_vdial.c 8 Sep 2006 23:45:30 -0000 1.6 ++++ g_vdial.c 25 Jul 2007 20:26:19 -0000 @@ -75,10 +75,10 @@ x->x_drawn = x->x_on; } @@ -527,11 +517,10 @@ diff -u -w -r1.5 -r1.5.2.3 Index: g_vslider.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vslider.c,v -retrieving revision 1.5 -retrieving revision 1.5.2.3 -diff -u -w -r1.5 -r1.5.2.3 ---- g_vslider.c 16 Aug 2005 04:06:28 -0000 1.5 -+++ g_vslider.c 19 May 2007 05:29:33 -0000 1.5.2.3 +retrieving revision 1.6 +diff -u -w -r1.6 g_vslider.c +--- g_vslider.c 8 Sep 2006 23:45:30 -0000 1.6 ++++ g_vslider.c 25 Jul 2007 20:26:19 -0000 @@ -59,10 +59,11 @@ canvas, xpos+1, r, xpos + x->x_gui.x_w, r, x->x_gui.x_fcol, x); @@ -579,10 +568,9 @@ Index: g_vumeter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v retrieving revision 1.5 -retrieving revision 1.5.4.3 -diff -u -w -r1.5 -r1.5.4.3 +diff -u -w -r1.5 g_vumeter.c --- g_vumeter.c 16 Aug 2005 04:06:28 -0000 1.5 -+++ g_vumeter.c 19 May 2007 05:29:33 -0000 1.5.4.3 ++++ g_vumeter.c 25 Jul 2007 20:26:19 -0000 @@ -116,17 +116,19 @@ canvas, quad1, yyy, quad3, yyy, x->x_led_size, iemgui_color_hex[led_col], x, i); if(((i+2)&3) && (x->x_scale)) @@ -705,12 +693,11 @@ diff -u -w -r1.5 -r1.5.4.3 Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v -retrieving revision 1.8 -retrieving revision 1.8.2.10 -diff -u -w -r1.8 -r1.8.2.10 ---- m_pd.h 19 Aug 2005 23:28:03 -0000 1.8 -+++ m_pd.h 18 Jul 2007 14:05:55 -0000 1.8.2.10 -@@ -363,6 +366,8 @@ +retrieving revision 1.16.2.2 +diff -u -w -r1.16.2.2 m_pd.h +--- m_pd.h 18 Jul 2007 00:20:12 -0000 1.16.2.2 ++++ m_pd.h 25 Jul 2007 20:26:19 -0000 +@@ -368,6 +368,8 @@ EXTERN void canvas_makefilename(t_glist *c, char *file, char *result,int resultsize); EXTERN t_symbol *canvas_getdir(t_glist *x); @@ -722,22 +709,19 @@ diff -u -w -r1.8 -r1.8.2.10 Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v -retrieving revision 1.14 -retrieving revision 1.14.2.5 -diff -u -w -r1.14 -r1.14.2.5 ---- s_inter.c 15 Oct 2005 23:14:28 -0000 1.14 -+++ s_inter.c 18 Jul 2007 14:05:55 -0000 1.14.2.5 -@@ -85,9 +88,7 @@ - t_socketreceivefn sr_socketreceivefn; - }; - --extern char *pd_version; +retrieving revision 1.18.2.1 +diff -u -w -r1.18.2.1 s_inter.c +--- s_inter.c 18 Jul 2007 00:20:12 -0000 1.18.2.1 ++++ s_inter.c 25 Jul 2007 20:26:19 -0000 +@@ -87,7 +87,6 @@ + + extern char *pd_version; extern int sys_guisetportnumber; -extern char sys_font[]; /* tb: typeface */ static int sys_nfdpoll; static t_fdpoll *sys_fdpoll; -@@ -842,7 +843,8 @@ +@@ -844,7 +843,8 @@ #define FIRSTPORTNUM 5400 @@ -746,27 +730,26 @@ diff -u -w -r1.14 -r1.14.2.5 +static int defaultfontshit[MAXFONTS] = { 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28, 24, 15, 28}; - -@@ -1245,8 +1248,8 @@ + #define NDEFAULTFONT (sizeof(defaultfontshit)/sizeof(*defaultfontshit)) +@@ -1248,8 +1248,8 @@ #endif sys_get_audio_apis(buf); sys_get_midi_apis(buf2); - sys_vgui("pdtk_pd_startup {%s} %s %s {%s}\n", pd_version, buf, buf2, - sys_font); -+ sys_vgui("pdtk_pd_startup %s %s {%s} %s\n", buf, buf2, sys_font, -+ sys_fontweight); ++ sys_vgui("pdtk_pd_startup {%s} %s %s {%s} %s\n", pd_version, buf, buf2, ++ sys_font, sys_fontweight); } return (0); Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v -retrieving revision 1.20 -retrieving revision 1.20.2.9 -diff -u -w -r1.20 -r1.20.2.9 ---- s_main.c 2 Dec 2005 04:58:24 -0000 1.20 -+++ s_main.c 9 Jul 2007 17:42:04 -0000 1.20.2.9 -@@ -56,7 +57,12 @@ +retrieving revision 1.28 +diff -u -w -r1.28 s_main.c +--- s_main.c 4 Oct 2006 19:35:06 -0000 1.28 ++++ s_main.c 25 Jul 2007 20:26:19 -0000 +@@ -58,7 +58,12 @@ int sys_midiindevlist[MAXMIDIINDEV] = {1}; int sys_midioutdevlist[MAXMIDIOUTDEV] = {1}; @@ -779,28 +762,19 @@ diff -u -w -r1.20 -r1.20.2.9 +char sys_fontweight[] = "normal"; /* currently only used for iemguis */ static int sys_main_srate; static int sys_main_advance; - + static int sys_listplease; @@ -106,8 +111,8 @@ in the six fonts. */ static t_fontinfo sys_fontlist[] = { - {8, 6, 10, 0, 0, 0}, {10, 7, 13, 0, 0, 0}, {12, 9, 16, 0, 0, 0}, - {16, 10, 20, 0, 0, 0}, {24, 15, 25, 0, 0, 0}, {36, 25, 45, 0, 0, 0}}; -+ {8, 5, 11, 0, 0, 0}, {10, 6, 13, 0, 0, 0}, {12, 7, 16, 0, 0, 0}, -+ {16, 10, 19, 0, 0, 0}, {24, 14, 29, 0, 0, 0}, {36, 23, 44, 0, 0, 0}}; ++ {8, 5, 11, 8, 5, 11}, {10, 6, 13, 10, 6, 13}, {12, 7, 16, 12, 7, 16}, ++ {16, 10, 19, 16, 10, 19}, {24, 14, 29, 24, 14, 29}, {36, 23, 44, 36, 23, 44}}; #define NFONT (sizeof(sys_fontlist)/sizeof(*sys_fontlist)) /* here are the actual font size structs on msp's systems: -@@ -141,7 +147,7 @@ - - int sys_hostfontsize(int fontsize) - { -- return (sys_findfont(fontsize)->fi_hostfontsize); -+ return (0 - fontsize); - } - - int sys_fontwidth(int fontsize) -@@ -155,11 +161,7 @@ +@@ -158,11 +163,7 @@ } int sys_defaultfont; @@ -812,7 +786,7 @@ diff -u -w -r1.20 -r1.20.2.9 static void openit(const char *dirname, const char *filename) { -@@ -206,11 +211,6 @@ +@@ -206,11 +207,6 @@ atom_getintarg(3 * j + 3, argc, argv) <= wantwidth) best = j; } @@ -824,7 +798,7 @@ diff -u -w -r1.20 -r1.20.2.9 } #if 0 for (i = 0; i < 6; i++) -@@ -358,8 +364,9 @@ +@@ -382,8 +378,9 @@ "-helppath -- add to help file search path\n", "-open -- open file(s) on startup\n", "-lib -- load object library(s)\n", @@ -836,7 +810,7 @@ diff -u -w -r1.20 -r1.20.2.9 "-verbose -- extra printout on startup and when searching for files\n", "-version -- don't run Pd; just print out which version it is \n", "-d -- specify debug level\n", -@@ -737,21 +737,25 @@ +@@ -737,21 +734,25 @@ sys_externlist = namelist_append_files(sys_externlist, argv[1]); argc -= 2; argv += 2; } @@ -869,11 +843,10 @@ diff -u -w -r1.20 -r1.20.2.9 Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v -retrieving revision 1.17 -retrieving revision 1.17.2.21 -diff -u -w -r1.17 -r1.17.2.21 ---- u_main.tk 15 Oct 2005 23:14:28 -0000 1.17 -+++ u_main.tk 23 Jul 2007 20:49:13 -0000 1.17.2.21 +retrieving revision 1.25 +diff -u -w -r1.25 u_main.tk +--- u_main.tk 9 Oct 2006 04:36:12 -0000 1.25 ++++ u_main.tk 25 Jul 2007 20:26:19 -0000 @@ -1,14 +1,4 @@ #!/usr/bin/wish - @@ -946,7 +919,7 @@ diff -u -w -r1.17 -r1.17.2.21 set pd_guidir $pd_gui2/.. load $pd_guidir/bin/libPdTcl.dylib set pd_tearoff 0 -@@ -128,6 +148,15 @@ +@@ -132,6 +150,15 @@ .mbar add cascade -label "Help" -menu .mbar.help } @@ -962,7 +935,7 @@ diff -u -w -r1.17 -r1.17.2.21 set ctrls_audio_on 0 set ctrls_meter_on 0 set ctrls_inlevel 0 -@@ -136,15 +165,14 @@ +@@ -140,15 +167,14 @@ frame .controls.switches checkbutton .controls.switches.audiobutton -text {compute audio} \ -variable ctrls_audio_on \ @@ -980,7 +953,7 @@ diff -u -w -r1.17 -r1.17.2.21 frame .controls.inout frame .controls.inout.in -@@ -171,7 +199,7 @@ +@@ -175,7 +201,7 @@ frame .printout @@ -989,7 +962,7 @@ diff -u -w -r1.17 -r1.17.2.21 -yscrollcommand ".printout.scroll set" -width 80 # .printout.text insert end "\n\n\n\n\n\n\n\n\n\n" scrollbar .printout.scroll -command ".printout.text yview" -@@ -364,7 +360,7 @@ +@@ -364,7 +390,7 @@ global pd_myversion set name [format ".help%d" $doc_number] toplevel $name @@ -998,7 +971,7 @@ diff -u -w -r1.17 -r1.17.2.21 -yscrollcommand "$name.scroll set" -background white scrollbar $name.scroll -command "$name.text yview" pack $name.scroll -side right -fill y -@@ -1120,6 +1162,18 @@ +@@ -1142,6 +1168,18 @@ $name.popup add command -label {Help} \ -command [concat popup_action $name 2] @@ -1017,7 +990,7 @@ diff -u -w -r1.17 -r1.17.2.21 # WM protocol wm protocol $name WM_DELETE_WINDOW [concat menu_close $name] -@@ -1239,6 +1295,7 @@ +@@ -1266,6 +1304,7 @@ global pd_nt global pd_array_listview_page global pd_array_listview_id @@ -1025,7 +998,7 @@ diff -u -w -r1.17 -r1.17.2.21 set pd_array_listview_page($arrayName) $page set pd_array_listview_id($arrayName) $id set windowName [format ".%sArrayWindow" $arrayName] -@@ -1252,8 +1309,7 @@ +@@ -1279,8 +1318,7 @@ set $windowName.lb [listbox $windowName.lb -height 20 -width 25\ -selectmode extended \ -relief solid -background white -borderwidth 1 \ @@ -1035,7 +1008,7 @@ diff -u -w -r1.17 -r1.17.2.21 -yscrollcommand "$windowName.lb.sb set"] set $windowName.lb.sb [scrollbar $windowName.lb.sb \ -command "$windowName.lb yview" -orient vertical] -@@ -1357,9 +1413,7 @@ +@@ -1384,9 +1422,7 @@ proc pdtk_array_listview_edit {arrayName page font} { global pd_array_listview_entry global pd_nt @@ -1046,7 +1019,7 @@ diff -u -w -r1.17 -r1.17.2.21 set lbName [format ".%sArrayWindow.lb" $arrayName] if {[winfo exists $lbName.entry]} { pdtk_array_listview_update_entry \ -@@ -1371,7 +1425,7 @@ +@@ -1398,7 +1434,7 @@ set bbox [$lbName bbox $itemNum] set y [expr [lindex $bbox 1] - 4] set $lbName.entry [entry $lbName.entry \ @@ -1055,7 +1028,7 @@ diff -u -w -r1.17 -r1.17.2.21 $lbName.entry insert 0 [] place configure $lbName.entry -relx 0 -y $y -relwidth 1 lower $lbName.entry -@@ -1853,6 +1925,8 @@ +@@ -1874,6 +1910,8 @@ set vid [string trimleft $id .] @@ -1064,7 +1037,7 @@ diff -u -w -r1.17 -r1.17.2.21 set var_gatomwidth [concat gatomwidth_$vid] global $var_gatomwidth set var_gatomlo [concat gatomlo_$vid] -@@ -1877,87 +1951,96 @@ +@@ -1898,87 +1936,96 @@ set $var_gatomsymto [gatom_unescape $symto] toplevel $id @@ -1231,7 +1204,7 @@ diff -u -w -r1.17 -r1.17.2.21 pdtk_standardkeybindings $id.params.entry $id.params.entry select from 0 $id.params.entry select adjust end -@@ -2110,7 +2193,7 @@ +@@ -2131,7 +2178,7 @@ if {[eval concat $$var_iemgui_gn_fs] < $iemgui_define_min_fontsize} { set $var_iemgui_gn_fs $iemgui_define_min_fontsize @@ -1240,7 +1213,7 @@ diff -u -w -r1.17 -r1.17.2.21 } } -@@ -2124,20 +2207,20 @@ +@@ -2145,20 +2192,20 @@ set var_iemgui_lcol [concat iemgui_lcol_$vid] global $var_iemgui_lcol @@ -1264,7 +1237,7 @@ diff -u -w -r1.17 -r1.17.2.21 -background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \ -activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \ -foreground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \ -@@ -2221,17 +2304,27 @@ +@@ -2242,17 +2289,27 @@ } } @@ -1298,7 +1271,7 @@ diff -u -w -r1.17 -r1.17.2.21 } proc iemgui_lb {id} { -@@ -2377,6 +2470,9 @@ +@@ -2398,6 +2455,9 @@ set vid [string trimleft $id .] @@ -1308,7 +1281,7 @@ diff -u -w -r1.17 -r1.17.2.21 set var_iemgui_wdt [concat iemgui_wdt_$vid] global $var_iemgui_wdt set var_iemgui_min_wdt [concat iemgui_min_wdt_$vid] -@@ -2464,7 +2560,8 @@ +@@ -2485,7 +2545,8 @@ set $var_iemgui_l2_f1_b0 0 toplevel $id @@ -1318,7 +1291,7 @@ diff -u -w -r1.17 -r1.17.2.21 wm protocol $id WM_DELETE_WINDOW [concat iemgui_cancel $id] frame $id.dim -@@ -2497,7 +2594,7 @@ +@@ -2518,7 +2579,7 @@ $id.rng.max_lab $id.rng.max_ent -side left} } if { [eval concat $$var_iemgui_lin0_log1] >= 0 || [eval concat $$var_iemgui_loadbang] >= 0 || [eval concat $$var_iemgui_num] > 0 || [eval concat $$var_iemgui_steady] >= 0 } { @@ -1327,7 +1300,7 @@ diff -u -w -r1.17 -r1.17.2.21 pack $id.space1 -side top } frame $id.para -@@ -2526,157 +2623,189 @@ +@@ -2547,157 +2608,189 @@ pack $id.para.dummy3 $id.para.num_lab $id.para.num_ent -side left -expand 1} if {[eval concat $$var_iemgui_steady] >= 0} { pack $id.para.dummy3 $id.para.stdy_jmp -side left -expand 1} @@ -1527,39 +1500,6 @@ diff -u -w -r1.17 -r1.17.2.21 - - label $id.space3 -text "------or click color preset:-------" - pack $id.space3 -side top -- -- frame $id.bcol -- pack $id.bcol -side top -- foreach i { 0 1 2 3 4 5 6 7 8 9 } hexcol { 16579836 14737632 12369084 \ -- 16572640 16572608 16579784 14220504 14220540 14476540 16308476 } { -- button $id.bcol.c$i -background [format "#%6.6x" $hexcol] \ -- -activebackground [format "#%6.6x" $hexcol] \ -- -font {courier 2 normal} -padx 7 -pady 6 \ -- -command [format "iemgui_preset_col %s %d" $id $hexcol] } -- pack $id.bcol.c0 $id.bcol.c1 $id.bcol.c2 $id.bcol.c3 $id.bcol.c4 \ -- $id.bcol.c5 $id.bcol.c6 $id.bcol.c7 $id.bcol.c8 $id.bcol.c9 -side left -- -- frame $id.fcol -- pack $id.fcol -side top -- foreach i { 0 1 2 3 4 5 6 7 8 9 } hexcol { 10526880 8158332 6316128 \ -- 16525352 16559172 15263784 1370132 2684148 3952892 16003312 } { -- button $id.fcol.c$i -background [format "#%6.6x" $hexcol] \ -- -activebackground [format "#%6.6x" $hexcol] \ -- -font {courier 2 normal} -padx 7 -pady 6 \ -- -command [format "iemgui_preset_col %s %d" $id $hexcol] } -- pack $id.fcol.c0 $id.fcol.c1 $id.fcol.c2 $id.fcol.c3 $id.fcol.c4 \ -- $id.fcol.c5 $id.fcol.c6 $id.fcol.c7 $id.fcol.c8 $id.fcol.c9 -side left -- -- frame $id.lcol -- pack $id.lcol -side top -- foreach i { 0 1 2 3 4 5 6 7 8 9 } hexcol { 4210752 2105376 0 \ -- 9177096 5779456 7874580 2641940 17488 5256 5767248 } { -- button $id.lcol.c$i -background [format "#%6.6x" $hexcol] \ -- -activebackground [format "#%6.6x" $hexcol] \ -- -font {courier 2 normal} -padx 7 -pady 6 \ -- -command [format "iemgui_preset_col %s %d" $id $hexcol] } -- pack $id.lcol.c0 $id.lcol.c1 $id.lcol.c2 $id.lcol.c3 $id.lcol.c4 \ -- $id.lcol.c5 $id.lcol.c6 $id.lcol.c7 $id.lcol.c8 $id.lcol.c9 -side left + -activeforeground [format "#%6.6x" [eval concat $$var_iemgui_lcol]] \ + -font [list $current_font 12 $fontweight] -padx 2 -pady 2 -relief ridge + pack $id.colors.sections.lb_bk $id.colors.sections.fr_bk \ @@ -1613,6 +1553,39 @@ diff -u -w -r1.17 -r1.17.2.21 + $id.colors.r3.c4 $id.colors.r3.c5 $id.colors.r3.c6 $id.colors.r3.c7 \ + $id.colors.r3.c8 $id.colors.r3.c9 -side left +- frame $id.bcol +- pack $id.bcol -side top +- foreach i { 0 1 2 3 4 5 6 7 8 9 } hexcol { 16579836 14737632 12369084 \ +- 16572640 16572608 16579784 14220504 14220540 14476540 16308476 } { +- button $id.bcol.c$i -background [format "#%6.6x" $hexcol] \ +- -activebackground [format "#%6.6x" $hexcol] \ +- -font {courier 2 normal} -padx 7 -pady 6 \ +- -command [format "iemgui_preset_col %s %d" $id $hexcol] } +- pack $id.bcol.c0 $id.bcol.c1 $id.bcol.c2 $id.bcol.c3 $id.bcol.c4 \ +- $id.bcol.c5 $id.bcol.c6 $id.bcol.c7 $id.bcol.c8 $id.bcol.c9 -side left +- +- frame $id.fcol +- pack $id.fcol -side top +- foreach i { 0 1 2 3 4 5 6 7 8 9 } hexcol { 10526880 8158332 6316128 \ +- 16525352 16559172 15263784 1370132 2684148 3952892 16003312 } { +- button $id.fcol.c$i -background [format "#%6.6x" $hexcol] \ +- -activebackground [format "#%6.6x" $hexcol] \ +- -font {courier 2 normal} -padx 7 -pady 6 \ +- -command [format "iemgui_preset_col %s %d" $id $hexcol] } +- pack $id.fcol.c0 $id.fcol.c1 $id.fcol.c2 $id.fcol.c3 $id.fcol.c4 \ +- $id.fcol.c5 $id.fcol.c6 $id.fcol.c7 $id.fcol.c8 $id.fcol.c9 -side left +- +- frame $id.lcol +- pack $id.lcol -side top +- foreach i { 0 1 2 3 4 5 6 7 8 9 } hexcol { 4210752 2105376 0 \ +- 9177096 5779456 7874580 2641940 17488 5256 5767248 } { +- button $id.lcol.c$i -background [format "#%6.6x" $hexcol] \ +- -activebackground [format "#%6.6x" $hexcol] \ +- -font {courier 2 normal} -padx 7 -pady 6 \ +- -command [format "iemgui_preset_col %s %d" $id $hexcol] } +- pack $id.lcol.c0 $id.lcol.c1 $id.lcol.c2 $id.lcol.c3 $id.lcol.c4 \ +- $id.lcol.c5 $id.lcol.c6 $id.lcol.c7 $id.lcol.c8 $id.lcol.c9 -side left +- - - label $id.space4 -text "---------------------------------" - pack $id.space4 -side top @@ -1641,7 +1614,7 @@ diff -u -w -r1.17 -r1.17.2.21 if {[info tclversion] < 8.4} { bind $id {tkTabToWindow [tk_focusNext %W]} -@@ -2691,24 +2820,24 @@ +@@ -2712,24 +2805,24 @@ bind $id.rng.min_ent [concat iemgui_ok $id] bind $id.rng.max_ent [concat iemgui_ok $id] bind $id.para.num_ent [concat iemgui_ok $id] @@ -1678,7 +1651,7 @@ diff -u -w -r1.17 -r1.17.2.21 pdtk_standardkeybindings $id.cao.ok $id.dim.w_ent select from 0 -@@ -2786,6 +2915,7 @@ +@@ -2807,6 +2900,7 @@ toplevel $id wm title $id {array} @@ -1686,29 +1659,32 @@ diff -u -w -r1.17 -r1.17.2.21 wm protocol $id WM_DELETE_WINDOW [concat array_cancel $id] frame $id.name -@@ -3264,10 +3260,9 @@ +@@ -3264,18 +3358,21 @@ # seven "useful" font sizes. # tb: user defined typefaces -proc pdtk_pd_startup {version apilist midiapilist fontname} { -+proc pdtk_pd_startup {apilist midiapilist fontname_from_pd fontweight_from_pd} { ++proc pdtk_pd_startup {version apilist midiapilist fontname_from_pd fontweight_from_pd} { # puts stderr [concat $version $apilist $fontname] - global pd_myversion pd_apilist pd_midiapilist -- set pd_myversion $version -+ global pd_apilist pd_midiapilist pd_nt ++ global pd_myversion pd_apilist pd_midiapilist pd_nt + set pd_myversion $version set pd_apilist $apilist set pd_midiapilist $midiapilist ++ global fontname fontweight ++ set fontname $fontname_from_pd ++ set fontweight $fontweight_from_pd global pd_fontlist -@@ -3275,7 +3270,7 @@ + set pd_fontlist {} set fontlist "" foreach i {8 9 10 12 14 16 18 24 30 36} { - set font [concat $fontname -$i bold] -+ set font [format {{%s} -%d %s} $fontname_from_pd $i $fontweight_from_pd] ++ set font [format {{%s} %d %s} $fontname_from_pd $i $fontweight_from_pd] set pd_fontlist [linsert $pd_fontlist 100000 $font] set width0 [font measure $font x] set height0 [lindex [font metrics $font] 5] -@@ -3498,8 +3633,12 @@ +@@ -3522,8 +3619,12 @@ # create a popup menu proc audio_popup {name buttonname varname devlist} { @@ -1721,7 +1697,7 @@ diff -u -w -r1.17 -r1.17.2.21 # puts stderr [concat $devlist ] for {set x 0} {$x<[llength $devlist]} {incr x} { $name.popup add command -label [lindex $devlist $x] \ -@@ -3771,8 +3910,12 @@ +@@ -3798,8 +3899,12 @@ # create a popup menu proc midi_popup {name buttonname varname devlist} { -- cgit v1.2.1