From 34f63e8c3656ce64709dae1a66a9c0d7b8d923b6 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 6 Nov 2007 02:17:54 +0000 Subject: allow dynamic cursor configuration by move cursor name variables to u_main.tk, this is patch 1826507 svn path=/trunk/; revision=8939 --- .../patches/set_cursors_in_tcl-0.41-test06.patch | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 packages/patches/set_cursors_in_tcl-0.41-test06.patch (limited to 'packages') diff --git a/packages/patches/set_cursors_in_tcl-0.41-test06.patch b/packages/patches/set_cursors_in_tcl-0.41-test06.patch new file mode 100644 index 00000000..b34cce68 --- /dev/null +++ b/packages/patches/set_cursors_in_tcl-0.41-test06.patch @@ -0,0 +1,76 @@ +Index: u_main.tk +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v +retrieving revision 1.28 +diff -u -w -r1.28 u_main.tk +--- u_main.tk 18 Aug 2007 23:32:44 -0000 1.28 ++++ u_main.tk 6 Nov 2007 02:10:48 -0000 +@@ -31,6 +31,36 @@ + set pd_array_listview_page(0) 0 + # end jsarlo + ++# set up mouse cursors individually on each platform ++switch -- $pd_nt { 0 { ++ # GNU/Linux ++ set cursor_runmode_nothing "left_ptr" ++ set cursor_runmode_clickme "arrow" ++ set cursor_runmode_thicken "sb_v_double_arrow" ++ set cursor_runmode_addpoint "plus" ++ set cursor_editmode_nothing "hand2" ++ set cursor_editmode_connect "circle" ++ set cursor_editmode_disconnect "X_cursor" ++} 1 { ++ # Windows ++ set cursor_runmode_nothing "rigth_ptr" ++ set cursor_runmode_clickme "arrow" ++ set cursor_runmode_thicken "sb_v_double_arrow" ++ set cursor_runmode_addpoint "plus" ++ set cursor_editmode_nothing "hand2" ++ set cursor_editmode_connect "circle" ++ set cursor_editmode_disconnect "X_cursor" ++} 2 { ++ # Mac OS X ++ set cursor_runmode_nothing "arrow" ++ set cursor_runmode_clickme "center_ptr" ++ set cursor_runmode_thicken "sb_v_double_arrow" ++ set cursor_runmode_addpoint "plus" ++ set cursor_editmode_nothing "hand2" ++ set cursor_editmode_connect "circle" ++ set cursor_editmode_disconnect "X_cursor" ++} } ++ + if {$pd_nt == 1} { + global pd_guidir + global pd_tearoff +Index: g_editor.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v +retrieving revision 1.20 +diff -u -w -r1.20 g_editor.c +--- g_editor.c 9 Oct 2006 04:36:12 -0000 1.20 ++++ g_editor.c 6 Nov 2007 02:10:48 -0000 +@@ -729,17 +729,13 @@ + /* ------------------------ event handling ------------------------ */ + + static char *cursorlist[] = { +-#ifdef MSW +- "right_ptr", /* CURSOR_RUNMODE_NOTHING */ +-#else +- "left_ptr", /* CURSOR_RUNMODE_NOTHING */ +-#endif +- "arrow", /* CURSOR_RUNMODE_CLICKME */ +- "sb_v_double_arrow", /* CURSOR_RUNMODE_THICKEN */ +- "plus", /* CURSOR_RUNMODE_ADDPOINT */ +- "hand2", /* CURSOR_EDITMODE_NOTHING */ +- "circle", /* CURSOR_EDITMODE_CONNECT */ +- "X_cursor" /* CURSOR_EDITMODE_DISCONNECT */ ++ "$cursor_runmode_nothing", ++ "$cursor_runmode_clickme", ++ "$cursor_runmode_thicken", ++ "$cursor_runmode_addpoint", ++ "$cursor_editmode_nothing", ++ "$cursor_editmode_connect", ++ "$cursor_editmode_disconnect" + }; + + void canvas_setcursor(t_canvas *x, unsigned int cursornum) -- cgit v1.2.1