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

gEDA-cvs: gaf.git: branch: master updated (1.7.2-20111231-24-g8342bdd)



The branch, master has been updated
       via  8342bddce4487edf4a7214d5d6ab83cb73a066d4 (commit)
       via  531a20a15301167d29012c44bfc2b1b0a837d7bb (commit)
       via  81d2d6019ecb4ef0b9f109153cd1c9803e39045a (commit)
       via  0810ec21f6d50823664f872c735244fc29a6ed5b (commit)
       via  dafe58d7440161eadd4f524564fbe9e6e88ee65a (commit)
       via  65c68f98cc4bf5d26a091abf336b2e00c7bbcabb (commit)
       via  6cae96ed0629a87bd71cecce4cc966e58b8bd0af (commit)
       via  042612a5cc35bfafbf0f862a6db78ec66cd022a7 (commit)
       via  c90c6a2728179785c4da5241e043cdcbcf197915 (commit)
       via  b5f994f7c439cb0fbc863eec4843594165986683 (commit)
      from  58af3327f4fbca32597f7081cc84453fdf4c8dee (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/src/gschem.c                 |   16 ++++
 gschem/src/o_cue.c                  |   42 ++--------
 libgeda/include/libgeda/prototype.h |   13 +++-
 libgeda/include/libgeda/struct.h    |   27 +++++++
 libgeda/include/prototype_priv.h    |    1 +
 libgeda/src/a_basic.c               |    2 +
 libgeda/src/libgeda.c               |    1 +
 libgeda/src/o_attrib.c              |   74 ++++++++++++++++++
 libgeda/src/o_net_basic.c           |  146 +++++++++++++++++++++++++++++++++++
 libgeda/src/o_text_basic.c          |    3 +
 libgeda/src/s_basic.c               |   17 ++++-
 libgeda/src/s_conn.c                |  121 +++++++++++++++++++++++++++--
 libgeda/src/s_cue.c                 |   15 +++-
 libgeda/src/s_toplevel.c            |   36 +++++++++
 14 files changed, 469 insertions(+), 45 deletions(-)


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

commit 8342bddce4487edf4a7214d5d6ab83cb73a066d4
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: refresh pin-cues on connectivity change
    
    Closes-bug: lp-707064

:100644 100644 d33d35d... 1bb96c1... M	gschem/src/gschem.c

commit 531a20a15301167d29012c44bfc2b1b0a837d7bb
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: use hooks to refresh conn cache
    
    Affects-bug: lp-707064

:100644 100644 927f672... d6bc029... M	libgeda/include/prototype_priv.h
:100644 100644 be41a13... 323132a... M	libgeda/src/libgeda.c
:100644 100644 1a8a6ec... 518bc8e... M	libgeda/src/s_conn.c

commit 81d2d6019ecb4ef0b9f109153cd1c9803e39045a
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: add hook for TOPLEVEL object creation
    
    Affects-bug: lp-707064

:100644 100644 78dcc8d... 7d9bb40... M	libgeda/include/libgeda/prototype.h
:100644 100644 73e82f4... e0a448c... M	libgeda/include/libgeda/struct.h
:100644 100644 6e27427... c891f9d... M	libgeda/src/s_toplevel.c

commit 0810ec21f6d50823664f872c735244fc29a6ed5b
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: add hooks for connection change notification
    
    Affects-bug: lp-707064

:100644 100644 bb0fcd0... 78dcc8d... M	libgeda/include/libgeda/prototype.h
:100644 100644 86fbdc4... 73e82f4... M	libgeda/include/libgeda/struct.h
:100644 100644 99d307d... 5923813... M	libgeda/src/s_basic.c
:100644 100644 a6b207d... 1a8a6ec... M	libgeda/src/s_conn.c
:100644 100644 b9bcf47... 6e27427... M	libgeda/src/s_toplevel.c

commit dafe58d7440161eadd4f524564fbe9e6e88ee65a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    Attribute change hooks
    
    Affects-bug: lp-707064

:100644 100644 70239ca... bb0fcd0... M	libgeda/include/libgeda/prototype.h
:100644 100644 eba1305... 86fbdc4... M	libgeda/include/libgeda/struct.h
:100644 100644 9be1f1b... abfaa0a... M	libgeda/src/a_basic.c
:100644 100644 cd2cb19... 4893131... M	libgeda/src/o_attrib.c
:100644 100644 2b7afe0... 40e26c0... M	libgeda/src/o_text_basic.c
:100644 100644 4256f9e... 99d307d... M	libgeda/src/s_basic.c
:100644 100644 45597c4... b9bcf47... M	libgeda/src/s_toplevel.c

commit 65c68f98cc4bf5d26a091abf336b2e00c7bbcabb
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: skip printing endpoint cues on fully connected nets
    
    Affects-bug: lp-707064

:100644 100644 d378c84... f604e11... M	libgeda/src/s_cue.c

commit 6cae96ed0629a87bd71cecce4cc966e58b8bd0af
Author: Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: skip drawing endpoint cues on fully connected nets
    
    Affects-bug: lp-707064

:100644 100644 beb6283... 1f9b09f... M	gschem/src/o_cue.c

commit 042612a5cc35bfafbf0f862a6db78ec66cd022a7
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: add functions to track net connectivity
    
    o_net_is_fully_connected can be used to check if the net is connected to
    at least two separate endpoints - endpoint being a pin, bus or a named
    net (through a netname attribute).
    
    o_net_refresh_conn_cache should be used to update cached state after
    connectivity change.
    
    For each net segment the number of connected enpoints is cached in new
    fields of OBJECT structure: net_num_connected and valid_num_connected.
    
    Affects-bug: lp-707064

:100644 100644 9e9f0bc... 70239ca... M	libgeda/include/libgeda/prototype.h
:100644 100644 780da2a... eba1305... M	libgeda/include/libgeda/struct.h
:100644 100644 3fa642f... 323ded6... M	libgeda/src/o_net_basic.c
:100644 100644 476f249... 4256f9e... M	libgeda/src/s_basic.c

commit c90c6a2728179785c4da5241e043cdcbcf197915
Author: Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: print unconnected pin ends as boxes
    
    Closes-bug: lp-706552

:100644 100644 b50c679... d378c84... M	libgeda/src/s_cue.c

commit b5f994f7c439cb0fbc863eec4843594165986683
Author: Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: replace pin end markings with boxes
    
    Affects-bug: lp-706552

:100644 100644 3ac6413... beb6283... M	gschem/src/o_cue.c

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

commit 8342bddce4487edf4a7214d5d6ab83cb73a066d4
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: refresh pin-cues on connectivity change
    
    Closes-bug: lp-707064

diff --git a/gschem/src/gschem.c b/gschem/src/gschem.c
index d33d35d..1bb96c1 100644
--- a/gschem/src/gschem.c
+++ b/gschem/src/gschem.c
@@ -120,6 +120,17 @@ void gschem_quit(void)
   gtk_main_quit();
 }
 
+static void add_libgeda_toplevel_hooks (TOPLEVEL *toplevel,
+                                        GSCHEM_TOPLEVEL *w_current)
+{
+    o_attrib_append_attribs_changed_hook (toplevel,
+                                          (AttribsChangedFunc) o_invalidate,
+                                          w_current);
+    s_conn_append_conns_changed_hook (toplevel,
+                                      (ConnsChangedFunc) o_invalidate,
+                                      w_current);
+}
+
 /*! \brief Main Scheme(GUILE) program function.
  *  \par Function Description
  *  This function is the main program called from scm_boot_guile.
@@ -221,6 +232,11 @@ void main_prog(void *closure, int argc, char *argv[])
 
   /* Allocate w_current */
   w_current = gschem_toplevel_new ();
+
+  /* Connect hooks that run for each s_toplevel_new() first */
+  s_toplevel_append_new_hook ((NewToplevelFunc) add_libgeda_toplevel_hooks,
+                              w_current);
+
   w_current->toplevel = s_toplevel_new ();
 
   w_current->toplevel->load_newer_backup_func = x_fileselect_load_backup;

commit 531a20a15301167d29012c44bfc2b1b0a837d7bb
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: use hooks to refresh conn cache
    
    Affects-bug: lp-707064

diff --git a/libgeda/include/prototype_priv.h b/libgeda/include/prototype_priv.h
index 927f672..d6bc029 100644
--- a/libgeda/include/prototype_priv.h
+++ b/libgeda/include/prototype_priv.h
@@ -226,6 +226,7 @@ int s_conn_uniq(GList *conn_list, CONN *input_conn);
 int s_conn_remove_other(TOPLEVEL *toplevel, OBJECT *other_object, OBJECT *to_remove);
 OBJECT *s_conn_check_midpoint(OBJECT *o_current, int x, int y);
 void s_conn_print(GList *conn_list);
+void s_conn_init(void);
 
 /* s_encoding.c */
 gchar* s_encoding_base64_encode (gchar* src, guint srclen, guint* dstlenp, gboolean strict);
diff --git a/libgeda/src/libgeda.c b/libgeda/src/libgeda.c
index be41a13..323132a 100644
--- a/libgeda/src/libgeda.c
+++ b/libgeda/src/libgeda.c
@@ -64,6 +64,7 @@ void libgeda_init(void)
   s_menu_init();
   s_attrib_init();
   s_color_init();
+  s_conn_init();
 
   g_register_libgeda_funcs();
   g_register_libgeda_dirs();
diff --git a/libgeda/src/s_conn.c b/libgeda/src/s_conn.c
index 1a8a6ec..518bc8e 100644
--- a/libgeda/src/s_conn.c
+++ b/libgeda/src/s_conn.c
@@ -714,3 +714,33 @@ void s_conn_thaw_hooks (TOPLEVEL *toplevel, OBJECT *object)
       object->conn_notify_pending)
     s_conn_emit_conns_changed (toplevel, object);
 }
+
+static void refresh_connectivity_cache (TOPLEVEL *toplevel, OBJECT *object)
+{
+    if (object->type == OBJ_NET) {
+        /* FIXME: suboptimal to refresh cache every time */
+        /* better approach would invalidate cache without refresh */
+        /* refresh would be done on redraw of pin cues */
+        o_net_refresh_conn_cache (toplevel, object);
+    }
+}
+
+static void s_conn_init_toplevel (TOPLEVEL *toplevel)
+{
+    /* Connect the hooks for tracking net connectivity here */
+    s_conn_append_conns_changed_hook (toplevel,
+                                      (ConnsChangedFunc)
+                                          refresh_connectivity_cache,
+                                      toplevel);
+
+    o_attrib_append_attribs_changed_hook (toplevel,
+                                          (AttribsChangedFunc)
+                                              refresh_connectivity_cache,
+                                          toplevel);
+}
+
+void s_conn_init (void)
+{
+    s_toplevel_append_new_hook ((NewToplevelFunc) s_conn_init_toplevel,
+                                NULL);
+}

commit 81d2d6019ecb4ef0b9f109153cd1c9803e39045a
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: add hook for TOPLEVEL object creation
    
    Affects-bug: lp-707064

diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 78dcc8d..7d9bb40 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -398,7 +398,8 @@ void s_papersizes_get_size(char *string, int *width, int *height);
 PATH *s_path_parse (const char *path_str);
 char *s_path_string_from_path (const PATH *path);
 
-/* s_project.c */
+/* s_toplevel.c */
+void s_toplevel_append_new_hook (NewToplevelFunc func, void *user_data);
 TOPLEVEL *s_toplevel_new (void);
 void s_toplevel_delete (TOPLEVEL *toplevel);
 void s_toplevel_weak_ref (TOPLEVEL *toplevel, void (*notify_func)(void *, void *), void *user_data);
diff --git a/libgeda/include/libgeda/struct.h b/libgeda/include/libgeda/struct.h
index 73e82f4..e0a448c 100644
--- a/libgeda/include/libgeda/struct.h
+++ b/libgeda/include/libgeda/struct.h
@@ -431,6 +431,9 @@ typedef int(*RenderedBoundsFunc)(void *, OBJECT *, int *, int *, int *, int *);
 /*! \brief Type of callback function for object damage notification */
 typedef int(*ChangeNotifyFunc)(void *, OBJECT *);
 
+/*! \brief Type of callback function for notification when a new TOPLEVEL is created */
+typedef void(*NewToplevelFunc)(TOPLEVEL *, void *);
+
 /*! \brief Type of callback function for notification when an object's attributes change */
 typedef void(*AttribsChangedFunc)(void *, OBJECT *);
 
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index 6e27427..c891f9d 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -34,6 +34,34 @@
 #include <dmalloc.h>
 #endif
 
+static GList *new_toplevel_hooks = NULL;
+
+typedef struct {
+  NewToplevelFunc func;
+  void *data;
+} NewToplevelHook;
+
+
+void s_toplevel_append_new_hook (NewToplevelFunc func, void *data)
+{
+  NewToplevelHook *new_hook;
+
+  new_hook = g_new0 (NewToplevelHook, 1);
+  new_hook->func = func;
+  new_hook->data = data;
+
+  new_toplevel_hooks = g_list_append (new_toplevel_hooks, new_hook);
+}
+
+
+static void call_new_toplevel_hook (gpointer hook, gpointer toplevel)
+{
+  NewToplevelHook *h = (NewToplevelHook*) hook;
+  TOPLEVEL *t = (TOPLEVEL*) toplevel;
+
+  h->func (t, h->data);
+}
+
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -147,6 +175,10 @@ TOPLEVEL *s_toplevel_new (void)
   toplevel->auto_save_timeout = 0;
 
   toplevel->weak_refs = NULL;
+
+  /* Call hooks */
+  g_list_foreach (new_toplevel_hooks, call_new_toplevel_hook, toplevel);
+
   return toplevel;
 }
 

commit 0810ec21f6d50823664f872c735244fc29a6ed5b
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: add hooks for connection change notification
    
    Affects-bug: lp-707064

diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index bb0fcd0..78dcc8d 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -324,6 +324,10 @@ void s_conn_remove_object(TOPLEVEL *toplevel, OBJECT *to_remove);
 void s_conn_update_object(TOPLEVEL *toplevel, OBJECT *object);
 int s_conn_net_search(OBJECT* new_net, int whichone, GList * conn_list);
 GList *s_conn_return_others(GList *input_list, OBJECT *object);
+void s_conn_append_conns_changed_hook(TOPLEVEL *toplevel, ConnsChangedFunc func, void *data);
+void s_conn_emit_conns_changed(TOPLEVEL *toplevel, OBJECT *object);
+void s_conn_freeze_hooks(TOPLEVEL *toplevel, OBJECT *object);
+void s_conn_thaw_hooks(TOPLEVEL *toplevel, OBJECT *object);
 
 /* s_cue.c */
 void s_cue_postscript_fillbox(TOPLEVEL *toplevel, FILE *fp, int x, int y);
diff --git a/libgeda/include/libgeda/struct.h b/libgeda/include/libgeda/struct.h
index 86fbdc4..73e82f4 100644
--- a/libgeda/include/libgeda/struct.h
+++ b/libgeda/include/libgeda/struct.h
@@ -291,6 +291,10 @@ struct st_object {
   /* Attribute notification handling */
   int attrib_notify_freeze_count;
   int attrib_notify_pending;
+
+  /* Connection notification handling */
+  int conn_notify_freeze_count;
+  int conn_notify_pending;
 }; 
 
 
@@ -430,6 +434,9 @@ typedef int(*ChangeNotifyFunc)(void *, OBJECT *);
 /*! \brief Type of callback function for notification when an object's attributes change */
 typedef void(*AttribsChangedFunc)(void *, OBJECT *);
 
+/*! \brief Type of callback function for notification when an object's connections change */
+typedef void(*ConnsChangedFunc)(void *, OBJECT *);
+
 /*! \brief Type of callback function for querying loading of backups */
 typedef gboolean(*LoadBackupQueryFunc)(void *, GString *);
 
@@ -560,6 +567,9 @@ struct st_toplevel {
   /* Callback functions for object attribute change notification */
   GList *attribs_changed_hooks;
 
+  /* Callback functions for object connections change notification */
+  GList *conns_changed_hooks;
+
   /* Callback function for deciding whether to load a backup file. */
   LoadBackupQueryFunc load_newer_backup_func;
   void *load_newer_backup_data;
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 99d307d..5923813 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -129,6 +129,9 @@ OBJECT *s_basic_init_object(OBJECT *new_node, int type, char const *name)
   new_node->attrib_notify_freeze_count = 0;
   new_node->attrib_notify_pending = 0;
 
+  new_node->conn_notify_freeze_count = 0;
+  new_node->conn_notify_pending = 0;
+
   return(new_node);
 }
 
diff --git a/libgeda/src/s_conn.c b/libgeda/src/s_conn.c
index a6b207d..1a8a6ec 100644
--- a/libgeda/src/s_conn.c
+++ b/libgeda/src/s_conn.c
@@ -150,6 +150,7 @@ int s_conn_remove_other (TOPLEVEL *toplevel, OBJECT *other_object,
               other_object->bus_ripper_direction = 0;
             }
 #endif
+        s_conn_emit_conns_changed (toplevel, other_object);
             
 	    return (TRUE);
 	}
@@ -203,11 +204,14 @@ void s_conn_remove_object (TOPLEVEL *toplevel, OBJECT *to_remove)
            c_iter = g_list_next (c_iter)) {
         conn = c_iter->data;
 
+
+        s_conn_freeze_hooks (toplevel, conn->other_object);
         /* keep calling this till it returns false (all refs removed) */
         /* there is NO body to this while loop */
         while (s_conn_remove_other (toplevel, conn->other_object, to_remove));
 
         c_iter->data = NULL;
+        s_conn_thaw_hooks (toplevel, conn->other_object);
         g_free (conn);
       }
 
@@ -220,6 +224,8 @@ void s_conn_remove_object (TOPLEVEL *toplevel, OBJECT *to_remove)
       s_conn_remove_glist (toplevel, to_remove->complex->prim_objs);
       break;
   }
+
+  s_conn_emit_conns_changed (toplevel, to_remove);
 }
 
 /*! \brief Checks if a point is a midpoint of an OBJECT
@@ -327,7 +333,8 @@ static int check_direct_compat (OBJECT *object1, OBJECT *object2)
 }
 
 
-static void add_connection (OBJECT *object, OBJECT *other_object,
+static void add_connection (TOPLEVEL *toplevel,
+                            OBJECT *object, OBJECT *other_object,
                             int type, int x, int y,
                             int whichone, int other_whichone)
 {
@@ -337,6 +344,8 @@ static void add_connection (OBJECT *object, OBJECT *other_object,
   /* Do uniqness check */
   if (s_conn_uniq (object->conn_list, new_conn)) {
     object->conn_list = g_list_append (object->conn_list, new_conn);
+    s_conn_emit_conns_changed (toplevel, object);
+    s_conn_emit_conns_changed (toplevel, other_object);
   } else {
     g_free (new_conn);
   }
@@ -360,6 +369,8 @@ static void s_conn_update_line_object (TOPLEVEL *toplevel, OBJECT *object)
   OBJECT *found;
   int j, k;
 
+  s_conn_freeze_hooks (toplevel, object);
+
   /* loop over all tiles which object appears in */
   for (tl_current = object->tiles;
        tl_current != NULL;
@@ -374,6 +385,8 @@ static void s_conn_update_line_object (TOPLEVEL *toplevel, OBJECT *object)
       if (object == other_object)
         continue;
 
+      s_conn_freeze_hooks (toplevel, other_object);
+
       /* Here is where you check the end points */
       /* Check both end points of the other object */
       for (k = 0; k < 2; k++) {
@@ -397,11 +410,11 @@ static void s_conn_update_line_object (TOPLEVEL *toplevel, OBJECT *object)
 
             o_emit_pre_change_notify (toplevel, other_object);
 
-            add_connection (object, other_object, CONN_ENDPOINT,
+            add_connection (toplevel, object, other_object, CONN_ENDPOINT,
                             other_object->line->x[k],
                             other_object->line->y[k], j, k);
 
-            add_connection (other_object, object, CONN_ENDPOINT,
+            add_connection (toplevel, other_object, object, CONN_ENDPOINT,
                             object->line->x[j],
                             object->line->y[j], k, j);
 
@@ -428,13 +441,14 @@ static void s_conn_update_line_object (TOPLEVEL *toplevel, OBJECT *object)
             ((object->type == OBJ_NET && other_object->type == OBJ_BUS) ||
               check_direct_compat (object, other_object))) {
 
-          add_connection (object, other_object, CONN_MIDPOINT,
+          add_connection (toplevel, object, other_object, CONN_MIDPOINT,
                           object->line->x[k],
                           object->line->y[k], k, -1);
 
-          add_connection (other_object, object, CONN_MIDPOINT,
+          add_connection (toplevel, other_object, object, CONN_MIDPOINT,
                           object->line->x[k],
                           object->line->y[k], -1, k);
+
         }
       }
 
@@ -457,22 +471,25 @@ static void s_conn_update_line_object (TOPLEVEL *toplevel, OBJECT *object)
              ((object->type == OBJ_BUS && other_object->type == OBJ_NET) ||
                check_direct_compat (object, other_object))) {
 
-          add_connection (object, other_object, CONN_MIDPOINT,
+          add_connection (toplevel, object, other_object, CONN_MIDPOINT,
                           other_object->line->x[k],
                           other_object->line->y[k], -1, k);
 
-          add_connection (other_object, object, CONN_MIDPOINT,
+          add_connection (toplevel, other_object, object, CONN_MIDPOINT,
                           other_object->line->x[k],
                           other_object->line->y[k], k, -1);
         }
       }
 
+      s_conn_thaw_hooks (toplevel, other_object);
     }
   }
 
 #if DEBUG
   s_conn_print(object->conn_list);
 #endif
+
+  s_conn_thaw_hooks (toplevel, object);
 }
 
 /*! \brief add an OBJECT to the connection system
@@ -637,3 +654,63 @@ GList *s_conn_return_others(GList *input_list, OBJECT *object)
 
   return return_list;
 }
+
+
+typedef struct {
+  ConnsChangedFunc func;
+  void *data;
+} ConnsChangedHook;
+
+
+void s_conn_append_conns_changed_hook (TOPLEVEL *toplevel,
+                                       ConnsChangedFunc func,
+                                       void *data)
+{
+  ConnsChangedHook *new_hook;
+
+  new_hook = g_new0 (ConnsChangedHook, 1);
+  new_hook->func = func;
+  new_hook->data = data;
+
+  toplevel->conns_changed_hooks =
+    g_list_append (toplevel->conns_changed_hooks, new_hook);
+}
+
+
+static void call_conns_changed_hook (gpointer data, gpointer user_data)
+{
+  ConnsChangedHook *hook = data;
+  OBJECT *object = user_data;
+
+  hook->func (hook->data, object);
+}
+
+
+void s_conn_emit_conns_changed (TOPLEVEL *toplevel, OBJECT *object)
+{
+  if (object->conn_notify_freeze_count > 0) {
+    object->conn_notify_pending = 1;
+    return;
+  }
+
+  object->conn_notify_pending = 0;
+
+  g_list_foreach (toplevel->conns_changed_hooks,
+                  call_conns_changed_hook, object);
+}
+
+void s_conn_freeze_hooks (TOPLEVEL *toplevel, OBJECT *object)
+{
+  object->conn_notify_freeze_count += 1;
+}
+
+void s_conn_thaw_hooks (TOPLEVEL *toplevel, OBJECT *object)
+{
+  g_return_if_fail (object->conn_notify_freeze_count > 0);
+
+  object->conn_notify_freeze_count -= 1;
+
+  if (object->conn_notify_freeze_count == 0 &&
+      object->conn_notify_pending)
+    s_conn_emit_conns_changed (toplevel, object);
+}
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index b9bcf47..6e27427 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -137,6 +137,8 @@ TOPLEVEL *s_toplevel_new (void)
 
   toplevel->attribs_changed_hooks = NULL;
 
+  toplevel->conns_changed_hooks = NULL;
+
   toplevel->load_newer_backup_func = NULL;
   toplevel->load_newer_backup_data = NULL;
 

commit dafe58d7440161eadd4f524564fbe9e6e88ee65a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    Attribute change hooks
    
    Affects-bug: lp-707064

diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 70239ca..bb0fcd0 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -89,6 +89,10 @@ char *o_attrib_search_inherited_attribs_by_name (OBJECT *object, char *name, int
 char *o_attrib_search_object_attribs_by_name (OBJECT *object, char *name, int counter);
 GList *o_attrib_return_attribs(OBJECT *object);
 int o_attrib_is_inherited(OBJECT *attrib);
+void o_attrib_append_attribs_changed_hook(TOPLEVEL *toplevel, AttribsChangedFunc func, void *data);
+void o_attrib_emit_attribs_changed(TOPLEVEL *toplevel, OBJECT *object);
+void o_attrib_freeze_hooks(TOPLEVEL *toplevel, OBJECT *object);
+void o_attrib_thaw_hooks(TOPLEVEL *toplevel, OBJECT *object);
 
 /* o_basic.c */
 int inside_region(int xmin, int ymin, int xmax, int ymax, int x, int y);
diff --git a/libgeda/include/libgeda/struct.h b/libgeda/include/libgeda/struct.h
index eba1305..86fbdc4 100644
--- a/libgeda/include/libgeda/struct.h
+++ b/libgeda/include/libgeda/struct.h
@@ -287,6 +287,10 @@ struct st_object {
   OBJECT *copied_to;    /* used when copying attributes */
 
   GList *weak_refs; /* Weak references */
+
+  /* Attribute notification handling */
+  int attrib_notify_freeze_count;
+  int attrib_notify_pending;
 }; 
 
 
@@ -423,6 +427,9 @@ typedef int(*RenderedBoundsFunc)(void *, OBJECT *, int *, int *, int *, int *);
 /*! \brief Type of callback function for object damage notification */
 typedef int(*ChangeNotifyFunc)(void *, OBJECT *);
 
+/*! \brief Type of callback function for notification when an object's attributes change */
+typedef void(*AttribsChangedFunc)(void *, OBJECT *);
+
 /*! \brief Type of callback function for querying loading of backups */
 typedef gboolean(*LoadBackupQueryFunc)(void *, GString *);
 
@@ -550,6 +557,9 @@ struct st_toplevel {
   /* Callback functions for object change notification */
   GList *change_notify_funcs;
 
+  /* Callback functions for object attribute change notification */
+  GList *attribs_changed_hooks;
+
   /* Callback function for deciding whether to load a backup file. */
   LoadBackupQueryFunc load_newer_backup_func;
   void *load_newer_backup_data;
diff --git a/libgeda/src/a_basic.c b/libgeda/src/a_basic.c
index 9be1f1b..abfaa0a 100644
--- a/libgeda/src/a_basic.c
+++ b/libgeda/src/a_basic.c
@@ -388,11 +388,13 @@ GList *o_read_buffer (TOPLEVEL *toplevel, GList *object_list,
         break;
 
       case(STARTATTACH_ATTR): 
+        o_attrib_freeze_hooks (toplevel, new_obj);
         /* first is the fp */
         /* 2nd is the object to get the attributes */
         new_obj_list = o_read_attribs (toplevel, NULL, new_obj, tb, release_ver, fileformat_ver);
         new_obj_list = g_list_reverse (new_obj_list);
         object_list = g_list_concat (new_obj_list, object_list);
+        o_attrib_thaw_hooks (toplevel, new_obj);
 
         /* by now we have finished reading all the attributes */
         /* did we just finish attaching to a complex object? */
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index cd2cb19..4893131 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -70,6 +70,8 @@ void o_attrib_add(TOPLEVEL *toplevel, OBJECT *object, OBJECT *item)
   /* Add link from item to attrib listing */
   item->attached_to = object;
   object->attribs = g_list_append (object->attribs, item);
+
+  o_attrib_emit_attribs_changed (toplevel, object);
 }
 
 
@@ -166,16 +168,21 @@ void o_attrib_detach_all(TOPLEVEL *toplevel, OBJECT *object)
   OBJECT *a_current;
   GList *a_iter;
 
+  o_attrib_freeze_hooks (toplevel, object);
+
   for (a_iter = object->attribs; a_iter != NULL;
        a_iter = g_list_next (a_iter)) {
     a_current = a_iter->data;
 
     a_current->attached_to = NULL;
     o_set_color (toplevel, a_current, DETACHED_ATTRIBUTE_COLOR);
+    o_attrib_emit_attribs_changed (toplevel, object);
   }
 
   g_list_free (object->attribs);
   object->attribs = NULL;
+
+  o_attrib_thaw_hooks (toplevel, object);
 }
 
 /*! \brief Print all attributes to a Postscript document.
@@ -214,11 +221,16 @@ void o_attrib_print(GList *attributes)
  */
 void o_attrib_remove(TOPLEVEL *toplevel, GList **list, OBJECT *remove)
 {
+  OBJECT *attached_to;
+
   g_return_if_fail (remove != NULL);
 
+  attached_to = remove->attached_to;
   remove->attached_to = NULL;
 
   *list = g_list_remove (*list, remove);
+
+  o_attrib_emit_attribs_changed (toplevel, attached_to);
 }
 
 /*! \brief Read attributes from a buffer.
@@ -679,3 +691,65 @@ int o_attrib_is_inherited (OBJECT *attrib)
   return (attrib->attached_to == NULL &&
           attrib->parent != NULL);
 }
+
+
+typedef struct {
+  AttribsChangedFunc func;
+  void *data;
+} AttribsChangedHook;
+
+
+void o_attrib_append_attribs_changed_hook (TOPLEVEL *toplevel,
+                                           AttribsChangedFunc func,
+                                           void *data)
+{
+  AttribsChangedHook *new_hook;
+
+  new_hook = g_new0 (AttribsChangedHook, 1);
+  new_hook->func = func;
+  new_hook->data = data;
+
+  toplevel->attribs_changed_hooks =
+    g_list_append (toplevel->attribs_changed_hooks, new_hook);
+}
+
+
+static void call_attribs_changed_hook (gpointer data, gpointer user_data)
+{
+  AttribsChangedHook *hook = data;
+  OBJECT *object = user_data;
+
+  hook->func (hook->data, object);
+}
+
+
+void o_attrib_emit_attribs_changed (TOPLEVEL *toplevel, OBJECT *object)
+{
+  if (object->attrib_notify_freeze_count > 0) {
+    object->attrib_notify_pending = 1;
+    return;
+  }
+
+//  printf ("The attributes of object %p have changed\n", object);
+
+  object->attrib_notify_pending = 0;
+
+  g_list_foreach (toplevel->attribs_changed_hooks,
+                  call_attribs_changed_hook, object);
+}
+
+void o_attrib_freeze_hooks (TOPLEVEL *toplevel, OBJECT *object)
+{
+  object->attrib_notify_freeze_count ++;
+}
+
+void o_attrib_thaw_hooks (TOPLEVEL *toplevel, OBJECT *object)
+{
+  g_return_if_fail (object->attrib_notify_freeze_count > 0);
+
+  object->attrib_notify_freeze_count --;
+
+  if (object->attrib_notify_freeze_count == 0 &&
+      object->attrib_notify_pending)
+    o_attrib_emit_attribs_changed (toplevel, object);
+}
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 2b7afe0..40e26c0 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -954,6 +954,9 @@ void o_text_set_string (TOPLEVEL *toplevel, OBJECT *obj,
   obj->text->string = g_strdup (new_string);
 
   o_text_recreate (toplevel, obj);
+
+  if (obj->attached_to != NULL)
+    o_attrib_emit_attribs_changed (toplevel, obj->attached_to);
 }
 
 
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 4256f9e..99d307d 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -126,6 +126,9 @@ OBJECT *s_basic_init_object(OBJECT *new_node, int type, char const *name)
 
   new_node->weak_refs = NULL;
 
+  new_node->attrib_notify_freeze_count = 0;
+  new_node->attrib_notify_pending = 0;
+
   return(new_node);
 }
 
@@ -223,6 +226,12 @@ s_delete_object(TOPLEVEL *toplevel, OBJECT *o_current)
       o_attrib_remove(toplevel, &o_current->attached_to->attribs, o_current);
     }
 
+    /* Don't bother with hooks for this dying object,
+     * leak the freeze count, so the object dies frozen.
+     */
+    o_attrib_freeze_hooks (toplevel, o_current);
+    o_attrib_detach_all (toplevel, o_current);
+
     if (o_current->line) {
       /*	printf("sdeleting line\n");*/
       g_free(o_current->line);
@@ -289,8 +298,6 @@ s_delete_object(TOPLEVEL *toplevel, OBJECT *o_current)
       o_current->complex = NULL;
     }
 
-    o_attrib_detach_all (toplevel, o_current);
-
     s_weakref_notify (o_current, o_current->weak_refs);
 
     g_free(o_current);	/* assuming it is not null */
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index 45597c4..b9bcf47 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -135,6 +135,8 @@ TOPLEVEL *s_toplevel_new (void)
 
   toplevel->change_notify_funcs = NULL;
 
+  toplevel->attribs_changed_hooks = NULL;
+
   toplevel->load_newer_backup_func = NULL;
   toplevel->load_newer_backup_data = NULL;
 

commit 65c68f98cc4bf5d26a091abf336b2e00c7bbcabb
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: skip printing endpoint cues on fully connected nets
    
    Affects-bug: lp-707064

diff --git a/libgeda/src/s_cue.c b/libgeda/src/s_cue.c
index d378c84..f604e11 100644
--- a/libgeda/src/s_cue.c
+++ b/libgeda/src/s_cue.c
@@ -256,8 +256,12 @@ void s_cue_output_single(TOPLEVEL * toplevel, OBJECT * object, FILE * fp,
 	return;
       }
 
-  s_cue_output_lowlevel(toplevel, object, 0, fp, type);
-  s_cue_output_lowlevel(toplevel, object, 1, fp, type);
+  if (object->type != OBJ_NET
+      || ((object->type == OBJ_NET)
+          && !o_net_is_fully_connected (toplevel, object))) {
+    s_cue_output_lowlevel(toplevel, object, 0, fp, type);
+    s_cue_output_lowlevel(toplevel, object, 1, fp, type);
+  }
   s_cue_output_lowlevel_midpoints(toplevel, object, fp, type);
 }
 

commit 6cae96ed0629a87bd71cecce4cc966e58b8bd0af
Author: Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: skip drawing endpoint cues on fully connected nets
    
    Affects-bug: lp-707064

diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index beb6283..1f9b09f 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -258,8 +258,12 @@ void o_cue_draw_single(GSCHEM_TOPLEVEL *w_current, OBJECT *object)
       }
 
   if (object->type != OBJ_PIN) {
-    o_cue_draw_lowlevel(w_current, object, 0);
-    o_cue_draw_lowlevel(w_current, object, 1);
+    if (object->type != OBJ_NET
+        || ((object->type == OBJ_NET)
+            && !o_net_is_fully_connected (w_current->toplevel, object))) {
+      o_cue_draw_lowlevel(w_current, object, 0);
+      o_cue_draw_lowlevel(w_current, object, 1);
+    }
     o_cue_draw_lowlevel_midpoints(w_current, object);
   } else {
     o_cue_draw_lowlevel(w_current, object, object->whichend);

commit 042612a5cc35bfafbf0f862a6db78ec66cd022a7
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: add functions to track net connectivity
    
    o_net_is_fully_connected can be used to check if the net is connected to
    at least two separate endpoints - endpoint being a pin, bus or a named
    net (through a netname attribute).
    
    o_net_refresh_conn_cache should be used to update cached state after
    connectivity change.
    
    For each net segment the number of connected enpoints is cached in new
    fields of OBJECT structure: net_num_connected and valid_num_connected.
    
    Affects-bug: lp-707064

diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 9e9f0bc..70239ca 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -189,6 +189,8 @@ void o_net_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery
 int o_net_orientation(OBJECT *object);
 void o_net_consolidate(TOPLEVEL *toplevel, PAGE *page);
 void o_net_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
+void o_net_refresh_conn_cache(TOPLEVEL *toplevel, OBJECT *object);
+gboolean o_net_is_fully_connected(TOPLEVEL *toplevel, OBJECT *object);
 
 /* o_path_basic.c */
 OBJECT *o_path_new(TOPLEVEL *toplevel, char type, int color, const char *path_string);
diff --git a/libgeda/include/libgeda/struct.h b/libgeda/include/libgeda/struct.h
index 780da2a..eba1305 100644
--- a/libgeda/include/libgeda/struct.h
+++ b/libgeda/include/libgeda/struct.h
@@ -276,6 +276,10 @@ struct st_object {
   int whichend;    /* for pins only, either 0 or 1 */
   int pin_type;    /* for pins only, either NET or BUS */
 
+  /* Tracking total number of entities connected by this net */
+  int net_num_connected;          /* for nets only */
+  gboolean valid_num_connected;   /* for nets only */
+
   GList *attribs;       /* attribute stuff */
   int show_name_value;
   int visibility;
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 3fa642f..323ded6 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -637,3 +637,149 @@ void o_net_modify(TOPLEVEL *toplevel, OBJECT *object,
 
   s_tile_update_object(toplevel, object);
 }
+
+/*! \brief Refresh & cache number of connected entities.
+ *
+ *  \par Function Description
+ *  Traverse all network segments reachable from this net and count
+ *  total number of unique entities connected to all net segments.
+ *
+ *  For the purpose of this function, an entity is:
+ *    - pin
+ *    - bus
+ *    - attached netname attribute
+ *
+ *  Computed number of entities is afterwards stored in all traversed
+ *  net segments.
+ *
+ *  The algorithm does not handle corner cases, ie two bus segments
+ *  belonging to the same bus will be counted twice.
+ *
+ *  \param [in] toplevel    The TOPLEVEL object
+ *  \param [in] o_current   The NET OBJECT to check connectivity of
+ */
+void o_net_refresh_conn_cache(TOPLEVEL *toplevel, OBJECT *o_current)
+{
+  gint            num_conns = 0;
+  GHashTable     *visited;
+  GHashTableIter  iter;
+  GList          *stack = NULL;
+  OBJECT         *obj;
+  gpointer       *key;
+
+  g_return_if_fail (toplevel);
+  g_return_if_fail (o_current);
+  g_return_if_fail (o_current->type == OBJ_NET);
+
+  /* Keep track of visited nets, pins and buses in the hash table.
+   * This way we short-circuit the search and avoid loops.
+   */
+  visited = g_hash_table_new (NULL, NULL);
+
+  /*
+   * Add the starting net to the hash so:
+   *   1. it is not traversed twice
+   *   2. it is updated at the end if no connections are found
+   */
+  g_hash_table_insert (visited, o_current, o_current);
+
+  /* Check if a netname= is attached to the starting net segment */
+  if (NULL != o_attrib_search_object_attribs_by_name (o_current,
+                                                      "netname",
+                                                      0)) {
+    num_conns += 1;
+  }
+
+  /* Keep track of connections to search at each net segment in a stack.
+   * Each stack entry points to an entry in obj->conn_list.
+   * Pop the stack when we have no more connections to check.
+   * Push next entry on the stack if we encounter a net segment.
+   */
+
+  /* Initialise the stack for the starting net segment. */
+  stack = g_list_prepend (stack, o_current->conn_list);
+
+  while (stack != NULL) {
+    /* At start of the loop, take a new connection from the stack. */
+    GList *conn_list = (GList*) stack->data;
+    CONN *conn;
+
+    if (conn_list == NULL) {
+      /* No more connections to check at this level. Pop the stack. */
+      stack = g_list_delete_link (stack, stack);
+      continue;
+    }
+
+    /* Extract the next connected object and advance the connection list. */
+    conn = (CONN*) conn_list->data;
+    obj = conn->other_object;
+    stack->data = (gpointer) g_list_next (conn_list);
+
+    /* Act upon the object that is connected to the segment. */
+    switch (obj->type) {
+      case OBJ_PIN:
+      case OBJ_BUS:
+        if (NULL == g_hash_table_lookup (visited, obj)) {
+          g_hash_table_insert (visited, obj, obj);
+          num_conns += 1;
+        }
+        break;
+      case OBJ_NET:
+        if (NULL == g_hash_table_lookup (visited, obj)) {
+          g_hash_table_insert (visited, obj, obj);
+          /* Check if a netname= is attached to this net segment */
+          if (NULL != o_attrib_search_object_attribs_by_name (obj,
+                                                              "netname",
+                                                              0)) {
+            num_conns += 1;
+          }
+          /* Push new list of connections to check onto the stack */
+          stack = g_list_prepend (stack, obj->conn_list);
+        }
+        break;
+      default:
+        break;
+    }
+  }
+
+  /* Cache value of num_conns in all visited objects */
+  g_hash_table_iter_init (&iter, visited);
+
+  while (g_hash_table_iter_next (&iter, &key, NULL)) {
+    obj = (OBJECT*) key;
+    if (obj->type == OBJ_NET) {
+      obj->net_num_connected = num_conns;
+      obj->valid_num_connected = TRUE;
+    }
+  }
+
+  g_hash_table_destroy (visited);
+  g_list_free (stack);
+}
+
+/*! \brief Check if net is fully connected.
+ *
+ *  \par Function Description
+ *  Net is fully connected when it connects at least
+ *  two separate entities.
+ *
+ *  \sa o_net_refresh_conn_cache
+ *
+ *  \param [in] toplevel    The TOPLEVEL object
+ *  \param [in] o_current   The OBJECT to check connectivity of
+ *  \return TRUE if net is fully connected, FALSE otherwise
+ */
+gboolean o_net_is_fully_connected (TOPLEVEL *toplevel,
+                                   OBJECT   *o_current)
+{
+  g_return_val_if_fail (toplevel, FALSE);
+  g_return_val_if_fail (o_current, FALSE);
+  g_return_val_if_fail (o_current->type == OBJ_NET, FALSE);
+
+  if (!o_current->valid_num_connected)
+    o_net_refresh_conn_cache (toplevel, o_current);
+
+  g_return_val_if_fail (o_current->valid_num_connected, FALSE);
+
+  return o_current->net_num_connected > 1 ? TRUE : FALSE;
+}
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 476f249..4256f9e 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -121,6 +121,9 @@ OBJECT *s_basic_init_object(OBJECT *new_node, int type, char const *name)
   new_node->pin_type = PIN_TYPE_NET;
   new_node->whichend = -1;
 
+  new_node->net_num_connected = 0;
+  new_node->valid_num_connected = FALSE;
+
   new_node->weak_refs = NULL;
 
   return(new_node);

commit c90c6a2728179785c4da5241e043cdcbcf197915
Author: Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: print unconnected pin ends as boxes
    
    Closes-bug: lp-706552

diff --git a/libgeda/src/s_cue.c b/libgeda/src/s_cue.c
index b50c679..d378c84 100644
--- a/libgeda/src/s_cue.c
+++ b/libgeda/src/s_cue.c
@@ -182,6 +182,13 @@ void s_cue_output_lowlevel(TOPLEVEL * toplevel, OBJECT * object, int whichone,
             s_cue_postscript_junction (toplevel, fp, x, y, bus_involved);
         }
       }
+      else if (object->type == OBJ_PIN
+               && count == 0
+               && whichone == object->whichend) {
+        if (output_type == POSTSCRIPT) {
+          s_cue_postscript_fillbox(toplevel, fp, x, y);
+        }
+      }
       break;
 
     case (CONN_MIDPOINT):

commit b5f994f7c439cb0fbc863eec4843594165986683
Author: Krzysztof Kosciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: replace pin end markings with boxes
    
    Affects-bug: lp-706552

diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index 3ac6413..beb6283 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -199,38 +199,10 @@ void o_cue_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int whichon
 
           otherone = !whichone;
 
-          pinsize = 0;
-          if (toplevel->pin_style == THICK )
-            pinsize = object->line_width;
-
           o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
-          if (object->line->y[whichone] == object->line->y[otherone]) {
-            /* horizontal line */
-            if (object->line->x[whichone] <= object->line->x[otherone]) {
-              gschem_cairo_line (w_current, END_NONE, pinsize, x,        y,
-                                 x + size, y);
-            } else {
-              gschem_cairo_line (w_current, END_NONE, pinsize, x,        y,
-                                 x - size, y);
-            }
-            gschem_cairo_stroke (w_current, TYPE_SOLID,
-                                 END_NONE, pinsize, -1, -1);
-          } else if (object->line->x[0] == object->line->x[1]) {
-            /* vertical line */
-            if (object->line->y[whichone] <= object->line->y[otherone]) {
-                gschem_cairo_line (w_current, END_NONE, pinsize, x, y,
-                                   x, y + size);
-            } else {
-              gschem_cairo_line (w_current, END_NONE, pinsize, x, y,
-                                 x, y - size);
-            }
-            gschem_cairo_stroke (w_current, TYPE_SOLID,
-                                 END_NONE, pinsize, -1, -1);
-          } else {
-            /* angled line */
-            /* not supporting rendering of que for angled pin for now. hack */
-          }
-
+          gschem_cairo_center_box (w_current, -1, -1, x, y, size, size);
+          o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
+          cairo_fill (w_current->cr);
         }
       }
       break;



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