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

gEDA-cvs: branch: master updated (1.1.2.20070818-17-gf58bf18)



The branch, master has been updated
       via  f58bf186da0f4c19356ee4b04a839f4d6d802e74 (commit)
       via  823d692b70510986db607c8592b788ca68dbb979 (commit)
       via  48bb4b0db849e14d8c60d410a79f6cfb78400654 (commit)
       via  d68adb7f7d91836a9fb4553e7cb7067c9ec2cd33 (commit)
       via  bae595bf000b1d64ff83053cef76bce7839640b4 (commit)
       via  ebabf4fa5667d2ab74b5443367b83228fad4d6d0 (commit)
      from  96ca8a9a2804176b689f4fe89393259ec109a6d9 (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
=========

 gattrib/src/i_basic.c      |   66 --------------------------------------------
 gattrib/src/i_vars.c       |   10 ------
 gattrib/src/s_object.c     |    9 ++++-
 gattrib/src/x_fileselect.c |   51 ----------------------------------
 gattrib/src/x_window.c     |   13 ++------
 gschem/include/prototype.h |    1 -
 gschem/src/gschem_dialog.c |   14 +--------
 gschem/src/o_basic.c       |   14 ---------
 gschem/src/o_buffer.c      |    4 +--
 gschem/src/o_complex.c     |    2 +-
 gschem/src/o_copy.c        |    3 +-
 gschem/src/o_find.c        |    3 +-
 gschem/src/o_misc.c        |    2 +-
 gschem/src/o_text.c        |    3 +-
 gschem/src/x_image.c       |    3 +-
 gschem/src/x_multiattrib.c |   13 +--------
 gschem/src/x_print.c       |    3 +-
 17 files changed, 21 insertions(+), 193 deletions(-)


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

commit f58bf186da0f4c19356ee4b04a839f4d6d802e74
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove gattrib's use of GTK widget pointers stored in TOPLEVEL.

:100644 100644 bb4f18f... 6540b3d... M	gattrib/src/x_window.c

commit 823d692b70510986db607c8592b788ca68dbb979
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove gattrib's use of TOPLEVEL rc-variables defined in gschem.

:100644 100644 f2b657f... b10f532... M	gattrib/src/i_vars.c
:100644 100644 953aa47... cadae21... M	gattrib/src/s_object.c

commit 48bb4b0db849e14d8c60d410a79f6cfb78400654
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove some unused / ineffective code in gattrib.

:100644 100644 0c20ed7... 47c0d20... M	gattrib/src/i_basic.c
:100644 100644 66add08... 555353d... M	gattrib/src/x_fileselect.c

commit d68adb7f7d91836a9fb4553e7cb7067c9ec2cd33
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Make use of o_select_unselect_all() to reduce code duplication in gschem

:100644 100644 44429fc... 399d028... M	gschem/src/o_buffer.c
:100644 100644 a78b810... 235531b... M	gschem/src/o_copy.c
:100644 100644 e0e60e1... 411a634... M	gschem/src/o_find.c
:100644 100644 47bb182... 239b43f... M	gschem/src/o_text.c
:100644 100644 1846155... 6a65ccd... M	gschem/src/x_image.c
:100644 100644 d96bb36... 9679b9c... M	gschem/src/x_print.c

commit bae595bf000b1d64ff83053cef76bce7839640b4
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove o_unselect_all() function, instead use o_select_unselect_all()

:100644 100644 dbe3837... fa97dc1... M	gschem/include/prototype.h
:100644 100644 a7631c4... 6633629... M	gschem/src/o_basic.c
:100644 100644 f2ec4b2... d2d8233... M	gschem/src/o_complex.c
:100644 100644 deceb85... b9c8afa... M	gschem/src/o_misc.c

commit ebabf4fa5667d2ab74b5443367b83228fad4d6d0
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:25 2007 +0100

    Remove unused GType instance_init functions in gschem.

:100644 100644 ec28037... dae369a... M	gschem/src/gschem_dialog.c
:100644 100644 81cf244... 769d012... M	gschem/src/x_multiattrib.c

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

commit f58bf186da0f4c19356ee4b04a839f4d6d802e74
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove gattrib's use of GTK widget pointers stored in TOPLEVEL.

diff --git a/gattrib/src/x_window.c b/gattrib/src/x_window.c
index bb4f18f..6540b3d 100644
--- a/gattrib/src/x_window.c
+++ b/gattrib/src/x_window.c
@@ -55,7 +55,7 @@
 #endif
 
 static void
-x_window_create_menu(GtkWidget **menubar);
+x_window_create_menu(GtkWindow *window, GtkWidget **menubar);
 
 /*! \brief This function initializes the toplevel gtksheet stuff. 
  *
@@ -80,9 +80,6 @@ x_window_init()
   /*  window is a global declared in globals.h.  */
   window = gtk_window_new(GTK_WINDOW_TOPLEVEL);  
 
-  /* I attach a pointer to window to the TOPLEVEL structure */
-  pr_current->main_window = window;
-  
   gtk_window_set_title( GTK_WINDOW(window), "gattrib -- gEDA attribute editor"); 
   gtk_window_set_default_size(GTK_WINDOW(window), 750, 600);  
   
@@ -96,8 +93,7 @@ x_window_init()
   gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(main_vbox) );
 
   /* -----  Now create menu bar  ----- */  
-  x_window_create_menu(&menu_bar);
-  pr_current->menubar = menu_bar;    /* attach pointer to menu_bar to (TOPLEVEL pr_current) */
+  x_window_create_menu(GTK_WINDOW(window), &menu_bar);
   gtk_box_pack_start(GTK_BOX (main_vbox), menu_bar, FALSE, TRUE, 0);
 
   /* -----  Now init notebook widget  ----- */  
@@ -223,7 +219,7 @@ static const GtkActionEntry actions[] = {
  *  to the menu bar is retrieved from the GtkUIManager object.
  */
 static void
-x_window_create_menu(GtkWidget **menubar)
+x_window_create_menu(GtkWindow *window, GtkWidget **menubar)
 {
   gchar *menu_file;
   GtkUIManager *ui;
@@ -249,8 +245,7 @@ x_window_create_menu(GtkWidget **menubar)
 
   g_free(menu_file);
 
-  gtk_window_add_accel_group (GTK_WINDOW(pr_current->main_window),
-      gtk_ui_manager_get_accel_group(ui));
+  gtk_window_add_accel_group (window, gtk_ui_manager_get_accel_group(ui));
 
   *menubar = gtk_ui_manager_get_widget(ui, "/ui/menubar/");
 }

commit 823d692b70510986db607c8592b788ca68dbb979
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove gattrib's use of TOPLEVEL rc-variables defined in gschem.

diff --git a/gattrib/src/i_vars.c b/gattrib/src/i_vars.c
index f2b657f..b10f532 100644
--- a/gattrib/src/i_vars.c
+++ b/gattrib/src/i_vars.c
@@ -46,11 +46,6 @@
 /*------------------------------------------------------------------
  * Define the vars we'll use later
  *------------------------------------------------------------------*/
-int   default_graphic_color = GRAPHIC_COLOR;
-int   default_text_color = TEXT_COLOR;
-int   default_text_size = 10;
-int   default_text_caps = LOWER;
-
 int   default_attribute_color = ATTRIBUTE_COLOR;
 int   default_paper_width = 11000; /* letter size */
 int   default_paper_height = 85000;
@@ -76,11 +71,6 @@ void i_window_vars_set(TOPLEVEL * pr_current)
 
   i_vars_libgeda_set(pr_current); 
 
-  pr_current->graphic_color = default_graphic_color;
-  pr_current->text_color = default_text_color;
-  pr_current->text_size = default_text_size;
-  pr_current->text_caps = default_text_caps;
-  
   pr_current->attribute_color = default_attribute_color;
   pr_current->paper_width = default_paper_width;
   pr_current->paper_height = default_paper_height;
diff --git a/gattrib/src/s_object.c b/gattrib/src/s_object.c
index 953aa47..cadae21 100644
--- a/gattrib/src/s_object.c
+++ b/gattrib/src/s_object.c
@@ -48,7 +48,12 @@
 #endif
 
 
-                                                                                                           
+/*------------------------------------------------------------------
+ * Gattrib specific defines
+ *------------------------------------------------------------------*/
+#define DEFAULT_TEXT_SIZE 10
+
+
 /* ===================  Public Functions  ====================== */
 
 /*------------------------------------------------------------------*/
@@ -309,7 +314,7 @@ OBJECT *s_object_attrib_add_attrib_in_object(TOPLEVEL * pr_current, char *text_s
 						    LOWER_LEFT, 
 						    0,	/* zero is angle */
 						    text_string, 
-						    pr_current->text_size,  /* current text size */
+						    DEFAULT_TEXT_SIZE,
 						    visibility,
 						    show_name_value);
 

commit 48bb4b0db849e14d8c60d410a79f6cfb78400654
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove some unused / ineffective code in gattrib.

diff --git a/gattrib/src/i_basic.c b/gattrib/src/i_basic.c
index 0c20ed7..47c0d20 100644
--- a/gattrib/src/i_basic.c
+++ b/gattrib/src/i_basic.c
@@ -62,69 +62,3 @@ static void i_update_status(TOPLEVEL * w_current, const char *string)
 #endif
 
 
-/* ------------------------------------------------------------- *
- *
- * ------------------------------------------------------------- */
-void i_update_cursor(TOPLEVEL * w_current)
-{
-
-  /* SDB asks:  Do we need this?!?!?!?!  */
-
-  GdkCursor *cursor;
-  cursor = gdk_cursor_new(GDK_ARROW);
-  gdk_window_set_cursor(w_current->window, cursor);
-  gdk_cursor_destroy(cursor);
-
-}
-
-
-/* ------------------------------------------------------------- *
- *
- * ------------------------------------------------------------- */
-void i_set_filename(TOPLEVEL * w_current, const char *string)
-{
-  char trunc_string[41];
-  int len;
-  int i;
-
-  if (!w_current->filename_label) {
-    return;
-  }
-
-  if (string) {
-    len = strlen(string);
-    w_current->DONT_RESIZE = 1;
-
-    if (w_current->filename_label) {
-      if (len > 40) {
-
-	trunc_string[0] = '.';
-	trunc_string[1] = '.';
-	trunc_string[2] = '.';
-
-	trunc_string[40] = '\0';
-	for (i = 39; i > 2; i--) {
-	  if (len >= 0) {
-	    trunc_string[i] = string[len];
-	  } else {
-	    break;
-	  }
-	  len--;
-	}
-
-	gtk_label_set(GTK_LABEL(w_current->filename_label), trunc_string);
-
-      } else {
-
-	gtk_label_set(GTK_LABEL(w_current->
-				filename_label), (char *) string);
-      }
-    }
-  }
-}
-
-
-
-
-
-
diff --git a/gattrib/src/x_fileselect.c b/gattrib/src/x_fileselect.c
index 66add08..555353d 100644
--- a/gattrib/src/x_fileselect.c
+++ b/gattrib/src/x_fileselect.c
@@ -79,54 +79,6 @@
 
 /* ----- x_fileselect stuff begins here ----- */
 
-/* ------------------------------------------------------------- *
- * I think this puts the new filename back into pr_current as part
- * of a "save as" operation.  This was originally i_set_filename
- * in gschem/src/i_basic.c
- * ------------------------------------------------------------- */
-static void x_fileselect_set_filename(TOPLEVEL * w_current, const char *string)
-{
-  char trunc_string[41];
-  int len;
-  int i;
-
-  if (!w_current->filename_label) {
-    return;
-  }
-
-  if (string) {
-    len = strlen(string);
-    w_current->DONT_RESIZE = 1;
-
-    if (w_current->filename_label) {
-      if (len > 40) {
-
-	trunc_string[0] = '.';
-	trunc_string[1] = '.';
-	trunc_string[2] = '.';
-
-	trunc_string[40] = '\0';
-	for (i = 39; i > 2; i--) {
-	  if (len >= 0) {
-	    trunc_string[i] = string[len];
-	  } else {
-	    break;
-	  }
-	  len--;
-	}
-
-	gtk_label_set(GTK_LABEL(w_current->filename_label), trunc_string);
-
-      } else {
-
-	gtk_label_set(GTK_LABEL(w_current->
-				filename_label), (char *) string);
-      }
-    }
-  }
-  return;
-}
-
 /*------------------------------------------------------------------
  * This fcn creates and sets the file filter for the filechooser.
  *------------------------------------------------------------------*/
@@ -356,9 +308,6 @@ x_fileselect_save (void)
         f_save (pr_current, filename)) {
       s_log_message ("Saved As [%s]\n", filename);
 
-      /* Update filename for "saveas" operation */
-      x_fileselect_set_filename (pr_current, filename); 
-      
       /* replace page filename with new one, do not free filename */
       g_free (pr_current->page_current->page_filename);
       pr_current->page_current->page_filename = filename;

commit d68adb7f7d91836a9fb4553e7cb7067c9ec2cd33
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Make use of o_select_unselect_all() to reduce code duplication in gschem

diff --git a/gschem/src/o_buffer.c b/gschem/src/o_buffer.c
index 44429fc..399d028 100644
--- a/gschem/src/o_buffer.c
+++ b/gschem/src/o_buffer.c
@@ -239,9 +239,7 @@ void o_buffer_paste_end(TOPLEVEL *w_current, int screen_x, int screen_y,
   g_list_free(connected_objects);
   connected_objects = NULL;
 
-  o_select_run_hooks(w_current, NULL, 2); 
-
-  o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+  o_select_unselect_all( w_current );
   geda_list_add_glist( w_current->page_current->selection_list, geda_list_get_glist( temp_list ) );
 
   g_object_unref( temp_list );
diff --git a/gschem/src/o_copy.c b/gschem/src/o_copy.c
index a78b810..235531b 100644
--- a/gschem/src/o_copy.c
+++ b/gschem/src/o_copy.c
@@ -501,8 +501,7 @@ void o_copy_end(TOPLEVEL *w_current)
                    x_get_darkcolor(w_current->bb_color), TRUE);
   }
 
-  o_select_run_hooks( w_current, NULL, 2 );
-  o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+  o_select_unselect_all( w_current );
   geda_list_add_glist( w_current->page_current->selection_list, geda_list_get_glist( temp_list ) );
 
   g_object_unref( temp_list );
diff --git a/gschem/src/o_find.c b/gschem/src/o_find.c
index e0e60e1..411a634 100644
--- a/gschem/src/o_find.c
+++ b/gschem/src/o_find.c
@@ -115,8 +115,7 @@ gboolean o_find_object(TOPLEVEL *w_current, int screen_x, int screen_y,
   /* deselect everything only if shift key isn't pressed and 
      the caller allows it */	
   if (change_selection && (!w_current->SHIFTKEY)) {
-    o_select_run_hooks(w_current, NULL, 2);
-    o_selection_unselect_list (w_current, w_current->page_current->selection_list );
+    o_select_unselect_all (w_current);
   }
 
   i_update_menus(w_current);
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 47bb182..239b43f 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -454,8 +454,7 @@ void o_text_end(TOPLEVEL *w_current)
   w_current->override_color = -1;
 
   w_current->page_current->CHANGED=1;
-  o_select_run_hooks( w_current, NULL, 2 );
-  o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+  o_select_unselect_all( w_current );
   o_selection_add( w_current->page_current->selection_list, w_current->page_current->object_tail );
 
   /* object_tail is the object that was just added */
diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index 1846155..6a65ccd 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -364,8 +364,7 @@ void x_image_lowlevel(TOPLEVEL *w_current, const char* filename,
              page_center_top + (page_height / 2));
 
   /* de select everything first */
-  o_select_run_hooks( w_current, NULL, 2 );
-  o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+  o_select_unselect_all( w_current );
 
  if (strcmp(filetype, "eps") == 0) /*WK - catch EPS export case*/
     x_image_write_eps(w_current, filename);
diff --git a/gschem/src/x_print.c b/gschem/src/x_print.c
index d96bb36..9679b9c 100644
--- a/gschem/src/x_print.c
+++ b/gschem/src/x_print.c
@@ -727,8 +727,7 @@ x_print_setup (TOPLEVEL * w_current, char *filename)
 			     &w_current->paper_height);
 		
       /* de select everything first */
-      o_select_run_hooks( w_current, NULL, 2 );
-      o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+      o_select_unselect_all( w_current );
 
       if (usefile && filename[0])
 	/* Print to file */

commit bae595bf000b1d64ff83053cef76bce7839640b4
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:27 2007 +0100

    Remove o_unselect_all() function, instead use o_select_unselect_all()

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index dbe3837..fa97dc1 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -473,7 +473,6 @@ OBJECT *o_attrib_add_attrib(TOPLEVEL *w_current, char *text_string, int visibili
 void o_redraw_all(TOPLEVEL *w_current);
 void o_redraw_all_fast(TOPLEVEL *w_current);
 void o_redraw(TOPLEVEL *w_current, OBJECT *object_list, gboolean draw_selected);
-void o_unselect_all(TOPLEVEL *w_current);
 void o_draw_list(TOPLEVEL *w_current, GList *list);
 void o_draw_selected(TOPLEVEL *w_current);
 void o_erase_selected(TOPLEVEL *w_current);
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index a7631c4..6633629 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -143,20 +143,6 @@ void o_redraw(TOPLEVEL *w_current, OBJECT *object_list, gboolean draw_selected)
  *  \par Function Description
  *
  */
-void o_unselect_all(TOPLEVEL *w_current)
-{
-  if (!w_current->SHIFTKEY) {
-    o_select_run_hooks(w_current, NULL, 2);
-    o_selection_unselect_list(w_current,
-                              w_current->page_current->selection_list );
-  }
-}
-
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
 void o_draw_list(TOPLEVEL *w_current, GList* list)
 {
   OBJECT* o_current;
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index f2ec4b2..d2d8233 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -675,7 +675,7 @@ void o_complex_translate_all(TOPLEVEL *w_current, int offset)
    * places */
   a_zoom_extents(w_current, w_current->page_current->object_head, 
                  A_PAN_DONT_REDRAW);
-  o_unselect_all(w_current);
+  if (!w_current->SHIFTKEY) o_select_unselect_all(w_current);
   o_redraw_all(w_current);
   w_current->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 deceb85..b9c8afa 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -148,7 +148,7 @@ void o_lock(TOPLEVEL *w_current)
     s_current=s_current->next;
   }
 
-  o_unselect_all(w_current);
+  if (!w_current->SHIFTKEY) o_select_unselect_all(w_current);
   o_undo_savestate(w_current, UNDO_ALL);
   i_update_menus(w_current);
 }

commit ebabf4fa5667d2ab74b5443367b83228fad4d6d0
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 3 15:32:25 2007 +0100

    Remove unused GType instance_init functions in gschem.

diff --git a/gschem/src/gschem_dialog.c b/gschem/src/gschem_dialog.c
index ec28037..dae369a 100644
--- a/gschem/src/gschem_dialog.c
+++ b/gschem/src/gschem_dialog.c
@@ -342,18 +342,6 @@ static void gschem_dialog_get_property (GObject *object, guint property_id, GVal
 }
 
 
-/*! \brief GType instance initialiser for GschemDialog
- *
- *  \par Function Description
- *  GType instance initialiser for GschemDialog. Nothing to do here.
- *
- *  \param [in]  dialog       The GschemDialog we are initialising
- */
-static void gschem_dialog_init (GschemDialog *dialog)
-{
-}
-
-
 /*! \brief GType class initialiser for GschemDialog
  *
  *  \par Function Description
@@ -449,7 +437,7 @@ GType gschem_dialog_get_type ()
       NULL, /* class_data */
       sizeof(GschemDialog),
       0,    /* n_preallocs */
-      (GInstanceInitFunc) gschem_dialog_init,
+      NULL, /* instance_init */
     };
 
     gschem_dialog_type = g_type_register_static (GTK_TYPE_DIALOG,
diff --git a/gschem/src/x_multiattrib.c b/gschem/src/x_multiattrib.c
index 81cf244..769d012 100644
--- a/gschem/src/x_multiattrib.c
+++ b/gschem/src/x_multiattrib.c
@@ -260,8 +260,6 @@ static void celltextview_cell_editable_init(GtkCellEditableIface *iface)
  * of GTK 2.4 (LGPL).
  */
 static void cellrenderermultilinetext_class_init(CellRendererMultiLineTextClass *klass);
-static void cellrenderermultilinetext_init (CellRendererMultiLineText *self);
-
 static void cellrenderermultilinetext_editing_done (GtkCellEditable *cell_editable,
                                                     gpointer         user_data);
 static gboolean cellrenderermultilinetext_focus_out_event (GtkWidget *widget,
@@ -401,7 +399,7 @@ GType cellrenderermultilinetext_get_type()
       NULL, /* class_data */
       sizeof(CellRendererMultiLineText),
       0,    /* n_preallocs */
-      (GInstanceInitFunc) cellrenderermultilinetext_init,
+      NULL, /* instance_init */
     };
 		
     cellrenderermultilinetext_type = g_type_register_static (
@@ -427,15 +425,6 @@ static void cellrenderermultilinetext_class_init(CellRendererMultiLineTextClass
   
 }
 
-/*! \todo Finish function documentation
- *  \brief
- *  \par Function Description
- *
- */
-static void cellrenderermultilinetext_init(CellRendererMultiLineText *self)
-{
-}
-
 
 enum {
   PROP_SELECTION = 1




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