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

gEDA-cvs: branch: master updated (1.1.2.20070818-25-g5b2cb25)



The branch, master has been updated
       via  5b2cb25e06604a8d31dff974f323477a78f02f46 (commit)
       via  07d5a095c313e031b939d45f89afcd1c0ca9bc97 (commit)
       via  70d8cc898e42b95a7ac463d9e879c959690fbd5c (commit)
       via  2854af88bf7d4d45cec1a8cc4046e0e3da5f1339 (commit)
       via  093e83672310917f56b66a4f2189cb8e9baae903 (commit)
       via  3e56c88e89c6b03c402a97d0a225302f6d000458 (commit)
       via  9044d41a2305c97522bc70cfd7945f9d843482ae (commit)
      from  4a24abed55b95bd50cb0351ca25c37f6758e8e89 (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/globals.h      |    3 ++
 gschem/include/prototype.h    |    1 +
 gschem/src/g_keys.c           |   18 +++---------
 gschem/src/globals.c          |    3 ++
 gschem/src/o_delete.c         |    8 -----
 gschem/src/o_picture.c        |   37 +++++++++++++++++++++++++
 gschem/src/o_undo.c           |    2 -
 gschem/src/x_dialog.c         |   18 ------------
 gschem/src/x_menus.c          |   25 ++++++++---------
 gschem/src/x_window.c         |   59 ++++++++++++-----------------------------
 libgeda/include/prototype.h   |    4 ---
 libgeda/include/struct.h      |   12 --------
 libgeda/src/a_basic.c         |   24 +---------------
 libgeda/src/libgeda.c         |    1 -
 libgeda/src/o_attrib.c        |   30 ---------------------
 libgeda/src/o_complex_basic.c |   13 ---------
 libgeda/src/o_list.c          |    2 -
 libgeda/src/o_picture.c       |   37 -------------------------
 libgeda/src/s_page.c          |    2 -
 libgeda/src/s_toplevel.c      |   51 +----------------------------------
 libgeda/src/s_undo.c          |    6 ----
 21 files changed, 81 insertions(+), 275 deletions(-)


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

commit 5b2cb25e06604a8d31dff974f323477a78f02f46
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:48:32 2007 +0100

    Move o_picture_set_pixbuf() from libgeda to gschem

:100644 100644 fa97dc1... ef1261b... M	gschem/include/prototype.h
:100644 100644 9265ea7... 5a6c7d7... M	gschem/src/o_picture.c
:100644 100644 5b425a6... 67a74b4... M	libgeda/include/prototype.h
:100644 100644 ffea11c... 40a5d8b... M	libgeda/src/o_picture.c

commit 07d5a095c313e031b939d45f89afcd1c0ca9bc97
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:48:09 2007 +0100

    Remove unused TOPLEVEL variable REMOVING_SEL.

:100644 100644 0db8599... ec5cb0d... M	gschem/src/o_delete.c
:100644 100644 1fa60fa... 5b60b17... M	gschem/src/o_undo.c
:100644 100644 4ba1429... c78f024... M	gschem/src/x_window.c
:100644 100644 9f89aa5... ebca2d9... M	libgeda/include/struct.h
:100644 100644 49e0b63... bb146bd... M	libgeda/src/o_list.c
:100644 100644 2ed64e4... ac2746c... M	libgeda/src/s_page.c
:100644 100644 9827202... a7480f7... M	libgeda/src/s_toplevel.c
:100644 100644 617c33d... f8447e3... M	libgeda/src/s_undo.c

commit 70d8cc898e42b95a7ac463d9e879c959690fbd5c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:47:22 2007 +0100

    Remove unused dialog pointers from TOPLEVEL

:100644 100644 d6ac46a... f6b4aff... M	gschem/src/x_dialog.c
:100644 100644 720eae3... 4ba1429... M	gschem/src/x_window.c
:100644 100644 1237f4b... 9f89aa5... M	libgeda/include/struct.h
:100644 100644 77c51b7... 9827202... M	libgeda/src/s_toplevel.c

commit 2854af88bf7d4d45cec1a8cc4046e0e3da5f1339
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:46:55 2007 +0100

    Remove unneeded functions in libgeda/o_attrib.c
    
    Removes:
      o_attrib_set_show(TOPLEVEL *toplevel, int flag)
      o_attrib_set_visible(TOPLEVEL *toplevel, int flag)

:100644 100644 bcac7b8... 5b425a6... M	libgeda/include/prototype.h
:100644 100644 63dab21... 080f1af... M	libgeda/src/o_attrib.c

commit 093e83672310917f56b66a4f2189cb8e9baae903
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:46:20 2007 +0100

    Remove un-needed redraw in o_scale() and generally tidied the function up

:100644 100644 5ba85a7... 85bd8d7... M	libgeda/src/a_basic.c

commit 3e56c88e89c6b03c402a97d0a225302f6d000458
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:46:09 2007 +0100

    Remove ineffective redraw in o_complex_world_translate()

:100644 100644 ef34ace... acdea3e... M	libgeda/src/o_complex_basic.c

commit 9044d41a2305c97522bc70cfd7945f9d843482ae
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:41:28 2007 +0100

    Removes the linking between TOPLEVELs, instead uses a GList in gschem

:100644 100644 7830dd5... 5173ccb... M	gschem/include/globals.h
:100644 100644 e41fbb4... fcebc39... M	gschem/src/g_keys.c
:100644 100644 e4a9553... 9d263e1... M	gschem/src/globals.c
:100644 100644 f7c00b6... 5a57fa9... M	gschem/src/x_menus.c
:100644 100644 a696558... 720eae3... M	gschem/src/x_window.c
:100644 100644 1e897a0... bcac7b8... M	libgeda/include/prototype.h
:100644 100644 a63771c... 1237f4b... M	libgeda/include/struct.h
:100644 100644 1231a45... 5647d9a... M	libgeda/src/libgeda.c
:100644 100644 168f30d... 77c51b7... M	libgeda/src/s_toplevel.c

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

commit 5b2cb25e06604a8d31dff974f323477a78f02f46
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:48:32 2007 +0100

    Move o_picture_set_pixbuf() from libgeda to gschem

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index fa97dc1..ef1261b 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -676,6 +676,7 @@ void o_picture_erase(TOPLEVEL *w_current, OBJECT *o_current);
 void o_picture_draw_xor(TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
 void o_picture_exchange(TOPLEVEL *w_current, GdkPixbuf *pixbuf, const gchar *filename);
 void picture_change_filename_dialog (TOPLEVEL *w_current);
+void o_picture_set_pixbuf(TOPLEVEL *toplevel, GdkPixbuf *pixbuf, char *filename);
 
 /* o_pin.c */
 void o_pin_draw(TOPLEVEL *w_current, OBJECT *o_current);
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index 9265ea7..5a6c7d7 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -777,3 +777,40 @@ void picture_change_filename_dialog (TOPLEVEL *w_current)
     w_current->pfswindow=NULL;
   }
 }
+
+/*! \todo Finish function documentation!!!
+ *  \brief
+ *  \par Function Description
+ *
+ *  \param [in] toplevel  The TOPLEVEL object.
+ *  \param [in] pixbuf
+ *  \param [in] filename
+ */
+void o_picture_set_pixbuf(TOPLEVEL *toplevel,
+                          GdkPixbuf *pixbuf, char *filename)
+{
+
+  /* need to put an error messages here */
+  if (pixbuf == NULL)  {
+    fprintf(stderr, "error! picture in set pixbuf was NULL\n");
+    return;
+  }
+
+  if (toplevel->current_pixbuf != NULL) {
+    g_object_unref(toplevel->current_pixbuf);
+    toplevel->current_pixbuf=NULL;
+  }
+
+  if (toplevel->pixbuf_filename != NULL) {
+    g_free(toplevel->pixbuf_filename);
+    toplevel->pixbuf_filename=NULL;
+  }
+
+  toplevel->current_pixbuf = pixbuf;
+  toplevel->pixbuf_filename = (char *) g_strdup(filename);
+
+  toplevel->pixbuf_wh_ratio = (double) gdk_pixbuf_get_width(pixbuf) /
+                                        gdk_pixbuf_get_height(pixbuf);
+
+  /* be sure to free this pixbuf somewhere */
+}
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 5b425a6..67a74b4 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -373,7 +373,6 @@ OBJECT *o_picture_read(TOPLEVEL *toplevel, OBJECT *object_list,
 		       unsigned int release_ver,
 		       unsigned int fileformat_ver);
 char *o_picture_save(OBJECT *object);
-void o_picture_set_pixbuf(TOPLEVEL *toplevel, GdkPixbuf *pixbuf, char *filename);
 OBJECT *o_picture_add(TOPLEVEL *toplevel, OBJECT *object_list,
 		      GdkPixbuf * pixbuf, char *filename, double ratio,
 		      char type, 
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index ffea11c..40a5d8b 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -326,43 +326,6 @@ char *o_picture_save(OBJECT *object)
 
 }
 
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- *  \param [in] toplevel  The TOPLEVEL object.
- *  \param [in] pixbuf
- *  \param [in] filename
- */
-void o_picture_set_pixbuf(TOPLEVEL *toplevel,
-			  GdkPixbuf *pixbuf, char *filename)
-{
-
-  /* need to put an error messages here */
-  if (pixbuf == NULL)  {
-    fprintf(stderr, "error! picture in set pixbuf was NULL\n");
-    return;
-  }
-
-  if (toplevel->current_pixbuf != NULL) {
-    g_object_unref(toplevel->current_pixbuf);
-    toplevel->current_pixbuf=NULL;
-  }
-
-  if (toplevel->pixbuf_filename != NULL) {
-    g_free(toplevel->pixbuf_filename);
-    toplevel->pixbuf_filename=NULL;
-  }
-
-  toplevel->current_pixbuf = pixbuf;
-  toplevel->pixbuf_filename = (char *) g_strdup(filename);
-  
-  toplevel->pixbuf_wh_ratio = (double) gdk_pixbuf_get_width(pixbuf) /
-                                        gdk_pixbuf_get_height(pixbuf);
-
-  /* be sure to free this pixbuf somewhere */
-}
-
 /*! \brief Create and add picture OBJECT to list.
  *  \par Function Description
  *  This function creates a new object representing a picture.

commit 07d5a095c313e031b939d45f89afcd1c0ca9bc97
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:48:09 2007 +0100

    Remove unused TOPLEVEL variable REMOVING_SEL.

diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index 0db8599..ec5cb0d 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -37,7 +37,6 @@
  */
 void o_delete_net(TOPLEVEL *w_current, OBJECT *obj)
 {
-  int removing_sel_save;
   GList *other_objects = NULL;
 
   o_cue_undraw(w_current, obj);
@@ -46,10 +45,7 @@ void o_delete_net(TOPLEVEL *w_current, OBJECT *obj)
 
   other_objects = s_conn_return_others(other_objects, obj);
        
-  removing_sel_save = w_current->REMOVING_SEL;
-  w_current->REMOVING_SEL = 1;
   s_delete(w_current, obj);
-  w_current->REMOVING_SEL = removing_sel_save;
 
   w_current->page_current->object_tail =
   (OBJECT *) return_tail(w_current->page_current->object_head);
@@ -66,7 +62,6 @@ void o_delete_net(TOPLEVEL *w_current, OBJECT *obj)
  */
 void o_delete_bus(TOPLEVEL *w_current, OBJECT *obj)
 {
-  int removing_sel_save;
   GList *other_objects = NULL;
         
   o_cue_undraw(w_current, obj);
@@ -75,10 +70,7 @@ void o_delete_bus(TOPLEVEL *w_current, OBJECT *obj)
 
   other_objects = s_conn_return_others(other_objects, obj);
 
-  removing_sel_save = w_current->REMOVING_SEL;
-  w_current->REMOVING_SEL = 1;
   s_delete(w_current, obj);
-  w_current->REMOVING_SEL = removing_sel_save;
 
   w_current->page_current->object_tail =
   (OBJECT *) return_tail(w_current->page_current->object_head);
diff --git a/gschem/src/o_undo.c b/gschem/src/o_undo.c
index 1fa60fa..5b60b17 100644
--- a/gschem/src/o_undo.c
+++ b/gschem/src/o_undo.c
@@ -212,10 +212,8 @@ void o_undo_savestate(TOPLEVEL *w_current, int flag)
       }
 
       if (u_current->object_head) {
-        w_current->REMOVING_SEL = 1;
         s_delete_list_fromstart(w_current, 
                                 u_current->object_head);
-        w_current->REMOVING_SEL = 0; 
         u_current->object_head = NULL; 
       }
 
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 4ba1429..c78f024 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -77,7 +77,6 @@ void x_window_setup (TOPLEVEL *toplevel)
 
   toplevel->FORCE_CONN_UPDATE=0;
   toplevel->ADDING_SEL=0;
-  toplevel->REMOVING_SEL=0;
 
   toplevel->drawbounding_action_mode=FREE;
   toplevel->last_drawb_mode = -1;
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index 9f89aa5..ebca2d9 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -484,7 +484,6 @@ struct st_toplevel {
   int DONT_RECALC;
   int FORCE_CONN_UPDATE;
   int ADDING_SEL;
-  int REMOVING_SEL;
 
   int drawbounding_action_mode; 	/* outline vs bounding box */
   int last_drawb_mode;			/* last above mode */
diff --git a/libgeda/src/o_list.c b/libgeda/src/o_list.c
index 49e0b63..bb146bd 100644
--- a/libgeda/src/o_list.c
+++ b/libgeda/src/o_list.c
@@ -422,7 +422,6 @@ void o_list_delete_rest(TOPLEVEL *toplevel, OBJECT *list)
 	
   o_current = (OBJECT *) return_tail(list);
 
-  toplevel->REMOVING_SEL = 1;
   /* remove list backwards */
   while(o_current != NULL) {
     if (o_current->type != OBJ_HEAD) {
@@ -434,5 +433,4 @@ void o_list_delete_rest(TOPLEVEL *toplevel, OBJECT *list)
       o_current = NULL;
     }
   }
-  toplevel->REMOVING_SEL = 0;
 }
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index 2ed64e4..ac2746c 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -211,13 +211,11 @@ void s_page_delete (TOPLEVEL *toplevel, PAGE *page)
   /* then delete objects of page */
   s_delete_list_fromstart (toplevel, page->object_head);
 
-  toplevel->REMOVING_SEL = 1;
   /* The complex place list contain a reference to the objects in the page */
   /* So don't free the objects there. */
   g_list_free (page->complex_place_list);
   page->complex_place_list = NULL;
   s_delete_list_fromstart (toplevel, page->attrib_place_head);
-  toplevel->REMOVING_SEL = 0;
 
 #if DEBUG
   printf("Freeing page: %s\n", page->page_filename);
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index 9827202..a7480f7 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -126,7 +126,6 @@ TOPLEVEL *s_toplevel_new (void)
   toplevel->DONT_RECALC       = 0;
   toplevel->FORCE_CONN_UPDATE = 0;
   toplevel->ADDING_SEL        = 0;
-  toplevel->REMOVING_SEL      = 0;
 
   toplevel->drawbounding_action_mode = FREE;
   toplevel->last_drawb_mode = -1;
diff --git a/libgeda/src/s_undo.c b/libgeda/src/s_undo.c
index 617c33d..f8447e3 100644
--- a/libgeda/src/s_undo.c
+++ b/libgeda/src/s_undo.c
@@ -214,10 +214,8 @@ void s_undo_destroy_all(TOPLEVEL *toplevel, UNDO *head)
     if (u_current->filename) g_free(u_current->filename);
 		
     if (u_current->object_head) {
-      toplevel->REMOVING_SEL = 1;
       s_delete_list_fromstart(toplevel,
                               u_current->object_head);
-      toplevel->REMOVING_SEL = 0;
       u_current->object_head = NULL;
     }
 
@@ -259,10 +257,8 @@ void s_undo_remove(TOPLEVEL *toplevel, UNDO *head, UNDO *u_tos)
       }
 
       if (u_current->object_head) {
-				/*toplevel->REMOVING_SEL = 1; */
         s_delete_list_fromstart(toplevel,
                                 u_current->object_head);
-				/*toplevel->REMOVING_SEL = 0;*/
         u_current->object_head = NULL;
       }
 
@@ -294,10 +290,8 @@ void s_undo_remove_rest(TOPLEVEL *toplevel, UNDO *head)
     }
 
     if (u_current->object_head) {
-      toplevel->REMOVING_SEL = 1;
       s_delete_list_fromstart(toplevel,
                               u_current->object_head);
-      toplevel->REMOVING_SEL = 0;
       u_current->object_head = NULL;
     }
 

commit 70d8cc898e42b95a7ac463d9e879c959690fbd5c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:47:22 2007 +0100

    Remove unused dialog pointers from TOPLEVEL

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index d6ac46a..f6b4aff 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -2613,18 +2613,9 @@ extern GtkWidget *stwindow;
  */
 void x_dialog_raise_all(TOPLEVEL *w_current)
 {
-  if(w_current->fowindow) {
-    gdk_window_raise(w_current->fowindow->window);
-  }
-  if(w_current->fswindow) {
-    gdk_window_raise(w_current->fswindow->window);
-  }
   if(w_current->sowindow) {
     gdk_window_raise(w_current->sowindow->window);
   }
-  if(w_current->aswindow) {
-    gdk_window_raise(w_current->aswindow->window);
-  }
   if(w_current->cswindow) {
     gdk_window_raise(w_current->cswindow->window);
   }
@@ -2642,9 +2633,6 @@ void x_dialog_raise_all(TOPLEVEL *w_current)
   if(w_current->sewindow) {
     gdk_window_raise(w_current->sewindow->window);
   }
-  if(w_current->exwindow) {
-    gdk_window_raise(w_current->exwindow->window);
-  }
   if(w_current->aawindow) {
     gdk_window_raise(w_current->aawindow->window);
   }
@@ -2672,12 +2660,6 @@ void x_dialog_raise_all(TOPLEVEL *w_current)
   if(w_current->clwindow) {
     gdk_window_raise(w_current->clwindow->window);
   }
-  if(w_current->ltwindow) {
-    gdk_window_raise(w_current->ltwindow->window);
-  }
-  if(w_current->ftwindow) {
-    gdk_window_raise(w_current->ftwindow->window);
-  }
 
 }
 
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 720eae3..4ba1429 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -92,14 +92,10 @@ void x_window_setup (TOPLEVEL *toplevel)
   toplevel->grid_label = NULL;
 
   toplevel->cswindow = NULL;
-  toplevel->aswindow = NULL;
-  toplevel->fowindow = NULL;
   toplevel->sowindow = NULL;
-  toplevel->fswindow = NULL;
 
   toplevel->tiwindow = NULL;
   toplevel->tewindow = NULL;
-  toplevel->exwindow = NULL;
   toplevel->aawindow = NULL;
   toplevel->mawindow = NULL;
   toplevel->aewindow = NULL;
@@ -111,8 +107,6 @@ void x_window_setup (TOPLEVEL *toplevel)
   toplevel->hkwindow = NULL;
   toplevel->cowindow = NULL;
   toplevel->clwindow = NULL;
-  toplevel->ltwindow = NULL;
-  toplevel->ftwindow = NULL;
   toplevel->sewindow = NULL;
 
   toplevel->coord_world = NULL;
@@ -723,18 +717,9 @@ void x_window_close(TOPLEVEL *w_current)
 #endif
 
   /* close all the dialog boxes */
-  if (w_current->fowindow)
-  gtk_widget_destroy(w_current->fowindow);
-
   if (w_current->sowindow)
   gtk_widget_destroy(w_current->sowindow);
 
-  if (w_current->fswindow)
-  gtk_widget_destroy(w_current->fswindow);
-
-  if (w_current->aswindow)
-  gtk_widget_destroy(w_current->aswindow);
-
   if (w_current->cswindow)
   gtk_widget_destroy(w_current->cswindow);
 
@@ -757,9 +742,6 @@ void x_window_close(TOPLEVEL *w_current)
 
   x_pagesel_close (w_current);
 
-  if (w_current->exwindow)
-  gtk_widget_destroy(w_current->exwindow);
-
   if (w_current->tswindow)
   gtk_widget_destroy(w_current->tswindow);
 
@@ -778,9 +760,6 @@ void x_window_close(TOPLEVEL *w_current)
   if (w_current->clwindow)
   gtk_widget_destroy(w_current->clwindow);
 
-  if (w_current->ltwindow)
-  gtk_widget_destroy(w_current->ltwindow);
-
   if (w_current->sewindow)
   gtk_widget_destroy(w_current->sewindow);
 
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index 1237f4b..9f89aa5 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -542,14 +542,11 @@ struct st_toplevel {
   GtkWidget *toolbar_mirror;
 
   /* Dialog boxes */
-  GtkWidget *fowindow;			/* File open */
-  GtkWidget *fswindow;			/* File save */
   GtkWidget *sowindow;			/* Script open */
   GtkWidget *pfswindow;                 /* Picture File Selection window */
   GtkWidget *pcfswindow;                /* Picture Change File Selection window */
   int saveas_flag;     			/* what action after save? */
 
-  GtkWidget *aswindow;			/* Attribute select */
   GtkWidget *attr_list;
   GtkWidget *asentry_name;
   GtkWidget *asentry_value; 
@@ -567,11 +564,8 @@ struct st_toplevel {
   GtkWidget *tiwindow;			/* text input */
   GtkWidget *tewindow;			/* text edit */
   GtkWidget *teentry;
-  GtkWidget *ltwindow;			/* line type / width edit */
-  GtkWidget *ftwindow;			/* fill type edit (PB) */
   GtkWidget *sewindow;			/* slot edit */
   GtkWidget *seentry;
-  GtkWidget *exwindow;			/* exit confirm */
   GtkWidget *aawindow;			/* arc attribs */
   GtkWidget *mawindow;			/* multi attribute */
   GtkWidget *aewindow;			/* attribute edit */
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index 77c51b7..9827202 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -176,12 +176,9 @@ TOPLEVEL *s_toplevel_new (void)
   toplevel->toolbar_rotate = NULL;
   toplevel->toolbar_mirror = NULL;
 
-  toplevel->fowindow = NULL;
-  toplevel->fswindow = NULL;
   toplevel->sowindow = NULL;
   toplevel->saveas_flag = 0;
 
-  toplevel->aswindow      = NULL;
   toplevel->attr_list     = NULL;
   toplevel->asentry_name  = NULL;
   toplevel->asentry_value = NULL;
@@ -200,11 +197,8 @@ TOPLEVEL *s_toplevel_new (void)
   toplevel->tiwindow = NULL;
   toplevel->tewindow = NULL;
   toplevel->teentry  = NULL;
-  toplevel->ltwindow = NULL;
-  toplevel->ftwindow = NULL;
   toplevel->sewindow = NULL;
   toplevel->seentry  = NULL;
-  toplevel->exwindow = NULL;
   toplevel->aawindow = NULL;
   toplevel->mawindow = NULL;
   toplevel->aewindow = NULL;

commit 2854af88bf7d4d45cec1a8cc4046e0e3da5f1339
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:46:55 2007 +0100

    Remove unneeded functions in libgeda/o_attrib.c
    
    Removes:
      o_attrib_set_show(TOPLEVEL *toplevel, int flag)
      o_attrib_set_visible(TOPLEVEL *toplevel, int flag)

diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index bcac7b8..5b425a6 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -176,8 +176,6 @@ OBJECT *o_read_attribs(TOPLEVEL *toplevel,
 void o_save_attribs(FILE *fp, ATTRIB *attribs);
 int o_attrib_get_name_value(char *string, char **name, char **value);
 void o_attrib_free_current(TOPLEVEL *toplevel);
-void o_attrib_set_show(TOPLEVEL *toplevel, int flag);
-void o_attrib_set_visible(TOPLEVEL *toplevel, int flag);
 void o_attrib_set_string(TOPLEVEL *toplevel, char *string);
 OBJECT *o_attrib_return_parent(ATTRIB *attribute);
 ATTRIB *o_attrib_copy_all(TOPLEVEL *toplevel, OBJECT *attached_to, ATTRIB *attributes);
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 63dab21..080f1af 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -972,36 +972,6 @@ void o_attrib_free_current(TOPLEVEL *toplevel)
   toplevel->current_attribute=NULL;
 }
 
-/*! \brief Set current show flag.
- *  \par Function Description
- *  Set current show flag.
- *
- *  \param [in] toplevel  The TOPLEVEL object.
- *  \param [in] flag       Any value which show_name_value takes.
- *                         #SHOW_NAME_VALUE
- *                         #SHOW_VALUE
- *                         #SHOW_NAME
- */
-void o_attrib_set_show(TOPLEVEL *toplevel, int flag)
-{
-  toplevel->current_show = flag;
-}
-
-/*! \brief Set current visibility flag.
- *  \par Function Description
- *  Set current visibility flag.
- *
- *  \param [in] toplevel  The TOPLEVEL object.
- *  \param [in] flag       Allowed values are:
- *                         #VISIBLE
- *                         #INVISIBLE
- */
-void
-o_attrib_set_visible(TOPLEVEL *toplevel, int flag)
-{
-  toplevel->current_visible = flag;
-}
-
 /*! \brief Set an attribute's string.
  *  \par Function Description
  *  Set an attribute's string.

commit 093e83672310917f56b66a4f2189cb8e9baae903
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:46:20 2007 +0100

    Remove un-needed redraw in o_scale() and generally tidied the function up

diff --git a/libgeda/src/a_basic.c b/libgeda/src/a_basic.c
index 5ba85a7..85bd8d7 100644
--- a/libgeda/src/a_basic.c
+++ b/libgeda/src/a_basic.c
@@ -614,39 +614,19 @@ void o_scale(TOPLEVEL *toplevel, OBJECT *list, int x_scale, int y_scale)
   OBJECT *o_current;
 
   /* this is okay if you just hit scale and have nothing selected */
-  if (list == NULL) { 
-    /* toplevel->event_state = SELECT;*/
-    /* i_update_status(toplevel, "Select Mode"); not here */
-    /*		toplevel->inside_action = 0;*/
+  if (list == NULL) {
     return;
   }
 
-
   o_current = list;
-
-
   while (o_current != NULL) {
-
     switch(o_current->type) {
-
       case(OBJ_LINE):
-				/* erase the current selection */
-        toplevel->override_color =
-          toplevel->background_color;
-        o_redraw_single(toplevel, o_current);
-                                /* o_line_draw(toplevel, o_current);*/
-        toplevel->override_color = -1;
-
-        o_line_scale_world(toplevel,
-                           x_scale, y_scale, o_current);
+        o_line_scale_world(toplevel, x_scale, y_scale, o_current);
         break;
     }
-
     o_current = o_current->next;
   }
-
-  /* don't do this at this level */
-  /* toplevel->page_current->CHANGED=1;*/
 }
 
 

commit 3e56c88e89c6b03c402a97d0a225302f6d000458
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:46:09 2007 +0100

    Remove ineffective redraw in o_complex_world_translate()

diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index ef34ace..acdea3e 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -840,9 +840,6 @@ void o_complex_world_translate(TOPLEVEL *toplevel, int x1, int y1,
 			       OBJECT *prim_objs)
 {
   OBJECT *o_current=NULL;
-  OBJECT *one=NULL;
-  OBJECT *two=NULL;
-  unsigned long temp_color;
 
   o_current = prim_objs;
 
@@ -855,21 +852,11 @@ void o_complex_world_translate(TOPLEVEL *toplevel, int x1, int y1,
       case(OBJ_NET):
 				/* same as a line, don't do this */
         o_line_translate_world(toplevel, x1, y1, o_current);
-        temp_color = toplevel->override_color;
-        toplevel->override_color = -1;
-        o_redraw_single(toplevel, one); /* trying loop? hack*/
-        o_redraw_single(toplevel, two);
-        toplevel->override_color = temp_color;
         break;
 
       case(OBJ_BUS):
 				/* same as a line, don't do this */
         o_line_translate_world(toplevel, x1, y1, o_current);
-        temp_color = toplevel->override_color;
-        toplevel->override_color = -1;
-        o_redraw_single(toplevel, one); /* trying loop? hack*/
-        o_redraw_single(toplevel, two);
-        toplevel->override_color = temp_color;
         break;
 	
       case(OBJ_BOX):

commit 9044d41a2305c97522bc70cfd7945f9d843482ae
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 16:41:28 2007 +0100

    Removes the linking between TOPLEVELs, instead uses a GList in gschem

diff --git a/gschem/include/globals.h b/gschem/include/globals.h
index 7830dd5..5173ccb 100644
--- a/gschem/include/globals.h
+++ b/gschem/include/globals.h
@@ -21,6 +21,9 @@
 /* used by various guile functions, set in x_event* functions */
 extern TOPLEVEL *global_window_current;
 
+/* window list */
+extern GList *global_window_list;
+
 /* color stuff */
 extern GdkColormap *colormap; 
 extern GdkVisual *visual; 
diff --git a/gschem/src/g_keys.c b/gschem/src/g_keys.c
index e41fbb4..fcebc39 100644
--- a/gschem/src/g_keys.c
+++ b/gschem/src/g_keys.c
@@ -173,21 +173,13 @@ g_keys_dump_keymap (void)
  */
 static gboolean clear_keyaccel_string(gpointer data)
 {
-  TOPLEVEL *w = global_window_current;
+  TOPLEVEL *w_current = data;
 
   /* Find out if the toplevel is present... */
-  while(w->prev)
-    w = w->prev;
-
-  while(w) {
-    if(w == (TOPLEVEL *) data) {
-      /* ... it is, update its status bar */
-      g_free(w->keyaccel_string);
-      w->keyaccel_string = NULL;
-      i_show_state(w, NULL);
-      break;
-    }
-    w = w->next;
+  if (g_list_find(global_window_list, w_current) != NULL) {
+    g_free(w_current->keyaccel_string);
+    w_current->keyaccel_string = NULL;
+    i_show_state(w_current, NULL);
   }
 
   return FALSE;
diff --git a/gschem/src/globals.c b/gschem/src/globals.c
index e4a9553..9d263e1 100644
--- a/gschem/src/globals.c
+++ b/gschem/src/globals.c
@@ -36,6 +36,9 @@
  * window set in x_event* functions */
 TOPLEVEL *global_window_current = NULL;
 
+/* window list */
+GList *global_window_list = NULL;
+
 char *rc_filename     = NULL;
 char *script_filename = NULL;
 char *output_filename = NULL;
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index f7c00b6..5a57fa9 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -426,28 +426,27 @@ static GList *recent_files = NULL;
  */
 static void update_recent_files_menus()
 {
-   TOPLEVEL *w;
+   TOPLEVEL *w_current;
    GtkWidget *submenu, *recent_menu_item;
+   GList *iter;
 
-   w = global_window_current;
-   while(w->prev)
-      w = w->prev;
+   for (iter = global_window_list;
+        iter != NULL;
+        iter = g_list_next (iter)) {
+      w_current = (TOPLEVEL *)iter->data;
 
-   while(w) {
-      if(w->wid == -1 || w->menubar == NULL) {
-         w = w->next;
-         continue;
-      }
+      if (w_current->menubar == NULL)
+        continue;
 
-      recent_menu_item = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(
-               w->menubar), "File/Recent files");
+      recent_menu_item =
+        (GtkWidget *) gtk_object_get_data(GTK_OBJECT(w_current->menubar),
+                                          "File/Recent files");
       if(recent_menu_item == NULL)
          return;
 
       submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(recent_menu_item));
       gtk_widget_destroy(submenu);
-      x_menu_attach_recent_files_submenu(w);
-      w = w->next;
+      x_menu_attach_recent_files_submenu(w_current);
    }
 }
 
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index a696558..720eae3 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -154,6 +154,9 @@ void x_window_setup (TOPLEVEL *toplevel)
   toplevel->win_height = toplevel->height;
   /* x_window_setup_world() - END */
 
+  /* Add to the list of windows */
+  global_window_list = g_list_append (global_window_list, toplevel);
+
   /* X related stuff */
   x_window_create_main (toplevel);
 
@@ -781,12 +784,11 @@ void x_window_close(TOPLEVEL *w_current)
   if (w_current->sewindow)
   gtk_widget_destroy(w_current->sewindow);
 
-  g_assert(w_current->prev != NULL);
-  if (w_current->next == NULL && w_current->prev->prev == NULL) {
+  if (g_list_length (global_window_list) == 1) {
     /* no more window after this one, remember to quit */
     last_window = TRUE;
   }
-  
+
   o_attrib_free_current(w_current);
   o_complex_free_filename(w_current);
 
@@ -819,14 +821,14 @@ void x_window_close(TOPLEVEL *w_current)
 
   /* finally close the main window */
   gtk_widget_destroy(w_current->main_window);
-  
+
   s_toplevel_delete (w_current);
+  global_window_list = g_list_remove (global_window_list, w_current);
 
   /* just closed last window, so quit */
   if (last_window) {
     gschem_quit();
   }
-  
 }
 
 /*! \todo Finish function documentation!!!
@@ -834,23 +836,18 @@ void x_window_close(TOPLEVEL *w_current)
  *  \par Function Description
  *
  */
-void x_window_close_all(TOPLEVEL *toplevel)
+void x_window_close_all(TOPLEVEL *w_current)
 {
-  TOPLEVEL *last, *current;
-
-  /* find last toplevel in toplevel list */
-  for (last = toplevel; last->next != NULL; last = last->next);
-
-  /* now close each toplevel */
-  for (current = last; current->prev != NULL; current = last) {
-    /* save a ref to the previous toplevel in the list */
-    last = current->prev;
-    /* close current if it is not a preview toplevel */
-    if (current->main_window != NULL) {
-      x_window_close (current);
-    }
+  TOPLEVEL *current;
+  GList *list_copy, *iter;
+
+  iter = list_copy = g_list_copy (global_window_list);
+  while (iter != NULL ) {
+    current = (TOPLEVEL *)iter->data;
+    iter = g_list_next (iter);
+    x_window_close (current);
   }
-
+  g_list_free (list_copy);
 }
 
 /*! \brief Opens a new untitled page.
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 1e897a0..bcac7b8 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -589,7 +589,6 @@ char *s_papersizes_get(int counter);
 void s_papersizes_get_size(char *string, int *width, int *height);
 
 /* s_project.c */
-void s_toplevel_init (void);
 TOPLEVEL *s_toplevel_new (void);
 void s_toplevel_delete (TOPLEVEL *toplevel);
 
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index a63771c..1237f4b 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -399,8 +399,6 @@ struct st_page {
 
 struct st_toplevel {
 
-  int wid;			/* Window id, always unique */
-
   int num_untitled;		/* keep track of untitled wins */
 
   int start_x;
@@ -860,9 +858,6 @@ struct st_toplevel {
   int hierarchy_netname_order;
   int hierarchy_uref_order;
   char *unnamed_netname;
-
-  TOPLEVEL *next;
-  TOPLEVEL *prev; 
 };
 
 /* structures below are for gnetlist */
diff --git a/libgeda/src/libgeda.c b/libgeda/src/libgeda.c
index 1231a45..5647d9a 100644
--- a/libgeda/src/libgeda.c
+++ b/libgeda/src/libgeda.c
@@ -68,7 +68,6 @@ void libgeda_init(void)
 
   g_type_init ();
 
-  s_toplevel_init ();
   s_clib_init();
   s_slib_init();
   s_menu_init();
diff --git a/libgeda/src/s_toplevel.c b/libgeda/src/s_toplevel.c
index 168f30d..77c51b7 100644
--- a/libgeda/src/s_toplevel.c
+++ b/libgeda/src/s_toplevel.c
@@ -47,26 +47,6 @@
 #include <dmalloc.h>
 #endif
 
-/* global_wid always increments, it needs to be unique per run */
-static int global_wid = 0;
-
-/* head pointer to toplevel structure, this points to all the toplevels that
-   currently exist */
-static TOPLEVEL *toplevel_head = NULL;
-
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-void s_toplevel_init (void)
-{
-  toplevel_head = (TOPLEVEL*)g_new (TOPLEVEL, 1);
-  toplevel_head->wid = -1;
-  toplevel_head->next = NULL;  
-  toplevel_head->prev = NULL;
-}
-
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -74,12 +54,10 @@ void s_toplevel_init (void)
  */
 TOPLEVEL *s_toplevel_new (void)
 {
-  TOPLEVEL *toplevel, *tmp;
+  TOPLEVEL *toplevel;
 
   toplevel = (TOPLEVEL*)g_new (TOPLEVEL, 1);
 
-  toplevel->wid = global_wid++;
-
   toplevel->num_untitled = 0;
 
   toplevel->start_x = -1;
@@ -452,15 +430,6 @@ TOPLEVEL *s_toplevel_new (void)
   toplevel->DONT_RECALC = 1;
   toplevel->DONT_REDRAW = 1;
 
-  
-  /* now append toplevel to this list: */
-  /*   - find the tail of the toplevel list */
-  for (tmp = toplevel_head; tmp->next != NULL; tmp = tmp->next);
-  /*   - link toplevel with tmp */
-  tmp->next = toplevel;
-  toplevel->prev = tmp;
-  toplevel->next = NULL;
-
   return toplevel;
 }
 
@@ -477,11 +446,6 @@ void s_toplevel_delete (TOPLEVEL *toplevel)
     g_assert (ret);
   }
 
-  if (toplevel->wid == -1) {
-    /* do no delete head */
-    return;
-  }
-
   g_free (toplevel->internal_symbol_name);
 
   g_free (toplevel->series_name);
@@ -504,12 +468,6 @@ void s_toplevel_delete (TOPLEVEL *toplevel)
   /* Delete the page list */
   g_object_unref(toplevel->pages);
 
-  /* unlink toplevel from toplevel list */
-  toplevel->prev->next = toplevel->next;
-  if (toplevel->next != NULL) {
-    toplevel->next->prev = toplevel->prev;
-  }
-
   g_free (toplevel);
 
 }




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