From 30502189d87124d9712bf492ffbed027a66697eb Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 7 Jun 2007 16:59:07 +0000 Subject: [PATCH] The screen-capture command no longer pops up a dialog, so toss up a tip from within the F3 keybaord handler instead. --- Nasal/globals.nas | 8 ++++---- keyboard.xml | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Nasal/globals.nas b/Nasal/globals.nas index bf9f6ace2..4ec8ea970 100644 --- a/Nasal/globals.nas +++ b/Nasal/globals.nas @@ -4,7 +4,7 @@ # isa = func { obj = arg[0]; class = arg[1]; - if(!contains(obj, "parents")) { return 0; } + if(obj == nil or !contains(obj, "parents")) { return 0; } foreach(c; obj.parents) { if(c == class) { return 1; } elsif(isa(obj, c)) { return 1; } @@ -19,9 +19,9 @@ isa = func { # string, in which case it specifies a path in the global property # tree. # -fgcommand = func { - if(isa(arg[1], props.Node)) { arg[1] = arg[1]._g } - _fgcommand(arg[0], arg[1]); +fgcommand = func(cmd, node=nil) { + if(isa(node, props.Node)) node = node._g; + _fgcommand(cmd, node); } ## diff --git a/keyboard.xml b/keyboard.xml index 48e313bf0..e7f979327 100644 --- a/keyboard.xml +++ b/keyboard.xml @@ -981,7 +981,15 @@ calculated by adding 256 to the GLUT key value in glut.h. F3 Capture screen. - screen-capture + nasal + Load panel.