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

gEDA-cvs: gaf.git: branch: master updated (1.7.1-20110619-309-gec9259f)



The branch, master has been updated
       via  ec9259f77f9af88f0bf3dbaa1c09a92b87b2c36b (commit)
       via  71cc3eb5583b88e886d2a7bbd652db415af52259 (commit)
      from  a8cd39f99d2c354b76edc064bda1b6936c6ff736 (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/include/prototype.h |    6 +++---
 gschem/src/g_hook.c        |   42 ++++++++++++++++++++++++++++++------------
 gschem/src/i_callbacks.c   |    6 ++++--
 gschem/src/o_arc.c         |    2 +-
 gschem/src/o_attrib.c      |    7 ++++---
 gschem/src/o_box.c         |    2 +-
 gschem/src/o_bus.c         |    2 +-
 gschem/src/o_circle.c      |    2 +-
 gschem/src/o_complex.c     |   12 +++++++++---
 gschem/src/o_delete.c      |    4 ++--
 gschem/src/o_line.c        |    2 +-
 gschem/src/o_misc.c        |    4 ++--
 gschem/src/o_move.c        |    2 +-
 gschem/src/o_net.c         |    2 +-
 gschem/src/o_picture.c     |    2 +-
 gschem/src/o_pin.c         |    2 +-
 gschem/src/o_place.c       |    4 ++--
 gschem/src/o_select.c      |   12 ++++--------
 gschem/src/o_slot.c        |    2 +-
 gschem/src/x_multiattrib.c |    2 +-
 gschem/src/x_window.c      |    5 +----
 21 files changed, 72 insertions(+), 52 deletions(-)


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

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

    gschem: Correct dynamic extent for complex place list changed hook.
    
    Note that the changes in commit 71cc3eb5583b did not affect this hook,
    since it works through a different mechanism to the rest of the hooks.
    
    Closes-bug: 909193

:100644 100644 05e4cb3... 6b692fc... M	gschem/src/o_complex.c

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

    gschem: Always set gschem state fluid & catch errors for hooks.
    
    This should squash any remaining bugs of the same class as bug 908997
    or bug 908444. At some point in the future, we should do something
    helpful if an error occurs when running a hook, rather than just
    dumping it into the log and carrying on blithely.

:100644 100644 ddb6735... 4eaf435... M	gschem/include/prototype.h
:100644 100644 2b3280b... 97584e6... M	gschem/src/g_hook.c
:100644 100644 043ab70... cc3a571... M	gschem/src/i_callbacks.c
:100644 100644 6e15530... 2153062... M	gschem/src/o_arc.c
:100644 100644 ae163c5... 378012b... M	gschem/src/o_attrib.c
:100644 100644 110421a... d13dbca... M	gschem/src/o_box.c
:100644 100644 666669e... a74640c... M	gschem/src/o_bus.c
:100644 100644 815dfcb... 2ee31f0... M	gschem/src/o_circle.c
:100644 100644 94f9039... 7949790... M	gschem/src/o_delete.c
:100644 100644 81dfe95... 45962a1... M	gschem/src/o_line.c
:100644 100644 b4fc9cf... ae254b5... M	gschem/src/o_misc.c
:100644 100644 00865ed... 7b63e34... M	gschem/src/o_move.c
:100644 100644 d4b1b27... 290ca09... M	gschem/src/o_net.c
:100644 100644 d0e7683... f28fba7... M	gschem/src/o_picture.c
:100644 100644 f2a5ea7... db6fc6b... M	gschem/src/o_pin.c
:100644 100644 3cfc1da... 9af5213... M	gschem/src/o_place.c
:100644 100644 b501a44... 71e72e2... M	gschem/src/o_select.c
:100644 100644 55dffa4... 108819a... M	gschem/src/o_slot.c
:100644 100644 7466acc... c9ad9b6... M	gschem/src/x_multiattrib.c
:100644 100644 a062eaf... 20c579c... M	gschem/src/x_window.c

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

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

    gschem: Correct dynamic extent for complex place list changed hook.
    
    Note that the changes in commit 71cc3eb5583b did not affect this hook,
    since it works through a different mechanism to the rest of the hooks.
    
    Closes-bug: 909193

diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 05e4cb3..6b692fc 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -26,6 +26,7 @@
 #endif
 
 #include "gschem.h"
+#include <missing.h>
 
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
@@ -141,12 +142,17 @@ void o_complex_place_changed_run_hook(GSCHEM_TOPLEVEL *w_current) {
   if (scm_is_false (scm_hook_empty_p (complex_place_list_changed_hook)) &&
       toplevel->page_current->place_list != NULL) {
     ptr = toplevel->page_current->place_list;
+
+    scm_dynwind_begin (0);
+    g_dynwind_window (w_current);
     while (ptr) {
-      scm_run_hook(complex_place_list_changed_hook, 
-		   scm_list_1 (edascm_from_object ((OBJECT *) ptr->data)));
+      SCM expr = scm_list_3 (scm_from_utf8_symbol ("run-hook"),
+                             complex_place_list_changed_hook,
+                             edascm_from_object ((OBJECT *) ptr->data));
+      g_scm_eval_protected (expr, scm_interaction_environment ());
       ptr = g_list_next(ptr);
     }
-
+    scm_dynwind_end ();
   }
 }
 

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

    gschem: Always set gschem state fluid & catch errors for hooks.
    
    This should squash any remaining bugs of the same class as bug 908997
    or bug 908444. At some point in the future, we should do something
    helpful if an error occurs when running a hook, rather than just
    dumping it into the log and carrying on blithely.

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index ddb6735..4eaf435 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -33,9 +33,9 @@ SCM g_funcs_use_rc_values(void);
 SCM get_selected_component_attributes(GSCHEM_TOPLEVEL *w_current);
 /* g_hook.c */
 void g_init_hook ();
-void g_run_hook_object (const char *name, OBJECT *obj);
-void g_run_hook_object_list (const char *name, GList *obj_lst);
-void g_run_hook_page (const char *name, PAGE *page);
+void g_run_hook_object (GSCHEM_TOPLEVEL *w_current, const char *name, OBJECT *obj);
+void g_run_hook_object_list (GSCHEM_TOPLEVEL *w_current, const char *name, GList *obj_lst);
+void g_run_hook_page (GSCHEM_TOPLEVEL *w_current, const char *name, PAGE *page);
 /* g_keys.c */
 void g_keys_reset (GSCHEM_TOPLEVEL *w_current);
 int g_keys_execute(GSCHEM_TOPLEVEL *w_current, GdkEventKey *event);
diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index 2b3280b..97584e6 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -66,17 +66,23 @@ g_get_hook_by_name (const char *name)
  * \param obj_lst list of #OBJECT smobs as hook argument.
  */
 void
-g_run_hook_object_list (const char *name, GList *obj_lst)
+g_run_hook_object_list (GSCHEM_TOPLEVEL *w_current, const char *name,
+                        GList *obj_lst)
 {
   SCM lst = SCM_EOL;
   GList *iter;
   for (iter = obj_lst; iter != NULL; iter = g_list_next (iter)) {
     lst = scm_cons (edascm_from_object ((OBJECT *) iter->data), lst);
   }
-  SCM args = scm_list_1 (scm_reverse_x (lst, SCM_EOL));
+  SCM expr = scm_cons (run_hook_sym,
+                       scm_cons (g_get_hook_by_name (name),
+                                 scm_reverse_x (lst, SCM_EOL)));
 
-  scm_run_hook (g_get_hook_by_name (name), args);
-  scm_remember_upto_here_2 (lst, args);
+  scm_dynwind_begin (0);
+  g_dynwind_window (w_current);
+  g_scm_eval_protected (expr, scm_interaction_environment ());
+  scm_dynwind_end ();
+  scm_remember_upto_here_1 (expr);
 }
 
 /*! \brief Runs a object hook with a single OBJECT.
@@ -90,11 +96,17 @@ g_run_hook_object_list (const char *name, GList *obj_lst)
  * \param obj  #OBJECT argument for hook.
  */
 void
-g_run_hook_object (const char *name, OBJECT *obj)
+g_run_hook_object (GSCHEM_TOPLEVEL *w_current, const char *name, OBJECT *obj)
 {
-  SCM args = scm_list_1 (scm_list_1 (edascm_from_object (obj)));
-  scm_run_hook (g_get_hook_by_name (name), args);
-  scm_remember_upto_here_1 (args);
+  SCM expr = scm_list_3 (run_hook_sym,
+                         g_get_hook_by_name (name),
+                         scm_list_1 (edascm_from_object (obj)));
+
+  scm_dynwind_begin (0);
+  g_dynwind_window (w_current);
+  g_scm_eval_protected (expr, scm_interaction_environment ());
+  scm_dynwind_end ();
+  scm_remember_upto_here_1 (expr);
 }
 
 /*! \brief Runs a page hook.
@@ -106,11 +118,17 @@ g_run_hook_object (const char *name, OBJECT *obj)
  * \param page #PAGE argument for hook.
  */
 void
-g_run_hook_page (const char *name, PAGE *page)
+g_run_hook_page (GSCHEM_TOPLEVEL *w_current, const char *name, PAGE *page)
 {
-  SCM args = scm_list_1 (edascm_from_page (page));
-  scm_run_hook (g_get_hook_by_name (name), args);
-  scm_remember_upto_here_1 (args);
+  SCM expr = scm_list_3 (run_hook_sym,
+                         g_get_hook_by_name (name),
+                         edascm_from_page (page));
+
+  scm_dynwind_begin (0);
+  g_dynwind_window (w_current);
+  g_scm_eval_protected (expr, scm_interaction_environment ());
+  scm_dynwind_end ();
+  scm_remember_upto_here_1 (expr);
 }
 
 /*! \brief Create the (gschem core hook) Scheme module.
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index 043ab70..cc3a571 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -3008,7 +3008,8 @@ DEFINE_I_CALLBACK(attributes_attach)
   }
 
   if (attached_objects != NULL) {
-    g_run_hook_object_list ("%attach-attribs-hook", attached_objects);
+    g_run_hook_object_list (w_current, "%attach-attribs-hook",
+                            attached_objects);
     g_list_free (attached_objects);
   }
 
@@ -3054,7 +3055,8 @@ DEFINE_I_CALLBACK(attributes_detach)
   }
 
   if (detached_attribs != NULL) {
-    g_run_hook_object_list ("%detach-attribs-hook", detached_attribs);
+    g_run_hook_object_list (w_current, "%detach-attribs-hook",
+                            detached_attribs);
     g_list_free (detached_attribs);
   }
 
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index 6e15530..2153062 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -211,7 +211,7 @@ void o_arc_end4(GSCHEM_TOPLEVEL *w_current, int radius,
   w_current->distance = 0;
 
   /* Call add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED = 1;
   
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index ae163c5..378012b 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -71,7 +71,8 @@ void o_attrib_add_selected(GSCHEM_TOPLEVEL *w_current, SELECTION *selection,
 
   if (selected_objects != NULL) {
     /* Run select-objects-hook */
-    g_run_hook_object_list ("%select-objects-hook", selected_objects);
+    g_run_hook_object_list (w_current, "%select-objects-hook",
+                            selected_objects);
     g_list_free (selected_objects);
   }
 }
@@ -280,8 +281,8 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
   }
 
   /* Call add-objects-hook. */
-  g_run_hook_object ("%add-objects-hook", new_obj);
-  g_run_hook_object ("%select-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%select-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED = 1;
 
diff --git a/gschem/src/o_box.c b/gschem/src/o_box.c
index 110421a..d13dbca 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -457,7 +457,7 @@ void o_box_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   w_current->second_wy  = (-1);
 	
   /* Call add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED = 1;
 
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 666669e..a74640c 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -194,7 +194,7 @@ int o_bus_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   g_list_free (prev_conn_objects);
 
   /* Call add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED=1;
   w_current->first_wx = w_current->second_wx;
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index 815dfcb..2ee31f0 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -428,7 +428,7 @@ void o_circle_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* Call add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED = 1;
   o_undo_savestate(w_current, UNDO_ALL);
diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index 94f9039..7949790 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -43,7 +43,7 @@ void o_delete (GSCHEM_TOPLEVEL *w_current, OBJECT *object)
 
   o_selection_remove (toplevel, toplevel->page_current->selection_list, object);
   s_page_remove (toplevel, toplevel->page_current, object);
-  g_run_hook_object ("%remove-objects-hook", object);
+  g_run_hook_object (w_current, "%remove-objects-hook", object);
   s_delete_object (toplevel, object);
 
   toplevel->page_current->CHANGED = 1;
@@ -73,7 +73,7 @@ void o_delete_selected (GSCHEM_TOPLEVEL *w_current)
     s_page_remove (toplevel, toplevel->page_current, obj);
   }
 
-  g_run_hook_object_list ("%remove-objects-hook", to_remove);
+  g_run_hook_object_list (w_current, "%remove-objects-hook", to_remove);
 
   for (iter = to_remove; iter != NULL; iter = g_list_next (iter)) {
     s_delete_object (toplevel, (OBJECT *) iter->data);
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index 81dfe95..45962a1 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -174,7 +174,7 @@ void o_line_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* Call add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED=1;
   o_undo_savestate(w_current, UNDO_ALL);
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index b4fc9cf..ae254b5 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -226,7 +226,7 @@ void o_rotate_world_update(GSCHEM_TOPLEVEL *w_current,
   o_invalidate_glist (w_current, list);
 
   /* Run rotate-objects-hook */
-  g_run_hook_object_list ("%rotate-objects-hook", list);
+  g_run_hook_object_list (w_current, "%rotate-objects-hook", list);
 
   /* Don't save the undo state if we are inside an action */
   /* This is useful when rotating the selection while moving, for example */
@@ -280,7 +280,7 @@ void o_mirror_world_update(GSCHEM_TOPLEVEL *w_current, int centerx, int centery,
   o_invalidate_glist (w_current, list);
 
   /* Run mirror-objects-hook */
-  g_run_hook_object_list ("%mirror-objects-hook", list);
+  g_run_hook_object_list (w_current, "%mirror-objects-hook", list);
 
   toplevel->page_current->CHANGED=1;
   o_undo_savestate(w_current, UNDO_ALL);
diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index 00865ed..7b63e34 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -226,7 +226,7 @@ void o_move_end(GSCHEM_TOPLEVEL *w_current)
                                      rubbernet_objects);
   toplevel->page_current->place_list = NULL;
   rubbernet_objects = NULL;
-  g_run_hook_object_list ("%move-objects-hook", moved_list);
+  g_run_hook_object_list (w_current, "%move-objects-hook", moved_list);
   g_list_free (moved_list);
 
   toplevel->page_current->CHANGED = 1;
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index d4b1b27..290ca09 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -657,7 +657,7 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 
   /* Call add-objects-hook */
   if (added_objects != NULL) {
-    g_run_hook_object_list ("%add-objects-hook", added_objects);
+    g_run_hook_object_list (w_current, "%add-objects-hook", added_objects);
     g_list_free (added_objects);
   }
 
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index d0e7683..f28fba7 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -113,7 +113,7 @@ void o_picture_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* Run %add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED = 1;
   o_undo_savestate(w_current, UNDO_ALL);
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index f2a5ea7..db6fc6b 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -143,7 +143,7 @@ void o_pin_end(GSCHEM_TOPLEVEL *w_current, int x, int y)
   s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* Call add-objects-hook */
-  g_run_hook_object ("%add-objects-hook", new_obj);
+  g_run_hook_object (w_current, "%add-objects-hook", new_obj);
 
   toplevel->page_current->CHANGED=1;
   o_undo_savestate(w_current, UNDO_ALL);
diff --git a/gschem/src/o_place.c b/gschem/src/o_place.c
index 3cfc1da..9af5213 100644
--- a/gschem/src/o_place.c
+++ b/gschem/src/o_place.c
@@ -102,7 +102,7 @@ void o_place_end (GSCHEM_TOPLEVEL *w_current,
   }
 
   if (hook_name != NULL) {
-    g_run_hook_object_list (hook_name, temp_dest_list);
+    g_run_hook_object_list (w_current, hook_name, temp_dest_list);
   }
 
   o_invalidate_glist (w_current, connected_objects);
@@ -322,6 +322,6 @@ void o_place_rotate (GSCHEM_TOPLEVEL *w_current)
 
 
   /* Run rotate-objects-hook */
-  g_run_hook_object_list ("%rotate-objects-hook",
+  g_run_hook_object_list (w_current, "%rotate-objects-hook",
                           toplevel->page_current->place_list);
 }
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index b501a44..71e72e2 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -52,11 +52,11 @@ void o_select_run_hooks(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int flag)
   switch (flag) {
   /* If flag == 0, then we are deselecting something. */
   case 0:
-    g_run_hook_object ("%deselect-objects-hook", o_current);
+    g_run_hook_object (w_current, "%deselect-objects-hook", o_current);
     break;
   /* If flag == 1, then we are selecting something. */
   case 1:
-    g_run_hook_object ("%select-objects-hook", o_current);
+    g_run_hook_object (w_current, "%select-objects-hook", o_current);
     break;
   default:
     g_assert_not_reached ();
@@ -459,11 +459,7 @@ void o_select_unselect_all(GSCHEM_TOPLEVEL *w_current)
 
   /* Call hooks */
   if (removed != NULL) {
-    scm_dynwind_begin (0);
-    g_dynwind_window (w_current);
-    scm_dynwind_unwind_handler (g_list_free, removed, SCM_F_WIND_EXPLICITLY);
-    g_run_hook_object_list ("%deselect-objects-hook", removed);
-    scm_dynwind_end ();
+    g_run_hook_object_list (w_current, "%deselect-objects-hook", removed);
   }
 }
 
@@ -511,7 +507,7 @@ o_select_visible_unlocked (GSCHEM_TOPLEVEL *w_current)
   /* Run hooks for all items selected */
   added = geda_list_get_glist (selection);
   if (added != NULL) {
-    g_run_hook_object_list ("%select-objects-hook", added);
+    g_run_hook_object_list (w_current, "%select-objects-hook", added);
   }
 }
 
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index 55dffa4..108819a 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -127,7 +127,7 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, OBJECT *object, const char *string)
     o_attrib_attach (toplevel, new_obj, object, FALSE);
 
     /* Call add-objects-hook */
-    g_run_hook_object ("%add-objects-hook", new_obj);
+    g_run_hook_object (w_current, "%add-objects-hook", new_obj);
   }
 
   s_slot_update_object (toplevel, object);
diff --git a/gschem/src/x_multiattrib.c b/gschem/src/x_multiattrib.c
index 7466acc..c9ad9b6 100644
--- a/gschem/src/x_multiattrib.c
+++ b/gschem/src/x_multiattrib.c
@@ -730,7 +730,7 @@ static void multiattrib_action_promote_attribute (GSCHEM_TOPLEVEL *w_current,
       /* note: this object is unselected (not added to selection). */
 
       /* Call add-objects-hook */
-      g_run_hook_object ("%add-objects-hook", o_new);
+      g_run_hook_object (w_current, "%add-objects-hook", o_new);
   }
   w_current->toplevel->page_current->CHANGED = 1;
   o_undo_savestate (w_current, UNDO_ALL);
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index a062eaf..20c579c 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -758,10 +758,7 @@ x_window_open_page (GSCHEM_TOPLEVEL *w_current, const gchar *filename)
       s_log_message (_("New file [%s]\n"),
                      toplevel->page_current->page_filename);
 
-    scm_dynwind_begin (0);
-    g_dynwind_window (w_current);
-    g_run_hook_page ("%new-page-hook", toplevel->page_current);
-    scm_dynwind_end ();
+    g_run_hook_page (w_current, "%new-page-hook", toplevel->page_current);
   }
 
   a_zoom_extents (w_current,




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