[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-75-g3d09a3f)
The branch, master has been updated
via 3d09a3fffd1f97816583ca92d73d0c792646bf2e (commit)
from 4ef611b6e1cc6eb47538148ce1d196d495313969 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/lib/system-gschemrc.in | 5 +++++
gschem/src/x_window.c | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 3d09a3fffd1f97816583ca92d73d0c792646bf2e
Author: Bernd Jendrissek <bernd.jendrissek@xxxxxxxxx>
Date: Sun Aug 10 00:19:01 2008 +0200
Rather pass the user-supplied scripting command to a scheme dispatcher.
Passing the command to a scheme dispatcher gives the configuration files
an opportunity to define the language in which these scripting commands
are interpreted. It doesn't really need to be scheme, but it is for now.
(New patch with changes suggested by Peter TB Brett.)
:100644 100644 809ca42... f972f2a... M gschem/lib/system-gschemrc.in
:100644 100644 0259843... a9aeba4... M gschem/src/x_window.c
=========
Changes
=========
commit 3d09a3fffd1f97816583ca92d73d0c792646bf2e
Author: Bernd Jendrissek <bernd.jendrissek@xxxxxxxxx>
Date: Sun Aug 10 00:19:01 2008 +0200
Rather pass the user-supplied scripting command to a scheme dispatcher.
Passing the command to a scheme dispatcher gives the configuration files
an opportunity to define the language in which these scripting commands
are interpreted. It doesn't really need to be scheme, but it is for now.
(New patch with changes suggested by Peter TB Brett.)
diff --git a/gschem/lib/system-gschemrc.in b/gschem/lib/system-gschemrc.in
index 809ca42..f972f2a 100644
--- a/gschem/lib/system-gschemrc.in
+++ b/gschem/lib/system-gschemrc.in
@@ -955,6 +955,11 @@
(add-component-at-xy page default-titleblock 40000 40000 0 #f #f)))
#t)
+; Evaluate an expression entered in the magic-colon text box.
+; In 20 years this might dispatch to an interpreter for some other language.
+(define (invoke-macro s-expr)
+ (gschem-log (format #f "~s\n" (eval-string-protected s-expr))))
+
;
; End of hooks
;
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 0259843..a9aeba4 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -280,8 +280,13 @@ static GtkWidget *x_window_stock_pixmap(const char *stock, GSCHEM_TOPLEVEL *w_cu
static void x_window_invoke_macro(GtkEntry *entry, void *userdata)
{
GSCHEM_TOPLEVEL *w_current = userdata;
+ SCM interpreter;
+
+ interpreter = scm_list_2(scm_from_locale_symbol("invoke-macro"),
+ scm_from_locale_string(gtk_entry_get_text(entry)));
+
+ g_scm_eval_protected(interpreter, SCM_UNDEFINED);
- g_scm_c_eval_string_protected(gtk_entry_get_text(entry));
gtk_widget_hide(w_current->macro_box);
gtk_widget_grab_focus(w_current->drawing_area);
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs