[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.2-20111231-7-g5033a7a)



The branch, master has been updated
       via  5033a7a8765b35c405cd5cc44269b67d17dc2b19 (commit)
       via  c5d37e544e04f42db420f9f6f3e4d042311947b7 (commit)
      from  d68a5277f1a4f1ad67a3cd9448b11d1a3dda6d01 (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.scm |    5 ++++-
 gschem/src/g_hook.c            |   10 ++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)


=================
 Commit Messages
=================

commit 5033a7a8765b35c405cd5cc44269b67d17dc2b19
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gschem: Correctly construct expressions for running hooks.
    
    In commit 71cc3eb5583b, the way hooks were run was changed from
    directly calling libguile's scm_run_hook().  Instead, an expression
    was constructed as a Scheme list structure, to be evaluated.
    
    Unfortunately, the way that the expression was constructed was wrong,
    and led to the Guile evaluator attempting (and failing) to evaluate
    gEDA OBJECT smobs.

:100644 100644 e2a37fa... 368de62... M	gschem/src/g_hook.c

commit c5d37e544e04f42db420f9f6f3e4d042311947b7
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gschem: Don't dirty page by adding default titleblock.
    
    The hook that adds the default titleblock to a newly-created, empty
    schematic page shouldn't mark the page as having been changed.  gschem
    will now no longer prompt to save when you run gschem and immediately
    quit.

:100644 100644 bcbab7c... b3fd193... M	gschem/lib/system-gschemrc.scm

=========
 Changes
=========

commit 5033a7a8765b35c405cd5cc44269b67d17dc2b19
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gschem: Correctly construct expressions for running hooks.
    
    In commit 71cc3eb5583b, the way hooks were run was changed from
    directly calling libguile's scm_run_hook().  Instead, an expression
    was constructed as a Scheme list structure, to be evaluated.
    
    Unfortunately, the way that the expression was constructed was wrong,
    and led to the Guile evaluator attempting (and failing) to evaluate
    gEDA OBJECT smobs.

diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index e2a37fa..368de62 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -37,6 +37,7 @@ SCM_SYMBOL (gschem_sym, "gschem");
 SCM_SYMBOL (core_sym, "core");
 SCM_SYMBOL (hook_sym, "hook");
 SCM_SYMBOL (run_hook_sym, "run-hook");
+SCM_SYMBOL (list_sym, "list");
 
 /*! \brief Gets a Scheme hook object by name.
  * \par Function Description
@@ -78,9 +79,10 @@ g_run_hook_object_list (GSCHEM_TOPLEVEL *w_current, const char *name,
   for (iter = obj_lst; iter != NULL; iter = g_list_next (iter)) {
     lst = scm_cons (edascm_from_object ((OBJECT *) iter->data), lst);
   }
-  SCM expr = scm_cons (run_hook_sym,
-                       scm_cons (g_get_hook_by_name (name),
-                                 scm_reverse_x (lst, SCM_EOL)));
+  SCM expr = scm_list_3 (run_hook_sym,
+                         g_get_hook_by_name (name),
+                         scm_cons (list_sym,
+                                   scm_reverse_x (lst, SCM_EOL)));
 
   g_scm_eval_protected (expr, scm_interaction_environment ());
   scm_dynwind_end ();
@@ -105,7 +107,7 @@ g_run_hook_object (GSCHEM_TOPLEVEL *w_current, const char *name, OBJECT *obj)
 
   SCM expr = scm_list_3 (run_hook_sym,
                          g_get_hook_by_name (name),
-                         scm_list_1 (edascm_from_object (obj)));
+                         scm_list_2 (list_sym, edascm_from_object (obj)));
 
   g_scm_eval_protected (expr, scm_interaction_environment ());
   scm_dynwind_end ();

commit c5d37e544e04f42db420f9f6f3e4d042311947b7
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gschem: Don't dirty page by adding default titleblock.
    
    The hook that adds the default titleblock to a newly-created, empty
    schematic page shouldn't mark the page as having been changed.  gschem
    will now no longer prompt to save when you run gschem and immediately
    quit.

diff --git a/gschem/lib/system-gschemrc.scm b/gschem/lib/system-gschemrc.scm
index bcbab7c..b3fd193 100644
--- a/gschem/lib/system-gschemrc.scm
+++ b/gschem/lib/system-gschemrc.scm
@@ -959,7 +959,10 @@
 				   (get-page-filename page)))
 		#t))
 ;      Syntax             Symbol name        X   Y    angle selectable mirrored
-       (add-component-at-xy page default-titleblock 40000 40000   0       #f       #f)))
+       (add-component-at-xy page default-titleblock 40000 40000   0       #f       #f))
+
+   ;; After adding titleblock, reset page to mark as unchanged.
+   ((@ (geda page) set-page-dirty!) (active-page) #f))
 	   #t)
 
 ; Evaluate an expression entered in the magic-colon text box.




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs