[Gridflow-cvs] [svn] commit: r5694 - /trunk/src/gridflow.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sun May 30 15:39:44 EDT 2010

Author: matju
Date: Sun May 30 15:39:42 2010
New Revision: 5694

attempt to fix menu_open


Modified: trunk/src/gridflow.cxx
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Sun May 30 15:39:42 2010
@@ -1073,13 +1073,15 @@
 	        "proc pdtk_text_set {a b e        } {pdtk_text_sept $a $b       [encoding convertfrom $e]      }\n");
         sys_vgui("set gfdir {%s}\n",dirresult);
-	sys_gui("proc gf_menu_open {} {\n"
-		"set z $::pd_opendir; set ::pd_opendir $::gfdir/examples; menu_open; set ::pd_opendir $z}\n");
+	sys_gui("proc gf_menu_open {parent} {\n"
+		"set z $::pd_opendir; set ::pd_opendir $::gfdir/examples;"
+		"if {[catch {menu_open}]} {menu_open $parent};"
+		"set ::pd_opendir $z}\n");
 	sys_gui("proc gridflow_add_to_help {menu} {\n"
 		   "$menu add separator\n"
 		   "$menu add command -label {GridFlow About}      -command {pd pd open about.pd $::gfdir/doc \\;}\n"
 		   "$menu add command -label {GridFlow Help Index} -command {pd pd open index.pd $::gfdir/doc \\;}\n"
-		   "$menu add command -label {GridFlow Examples}   -command {gf_menu_open}\n"
+		   "$menu add command -label {GridFlow Examples}   -command {gf_menu_open %W}\n"
 		 "catch {gridflow_add_to_help .mbar.help}\n"
 		 "catch {gridflow_add_to_help $::pd_menus::menubar.help; proc pd {args} {pdsend [join $args " "]}}\n"

More information about the Gridflow-cvs mailing list