[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.0-20070526-77-g301614e)
The branch, master has been updated
via 301614ec1f0e97de952f071d5f40f885ca7484ce (commit)
via c7f1e67533518517f310fd037c7e24cb248a4f23 (commit)
via dc88c870d8d9ba66855f03fd3bc678d8b9f34cf2 (commit)
via 2a0abb503110a7b7cfe5739f26bc1e4c7d939fff (commit)
from 4e164220e934f0c4c54199e2ad357f681d623d74 (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 | 16 -----
gschem/src/a_zoom.c | 37 ------------
gschem/src/g_keys.c | 9 ---
gschem/src/g_rc.c | 105 ----------------------------------
gschem/src/g_register.c | 4 -
gschem/src/i_callbacks.c | 40 -------------
gschem/src/o_attrib.c | 6 --
gschem/src/o_basic.c | 12 ----
gschem/src/o_bus.c | 132 -------------------------------------------
gschem/src/o_complex.c | 38 ------------
gschem/src/o_cue.c | 3 -
gschem/src/o_grips.c | 7 +--
gschem/src/o_misc.c | 17 +-----
gschem/src/o_net.c | 129 ------------------------------------------
gschem/src/o_pin.c | 5 --
gschem/src/o_select.c | 14 -----
gschem/src/o_slot.c | 11 ----
gschem/src/o_text.c | 30 ----------
gschem/src/x_basic.c | 43 --------------
gschem/src/x_dialog.c | 22 -------
gschem/src/x_event.c | 14 -----
gschem/src/x_grid.c | 10 ---
gschem/src/x_stroke.c | 8 ---
gschem/src/x_window.c | 10 ---
libgeda/include/prototype.h | 1 +
libgeda/src/s_clib.c | 71 +++++++++++++++++++++++
libgeda/src/s_page.c | 2 +-
27 files changed, 76 insertions(+), 720 deletions(-)
=================
Commit Messages
=================
commit 301614ec1f0e97de952f071d5f40f885ca7484ce
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Wed Jun 27 19:48:04 2007 +0100
libgeda: Add function which retrieves a list of symbols in use.
Add the s_toplevel_get_symbol_names() function, which scans a TOPLEVEL
structure to obtain a list of all symbols used in open
schematics.
:100644 100644 d091429... 471a844... M libgeda/include/prototype.h
:100644 100644 f3901d3... 61dd4da... M libgeda/src/s_clib.c
commit c7f1e67533518517f310fd037c7e24cb248a4f23
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Wed Jun 27 19:48:04 2007 +0100
libgeda: Make s_page_new() use g_new0() for a blank page.
:100644 100644 9df87f6... e2e2f41... M libgeda/src/s_page.c
commit dc88c870d8d9ba66855f03fd3bc678d8b9f34cf2
Author: Ivan Stankovic <ivan.stankovic@xxxxxx>
Date: Wed Jun 27 19:47:46 2007 +0100
This patch removes most of the unused code from gschem.
:100644 100644 bff096b... 7830dd5... M gschem/include/globals.h
:100644 100644 a6f9ac2... 23edb4a... M gschem/src/a_zoom.c
:100644 100644 5d13beb... e41fbb4... M gschem/src/g_keys.c
:100644 100644 b582106... 427bb5f... M gschem/src/g_rc.c
:100644 100644 d369c4c... c9cad7d... M gschem/src/g_register.c
:100644 100644 f1692fd... cc3477b... M gschem/src/i_callbacks.c
:100644 100644 e41c487... c847cd8... M gschem/src/o_attrib.c
:100644 100644 57adf68... 24639aa... M gschem/src/o_basic.c
:100644 100644 953702b... 908f489... M gschem/src/o_bus.c
:100644 100644 6f26434... 73fb006... M gschem/src/o_complex.c
:100644 100644 f51f995... cb624c7... M gschem/src/o_cue.c
:100644 100644 d29c490... 698a0d4... M gschem/src/o_grips.c
:100644 100644 a8edd22... 908e906... M gschem/src/o_misc.c
:100644 100644 96a7f23... b27f0ed... M gschem/src/o_net.c
:100644 100644 40f8111... ec871ec... M gschem/src/o_pin.c
:100644 100644 60ebd2b... f90c1b9... M gschem/src/o_select.c
:100644 100644 c30bb3b... da09198... M gschem/src/o_slot.c
:100644 100644 9a777ed... e81de34... M gschem/src/o_text.c
:100644 100644 b517748... b720904... M gschem/src/x_basic.c
:100644 100644 511630c... ed0ed50... M gschem/src/x_dialog.c
:100644 100644 ac036ae... b3aa1ab... M gschem/src/x_event.c
:100644 100644 337df3f... 58a0666... M gschem/src/x_grid.c
:100644 100644 2ab0df0... 1351ba2... M gschem/src/x_stroke.c
:100644 100644 d7cd9c0... ef9d274... M gschem/src/x_window.c
commit 2a0abb503110a7b7cfe5739f26bc1e4c7d939fff
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Wed Jun 27 16:47:20 2007 +0100
Correct some typos in gschem default texts.
:100644 100644 565165f... a8edd22... M gschem/src/o_misc.c
=========
Changes
=========
commit 301614ec1f0e97de952f071d5f40f885ca7484ce
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Wed Jun 27 19:48:04 2007 +0100
libgeda: Add function which retrieves a list of symbols in use.
Add the s_toplevel_get_symbol_names() function, which scans a TOPLEVEL
structure to obtain a list of all symbols used in open
schematics.
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index d091429..471a844 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -493,6 +493,7 @@ GList *s_clib_search (const gchar *pattern, const CLibSearchMode mode);
void s_clib_flush_cache ();
const CLibSymbol *s_clib_get_symbol_by_name (const gchar *name);
gchar *s_clib_symbol_get_data_by_name (const gchar *name);
+GList *s_toplevel_get_symbol_names (const TOPLEVEL *w_current);
/* s_color.c */
void s_color_init(void);
diff --git a/libgeda/src/s_clib.c b/libgeda/src/s_clib.c
index f3901d3..61dd4da 100644
--- a/libgeda/src/s_clib.c
+++ b/libgeda/src/s_clib.c
@@ -1259,3 +1259,74 @@ gchar *s_clib_symbol_get_data_by_name (const gchar *name)
if (symbol == NULL) return NULL;
return s_clib_symbol_get_data (symbol);
}
+
+/*! \brief Get a list of symbols used.
+ * \par Function Description
+ *
+ * Scan a #TOPLEVEL structure's object list looking for symbols, and
+ * return them in a list.
+ *
+ * \warning The #CLibSymbol instances in the \b GList returned belong
+ * to the component library, and should be considered constants; they
+ * should not be manipulated or free()'d. On the other hand, the \b
+ * GList returned must be freed with \b g_list_free() when no longer
+ * needed. Note that the values returned will be invalidated by a
+ * call to s_clib_free() or s_clib_refresh().
+ *
+ * \bug Only includes components which are not embedded, but they
+ * should (probably) also appear in the list.
+ *
+ * \param w_current #TOPLEVEL structure to scan.
+ * \return GList of symbol names.
+ */
+GList *s_toplevel_get_symbol_names (const TOPLEVEL *w_current)
+{
+ GList *result = NULL;
+ GList *iter = NULL;
+ OBJECT *o = NULL;
+ PAGE *p = NULL;
+ GList *symlist = NULL;
+ CLibSymbol *sym = NULL;
+
+ g_assert (w_current != NULL);
+
+ for (p = w_current->page_head->next; p != NULL; p = p->next) {
+ for (o = p->object_head; o != NULL; o = o->next) {
+ if (o->type != OBJ_COMPLEX) continue;
+ if (o->complex_basename == NULL) continue;
+
+ /* Since we're not looking at embedded symbols, the first
+ * component with the given name will be the one we need.
+ * N.b. we don't use s_clib_get_symbol_by_name() because it's
+ * spammeh. */
+ symlist = s_clib_search (o->complex_basename, CLIB_EXACT);
+ if (symlist == NULL) continue;
+ sym = (CLibSymbol *) symlist->data;
+ g_list_free (symlist);
+
+ /* We do the list insertion by evilly comparing pointers. This
+ * is okay, because we always take the first symbol with the
+ * given name, and symbol pointers don't change while this
+ * function is running (we hope). Note that this creates a
+ * sorted list.*/
+ for (iter = result;
+ iter != NULL;
+ iter = g_list_next(iter)) {
+ if (iter->data == sym) {
+ break; /* Already in list */
+ }
+ if (compare_symbol_name (iter->data, sym) > 0) {
+ /* not in list yet, and gone past point where it should go */
+ result = g_list_insert_before (result, iter, sym);
+ break;
+ }
+ }
+ if (iter == NULL) {
+ /* not in list yet, and at end of list */
+ result = g_list_append (result, sym);
+ }
+ }
+ }
+
+ return result;
+}
commit c7f1e67533518517f310fd037c7e24cb248a4f23
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Wed Jun 27 19:48:04 2007 +0100
libgeda: Make s_page_new() use g_new0() for a blank page.
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index 9df87f6..e2e2f41 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -68,7 +68,7 @@ PAGE *s_page_new (TOPLEVEL *toplevel, const gchar *filename)
PAGE *page;
/* Now create a blank page */
- page = (PAGE*)g_new (PAGE, 1);
+ page = (PAGE*)g_new0 (PAGE, 1);
page->pid = global_pid++;
commit dc88c870d8d9ba66855f03fd3bc678d8b9f34cf2
Author: Ivan Stankovic <ivan.stankovic@xxxxxx>
Date: Wed Jun 27 19:47:46 2007 +0100
This patch removes most of the unused code from gschem.
diff --git a/gschem/include/globals.h b/gschem/include/globals.h
index bff096b..7830dd5 100644
--- a/gschem/include/globals.h
+++ b/gschem/include/globals.h
@@ -29,22 +29,6 @@ extern GdkVisual *visual;
extern GdkColor white;
extern GdkColor black;
-#if 0
-extern GdkColor red;
-extern GdkColor green;
-extern GdkColor blue;
-extern GdkColor cyan;
-extern GdkColor yellow;
-extern GdkColor grey;
-extern GdkColor grey90;
-extern GdkColor darkgreen;
-extern GdkColor darkred;
-extern GdkColor darkyellow;
-extern GdkColor darkcyan;
-extern GdkColor darkblue;
-extern GdkColor darkgrey;
-#endif
-
extern char *rc_filename;
extern char *script_filename;
extern char *output_filename;
diff --git a/gschem/src/a_zoom.c b/gschem/src/a_zoom.c
index a6f9ac2..23edb4a 100644
--- a/gschem/src/a_zoom.c
+++ b/gschem/src/a_zoom.c
@@ -358,15 +358,6 @@ void correct_aspect(TOPLEVEL *w_current)
GET_PAGE_WIDTH(w_current) /
w_current->page_current->coord_aspectratio;
-#if 0 /* ER's original zoom extents code */
- pad_y = (delta_y -
- delta_x *
- w_current->page_current->coord_aspectratio) /
- 2;
- /* widening */
- w_current->page_current->bottom += pad_y;
- w_current->page_current->top -= pad_y;
-#endif
} else {
#if DEBUG
printf("new smaller then coord\n");
@@ -377,16 +368,6 @@ void correct_aspect(TOPLEVEL *w_current)
w_current->page_current->left +
GET_PAGE_HEIGHT(w_current) *
w_current->page_current->coord_aspectratio;
-
-#if 0 /* ER's original zoom extents code */
- pad_x = (delta_x -
- delta_y *
- w_current->page_current->coord_aspectratio) /
- 2;
- /* shortening */
- w_current->page_current->right -= pad_x;
- w_current->page_current->left += pad_x;
-#endif
}
#if DEBUG
printf("invalid aspectratio corrected\n");
@@ -398,22 +379,4 @@ void correct_aspect(TOPLEVEL *w_current)
#if DEBUG
printf("final %f\n", new_aspect);
#endif
-
-#if 0 /* no longer needed to calc zoom_factor */
- diff_x = fabs(GET_PAGE_WIDTH(w_current));
-
-#ifdef HAS_RINT
- zoom_scale = (int) rint(w_current->init_right / diff_x);
-#else
- zoom_scale = (int) (w_current->init_right / diff_x);
-#endif
-
- if (zoom_scale > w_current->max_zoom) {
- zoom_scale = w_current->max_zoom;
- }
- if (zoom_scale < w_current->min_zoom) {
- zoom_scale = w_current->min_zoom;
- }
- w_current->page_current->zoom_factor = zoom_scale;
-#endif
}
diff --git a/gschem/src/g_keys.c b/gschem/src/g_keys.c
index 5d13beb..e41fbb4 100644
--- a/gschem/src/g_keys.c
+++ b/gschem/src/g_keys.c
@@ -112,11 +112,6 @@ int g_keys_execute(int state, int keyval)
g_free(guile_string);
g_free(modifier);
-#if 0 /* playing with thi's guile stuff */
- gh_eval_str("(display (reverse last-command-sequence))");
- printf("\n");
-#endif
-
return (SCM_FALSEP (scm_retval)) ? 0 : 1;
}
@@ -251,10 +246,6 @@ DEFINE_G_KEYS(edit_rotate_90)
DEFINE_G_KEYS(edit_rotate_90_hotkey)
DEFINE_G_KEYS(edit_mirror)
DEFINE_G_KEYS(edit_mirror_hotkey)
-#if 0 /* obsolete */
-DEFINE_G_KEYS(edit_stretch)
-DEFINE_G_KEYS(edit_stretch_hotkey)
-#endif
DEFINE_G_KEYS(edit_slot)
DEFINE_G_KEYS(edit_color)
DEFINE_G_KEYS(edit_edit)
diff --git a/gschem/src/g_rc.c b/gschem/src/g_rc.c
index b582106..427bb5f 100644
--- a/gschem/src/g_rc.c
+++ b/gschem/src/g_rc.c
@@ -272,26 +272,6 @@ DEFINE_G_RC_COLOR(g_rc_freestyle_color,
"freestyle-color",
default_dummy)
-#if 0
-/*! \deprecated Currently unused.
- * \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-static int vstbl_lookup_val(const vstbl_entry *table, int size, int val)
-{
- int i;
-
- for(i = 0; i < size; i++) {
- if(table[i].m_val == val) {
- break;
- }
- }
- return i;
-}
-#endif
-
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
@@ -320,19 +300,6 @@ static int vstbl_get_val(const vstbl_entry *table, int index)
return table[index].m_val;
}
-#if 0
-/*! \deprecated Currently Unused.
- * \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-static const char *vstbl_get_str(const vstbl_entry *table, int index)
-{
- return table[index].m_str;
-}
-#endif
-
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
@@ -553,39 +520,11 @@ SCM g_rc_text_display_zoomfactor(SCM zoomfactor)
*/
SCM g_rc_scrollbar_update(SCM scmmode)
{
-#if 0
- char *mode;
- GtkUpdateType policy;
-#endif
SCM ret = SCM_BOOL_T;
SCM_ASSERT (scm_is_string (scmmode), scmmode,
SCM_ARG1, "scrollbar-update");
-#if 0
- mode = SCM_STRING_CHARS (scmmode);
-
- if (strcmp (mode, "continuous") == 0) {
- policy = GTK_UPDATE_CONTINUOUS;
- ret = SCM_BOOL_T;
- } else if (strcmp (mode, "delayed") == 0) {
- policy = GTK_UPDATE_DELAYED
- ret = SCM_BOOL_T;
- } else {
- fprintf(stderr,
- _("Invalid mode [%s] passed to scrollbar-update\n"),
- mode);
- ret = SCM_BOOL_F;
- }
-
- if (ret == SCM_BOOL_T) {
- gtk_range_set_update_policy (GTK_RANGE (window_current->v_scrollbar),
- policy);
- gtk_range_set_update_policy (GTK_RANGE (window_current->h_scrollbar),
- policy);
- }
-#endif
-
return ret;
}
@@ -778,50 +717,6 @@ SCM g_rc_attribute_name(SCM scm_path)
return ret;
}
-#if 0
-/*! \deprecated Old obsolete way of handling strokes.
- * \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-SCM g_rc_stroke(SCM scm_stroke, SCM scm_guile_func)
-{
- SCM ret;
-#ifdef HAS_LIBSTROKE
- char *stroke;
-
- SCM_ASSERT (scm_is_string (scm_stroke), scm_stroke,
- SCM_ARG1, "stroke");
-
- stroke = SCM_STRING_CHARS (scm_stroke);
-
- if (!s_stroke_uniq(stroke)) {
- if (stroke_info_mode) {
- s_log_message(_("Duplicate stroke definition "
- "passed to stroke! [%s]\n"),
- stroke);
- printf(_("Duplicate stroke definition "
- "passed to stroke! [%s]\n"),
- stroke);
- }
- ret = SCM_BOOL_F;
- } else {
- s_stroke_add_entry(stroke, scm_guile_func);
- ret = SCM_BOOL_T;
- }
-#else
- if (stroke_info_mode) {
- printf(_("A stroke keyword has been found in an rc file, but gschem\n"
- "is not compiled to support strokes, please recompile gschem\n"
- "with LibStroke\n"));
- }
-#endif
-
- return ret;
-}
-#endif
-
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
diff --git a/gschem/src/g_register.c b/gschem/src/g_register.c
index d369c4c..c9cad7d 100644
--- a/gschem/src/g_register.c
+++ b/gschem/src/g_register.c
@@ -196,10 +196,6 @@ static struct gsubr_t gschem_funcs[] = {
{ "edit-rotate-90-hotkey", 0, 0, 0, g_keys_edit_rotate_90_hotkey },
{ "edit-mirror", 0, 0, 0, g_keys_edit_mirror },
{ "edit-mirror-hotkey", 0, 0, 0, g_keys_edit_mirror_hotkey },
-#if 0 /* Obsolete */
- { "edit-stretch", 0, 0, 0, g_keys_edit_stretch },
- { "edit-stretch-hotkey", 0, 0, 0, g_keys_edit_stretch_hotkey },
-#endif
{ "edit-slot", 0, 0, 0, g_keys_edit_slot },
{ "edit-color", 0, 0, 0, g_keys_edit_color },
{ "edit-edit", 0, 0, 0, g_keys_edit_edit },
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index f1692fd..cc3477b 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -239,16 +239,11 @@ DEFINE_I_CALLBACK(file_new_window)
*/
DEFINE_I_CALLBACK(file_open)
{
-
TOPLEVEL *w_current = (TOPLEVEL *) data;
exit_if_null(w_current);
x_fileselect_open (w_current);
-
-#if 0 /* replaced by above */
- setup_open_file_selector(w_current);
-#endif
}
/*! \todo Finish function documentation!!!
@@ -306,12 +301,6 @@ DEFINE_I_CALLBACK(file_save)
if (strstr(w_current->page_current->page_filename,
w_current->untitled_name)) {
x_fileselect_save (w_current);
-#if 0 /* replaced with x_fileselect_setup */
- setup_saveas_file_selector(
- w_current,
- SAVEAS,
- w_current->page_current->page_filename);
-#endif
} else {
x_window_save_page (w_current,
w_current->page_current,
@@ -374,12 +363,6 @@ DEFINE_I_CALLBACK(file_save_as)
exit_if_null(w_current);
x_fileselect_save (w_current);
-
-#if 0 /* replaced with above */
- setup_saveas_file_selector(w_current,
- SAVEAS,
- w_current->page_current->page_filename);
-#endif
}
/*! \todo Finish function documentation!!!
@@ -2226,9 +2209,6 @@ DEFINE_I_CALLBACK(add_component)
x_compselect_open (w_current);
-#if 0 /* replaced by above */
- setup_place_file_selector(w_current);
-#endif
i_update_middle_button(w_current,
i_callback_add_component, _("Component"));
@@ -3426,11 +3406,6 @@ DEFINE_I_CALLBACK(cancel)
/* clear the key guile command-sequence */
scm_c_eval_string ("(set! current-command-sequence '())");
- /* see above comment hack */
-#if 0
- set_cursor_normal();
-#endif
-
if (w_current->inside_action) {
o_redraw_all(w_current);
}
@@ -3503,21 +3478,6 @@ DEFINE_I_CALLBACK(options_show_coord_window)
coord_dialog (w_current, mouse_x, mouse_y);
}
-#if 0 /* experimental */
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-DEFINE_I_CALLBACK(preview)
-{
- TOPLEVEL *w_current = (TOPLEVEL *) data;
-
- exit_if_null(w_current);
- setup_preview(w_current);
-}
-#endif
-
/* these is a special wrapper function which cannot use the above */
/* DEFINE_I_CALLBACK macro */
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index e41c487..c847cd8 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -429,12 +429,6 @@ OBJECT *o_attrib_add_attrib(TOPLEVEL *w_current,
color = w_current->detachedattr_color;
o_current = NULL;
-
-#if 0 /* don't error out, instead treat text like another OBJECT, but */
- /* don't attach it anywhere */
- /* s_log_message("Cannot attach attribute to text item\n");*/
- /* return(NULL);*/
-#endif
break;
}
} else {
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 57adf68..24639aa 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -20,12 +20,6 @@
#include <config.h>
#include <stdio.h>
-/* instrumentation code */
-#if 0
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-
#include <libgeda/libgeda.h>
#include "../include/x_states.h"
@@ -400,9 +394,6 @@ void o_drawbounding(TOPLEVEL *w_current, OBJECT *o_list, GList *o_glist,
(w_current->drawbounding_action_mode == FREE)) {
diff_x = w_current->last_x - w_current->start_x;
diff_y = w_current->last_y - w_current->start_y;
-#if 0
- printf("switching to contrained\n");
-#endif
w_current->drawbounding_action_mode = CONSTRAINED;
if (w_current->actionfeedback_mode == OUTLINE) {
@@ -507,9 +498,6 @@ void o_drawbounding(TOPLEVEL *w_current, OBJECT *o_list, GList *o_glist,
/* going to free from constrained */
if ((!w_current->CONTROLKEY) &&
(w_current->drawbounding_action_mode == CONSTRAINED)) {
-#if 0
- printf("switching to free\n");
-#endif
diff_x = w_current->last_x - w_current->start_x;
diff_y = w_current->last_y - w_current->start_y;
w_current->drawbounding_action_mode = FREE;
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 953702b..908f489 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -196,16 +196,6 @@ void o_bus_draw_xor_single(TOPLEVEL *w_current,
gdk_gc_set_foreground(w_current->outline_xor_gc,
x_get_darkcolor(color));
-#if 0
- if (w_current->bus_style == THICK ) {
- size = SCREENabs(w_current, BUS_WIDTH);
- gdk_gc_set_line_attributes(w_current->outline_xor_gc, size+1,
- GDK_LINE_SOLID,
- GDK_CAP_NOT_LAST,
- GDK_JOIN_MITER);
- }
-#endif
-
if (whichone == 0) {
dx1 = dx;
dy1 = dy;
@@ -228,15 +218,6 @@ void o_bus_draw_xor_single(TOPLEVEL *w_current,
sx[1]+dx2, sy[1]+dy2);
/* backing store ? not approriate here */
-
-#if 0
- if (w_current->bus_style == THICK ) {
- gdk_gc_set_line_attributes(w_current->outline_xor_gc, 0,
- GDK_LINE_SOLID,
- GDK_CAP_NOT_LAST,
- GDK_JOIN_MITER);
- }
-#endif
}
/*! \todo Finish function documentation!!!
@@ -251,86 +232,6 @@ void o_bus_start(TOPLEVEL *w_current, int x, int y)
w_current->last_x = w_current->start_x = fix_x(w_current, x);
w_current->last_y = w_current->start_y = fix_y(w_current, y);
-#if 0 /* not ready for prime time use, this is the snap any point #if 0 */
- int distance1;
- int distance2;
- OBJECT *real;
- OBJECT *o_current;
- int temp_x, temp_y;
- o_current = o_CONN_search_closest_range(w_current,
- w_current->page_current->object_head,
- w_current->start_x, w_current->start_y,
- &temp_x, &temp_y, 200, NULL, NULL);
-
- if (o_current) {
- w_current->last_x = w_current->start_x = temp_x;
- w_current->last_y = w_current->start_y = temp_y;
- } else {
- w_current->last_x = w_current->start_x = fix_x(w_current, x);
- w_current->last_y = w_current->start_y = fix_y(w_current, y);
- }
-#endif
-
-#if 0 /* not ready for prime time use */
- /* new bus extenstion stuff */
- o_current = w_current->page_current->selection_list;
- if (o_current != NULL && w_current->event_state == STARTDRAWNET) {
- if (o_current->type == OBJ_BUS) {
- if (o_current->line) {
-
- real = o_list_sear( /* ch */
- w_current->page_current->object_head,
- o_current);
-
- if (!real) {
- fprintf(stderr, _("selected a nonexistant object!\n"));
- exit(-1);
- }
- distance1 = dist(
- real->line->screen_x[0],
- real->line->screen_y[0],
- w_current->start_x, w_current->start_y);
-
- distance2 = dist(
- real->line->screen_x[1],
- real->line->screen_y[1],
- w_current->start_x, w_current->start_y);
-
- printf("%d %d\n", distance1, distance2);
-
- if (distance1 < distance2) {
- w_current->last_x = w_current->start_x =
- real->line->screen_x[0];
- w_current->last_y = w_current->start_y =
- real->line->screen_y[0];
- } else {
- w_current->last_x = w_current->start_x =
- real->line->screen_x[1];
- w_current->last_y = w_current->start_y =
- real->line->screen_y[1];
- }
- }
- } else if (o_current->type == OBJ_COMPLEX ||
- o_current->type == OBJ_PLACEHOLDER) {
- real = o_list_sear( /* ch */
- w_current->page_current->object_head,
- o_current);
-
- if (!real) {
- fprintf(stderr, _("selected a nonexistant object!\n"));
- exit(-1);
- }
-
- o_CONN_search_closest(w_current, o_current->complex,
- w_current->start_x, w_current->start_y,
- &temp_x, &temp_y, NULL);
- w_current->last_x = w_current->start_x = temp_x;
- w_current->last_y = w_current->start_y = temp_y;
- }
-
- }
-#endif
-
if (w_current->bus_style == THICK ) {
size = SCREENabs(w_current, BUS_WIDTH);
gdk_gc_set_line_attributes(w_current->xor_gc, size,
@@ -415,22 +316,6 @@ int o_bus_end(TOPLEVEL *w_current, int x, int y)
return(FALSE);
}
-#if 0 /* not ready for prime time use */
- /* second attempt at all snapping */
- o_current = o_CONN_search_closest_range(w_current,
- w_current->page_current->object_head,
- w_current->last_x, w_current->last_y,
- &temp_x, &temp_y, 200, NULL, NULL);
-
- if (o_current) {
- w_current->last_x = temp_x;
- w_current->last_y = temp_y;
- } else {
- w_current->last_x = fix_x(w_current, x);
- w_current->last_y = fix_y(w_current, y);
- }
-#endif
-
gdk_gc_set_foreground(w_current->gc,
x_get_color(color));
gdk_draw_line(w_current->window, w_current->gc, w_current->start_x, w_current->start_y, w_current->last_x, w_current->last_y);
@@ -469,18 +354,6 @@ int o_bus_end(TOPLEVEL *w_current, int x, int y)
g_list_free(other_objects);
o_cue_draw_single(w_current, w_current->page_current->object_tail);
- /* this needs to be bus specific... might not be needed */
-#if 0
- o_bus_conn_erase(w_current, w_current->page_current->object_tail);
- o_bus_conn_draw(w_current, w_current->page_current->object_tail);
- o_conn_draw_objects(w_current, w_current->page_current->object_tail);
-
- if (w_current->net_consolidate == TRUE) {
- o_bus_consolidate_segments(w_current,
- w_current->page_current->object_tail);
- }
-#endif
-
w_current->page_current->CHANGED=1;
w_current->start_x = w_current->save_x;
w_current->start_y = w_current->save_y;
@@ -571,11 +444,6 @@ void o_bus_eraserubber(TOPLEVEL *w_current)
GDK_JOIN_MITER);
}
-#if 0
- gdk_gc_set_foreground(w_current->gc,
- x_get_color(w_current->background_color) );
-#endif
-
gdk_draw_line(w_current->window, w_current->xor_gc, w_current->start_x, w_current->start_y, w_current->last_x, w_current->last_y);
if (w_current->bus_style == THICK ) {
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 6f26434..73fb006 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -313,9 +313,6 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
g_free(buffer);
if (w_current->actionfeedback_mode == OUTLINE) {
-#if 0
- printf("inside draw outline here\n");
-#endif
/* erase outline */
o_complex_translate_display_object_glist(w_current,
@@ -323,9 +320,6 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
w_current->page_current->
complex_place_list);
} else {
-#if 0
- printf("inside draw bounding here\n");
-#endif
world_get_object_glist_bounds(w_current,
w_current->page_current->
complex_place_list,
@@ -407,17 +401,11 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
/* check for nulls in all this hack */
if (w_current->actionfeedback_mode == OUTLINE) {
-#if 0
- printf("inside draw outline here\n");
-#endif
/* erase outline */
o_complex_translate_display_object_glist(w_current,
diff_x, diff_y,
w_current->page_current->complex_place_list);
} else {
-#if 0
- printf("inside draw bounding here\n");
-#endif
world_get_object_glist_bounds(w_current,
w_current->page_current->complex_place_list,
&w_rleft, &w_rtop,
@@ -681,12 +669,6 @@ void o_complex_translate_all(TOPLEVEL *w_current, int offset)
/* this is an experimental mod, to be able to translate to all
* places */
-#if 0
- o_complex_world_translate(1000, 1000, object_head);
- printf("symbol -%d -%d\n", x, y);
- o_complex_world_translate(-x, -y, object_head); /* to zero, zero */
-#endif
-
a_zoom_extents(w_current, w_current->page_current->object_head,
A_PAN_DONT_REDRAW);
o_unselect_all(w_current);
@@ -783,42 +765,22 @@ int o_complex_mirror_world(TOPLEVEL *w_current, int world_centerx, int world_cen
switch(object->complex->angle) {
case(90):
object->complex->angle = 270;
-#if 0
- o_text_change_angle(w_current, object->complex->prim_objs,
- object->complex->angle);
-#endif
-
change = 1;
break;
case(270):
object->complex->angle = 90;
-#if 0
- o_text_change_angle(w_current, object->complex->prim_objs
- object->complex->angle);
-#endif
change = 1;
break;
}
-#if 0
- object->complex->angle = (object->complex->angle + 180) % 360;
-#endif
object->complex->mirror = !object->complex->mirror;
-#if 0
- object->complex->x = 0;
- object->complex->y = 0;
-#endif
o_complex_world_translate_toplevel(w_current, x, y, object);
#if DEBUG
printf("final res %d %d\n", object->complex->x, object->complex->y);
#endif
-#if 0
- object->complex->x = x;
- object->complex->y = y;
-#endif
return(change);
}
diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index f51f995..cb624c7 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -103,9 +103,6 @@ void o_cue_draw_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone)
conn = (CONN *) cl_current->data;
if (conn->x == x && conn->y == y) {
-#if 0
- printf("type: %d x: %d y: %d cx: %d cy: %d\n", conn->type, x, y, conn->x, conn->y);
-#endif
switch(conn->type) {
case(CONN_ENDPOINT):
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index d29c490..698a0d4 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -147,13 +147,8 @@ OBJECT *o_grips_search_world(TOPLEVEL *w_current, int x, int y, int *whichone)
if(found != NULL) return found;
break;
-#if 0
- /* This code is wrong. Continue searching even if the object */
- /* does not have grips */
default:
- /* object type is unknown : error condition */
- return NULL;
-#endif
+ break;
}
}
s_current = s_current->next;
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index a8edd22..908e906 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -683,10 +683,6 @@ void o_mirror_world(TOPLEVEL *w_current, GList *list, int centerx, int centery)
case(OBJ_ARC):
o_arc_erase(w_current, object);
-#if 0 /* not needed anymore */
- SCREENtoWORLD(w_current, centerx, centery,
- &world_centerx, &world_centery);
-#endif
o_arc_mirror_world(w_current, centerx, centery, object);
o_arc_draw(w_current, object);
break;
@@ -930,15 +926,6 @@ int o_edit_find_text(TOPLEVEL * w_current, OBJECT * o_list, char *stext,
/* replaced strcmp with strstr to simplify the search */
if (strstr(o_current->text->string,stext)) {
if (!skiplast) {
-
-#if 0 /* replaced by code below by avh, might not quite be right though */
- set_window(w_current, o_current->text->x - FIND_WINDOW_HALF_SIZE,
- o_current->text->x + FIND_WINDOW_HALF_SIZE,
- o_current->text->y - FIND_WINDOW_HALF_SIZE,
- o_current->text->y + FIND_WINDOW_HALF_SIZE);
- correct_aspect(w_current);
-
-#endif
a_zoom(w_current, ZOOM_FULL, DONTCARE, A_PAN_DONT_REDRAW);
text_screen_height = SCREENabs(w_current,
o_text_height(o_current->
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index 96a7f23..b27f0ed 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -241,16 +241,6 @@ void o_net_draw_xor_single(TOPLEVEL *w_current, int dx, int dy, int whichone,
gdk_gc_set_foreground(w_current->outline_xor_gc,
x_get_darkcolor(color));
-#if 0 /* if I had this enabled, than xoring would leave a lot of mouse drops */
- if (w_current->net_style == THICK ) {
- size = SCREENabs(w_current, NET_WIDTH);
- gdk_gc_set_line_attributes(w_current->outline_xor_gc, size+1,
- GDK_LINE_SOLID,
- GDK_CAP_NOT_LAST,
- GDK_JOIN_MITER);
- }
-#endif
-
if (whichone == 0) {
dx1 = dx;
dy1 = dy;
@@ -273,15 +263,6 @@ void o_net_draw_xor_single(TOPLEVEL *w_current, int dx, int dy, int whichone,
sx[1]+dx2, sy[1]+dy2);
/* backing store ? not approriate here */
-
-#if 0 /* if I had this enabled, than xoring would leave a lot of mouse drops */
- if (w_current->net_style == THICK ) {
- gdk_gc_set_line_attributes(w_current->outline_xor_gc, 0,
- GDK_LINE_SOLID,
- GDK_CAP_NOT_LAST,
- GDK_JOIN_MITER);
- }
-#endif
}
/*! \todo Finish function documentation!!!
@@ -299,86 +280,6 @@ void o_net_start(TOPLEVEL *w_current, int x, int y)
w_current->last_y = w_current->start_y = w_current->second_y =
fix_y(w_current, y);
-#if 0 /* not ready for prime time use, this is the snap any point #if 0 */
- int distance1;
- int distance2;
- OBJECT *real;
- OBJECT *o_current;
- int temp_x, temp_y;
- o_current = o_CONN_search_closest_range(w_current,
- w_current->page_current->object_head,
- w_current->start_x, w_current->start_y,
- &temp_x, &temp_y, 200, NULL, NULL);
-
- if (o_current) {
- w_current->last_x = w_current->start_x = temp_x;
- w_current->last_y = w_current->start_y = temp_y;
- } else {
- w_current->last_x = w_current->start_x = fix_x(w_current, x);
- w_current->last_y = w_current->start_y = fix_y(w_current, y);
- }
-#endif
-
-#if 0 /* not ready for prime time use */
- /* new net extenstion stuff */
- o_current = (OBJECT *) w_current->page_current->selection_list->data;
- if (o_current != NULL && w_current->event_state == STARTDRAWNET) {
- if (o_current->type == OBJ_NET) {
- if (o_current->line) {
-
- real = o_list_sear( /* ch */
- w_current->page_current->object_head,
- o_current);
-
- if (!real) {
- fprintf(stderr, _("selected a nonexistant object!\n"));
- exit(-1);
- }
- distance1 = dist(
- real->line->screen_x[0],
- real->line->screen_y[0],
- w_current->start_x, w_current->start_y);
-
- distance2 = dist(
- real->line->screen_x[1],
- real->line->screen_y[1],
- w_current->start_x, w_current->start_y);
-
- printf("%d %d\n", distance1, distance2);
-
- if (distance1 < distance2) {
- w_current->last_x = w_current->start_x =
- real->line->screen_x[0];
- w_current->last_y = w_current->start_y =
- real->line->screen_y[0];
- } else {
- w_current->last_x = w_current->start_x =
- real->line->screen_x[1];
- w_current->last_y = w_current->start_y =
- real->line->screen_y[1];
- }
- }
- } else if (o_current->type == OBJ_COMPLEX ||
- o_current->type == OBJ_PLACEHOLDER) {
- real = o_list_sear( /* ch */
- w_current->page_current->object_head,
- o_current);
-
- if (!real) {
- fprintf(stderr, _("selected a nonexistant object!\n"));
- exit(-1);
- }
-
- o_CONN_search_closest(w_current, o_current->complex,
- w_current->start_x, w_current->start_y,
- &temp_x, &temp_y, NULL);
- w_current->last_x = w_current->start_x = temp_x;
- w_current->last_y = w_current->start_y = temp_y;
- }
-
- }
-#endif
-
if (w_current->net_style == THICK ) {
size = SCREENabs(w_current, NET_WIDTH);
gdk_gc_set_line_attributes(w_current->xor_gc, size,
@@ -488,23 +389,6 @@ int o_net_end(TOPLEVEL *w_current, int x, int y)
return (FALSE);
}
-#if 0 /* not ready for prime time use */
- /* second attempt at all snapping */
- o_current = o_CONN_search_closest_range(w_current,
- w_current->page_current->
- object_head, w_current->last_x,
- w_current->last_y, &temp_x,
- &temp_y, 200, NULL, NULL);
-
- if (o_current) {
- w_current->last_x = temp_x;
- w_current->last_y = temp_y;
- } else {
- w_current->last_x = fix_x(w_current, x);
- w_current->last_y = fix_y(w_current, y);
- }
-#endif
-
/* Primary net runs from (x1,y1)-(x2,y2) */
/* Secondary net from (x2,y2)-(x3,y3) */
@@ -645,14 +529,6 @@ int o_net_end(TOPLEVEL *w_current, int x, int y)
w_current->start_y = w_current->save_y;
o_undo_savestate(w_current, UNDO_ALL);
-#if 0 /* a false attempt at ending the rubberbanding.. */
- if (conn_count) {
- w_current->inside_action = 0;
- i_set_state(w_current, STARTDRAWNET);
- o_net_eraserubber(w_current);
- }
-#endif
-
return (TRUE);
}
@@ -765,11 +641,6 @@ void o_net_eraserubber(TOPLEVEL *w_current)
GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
}
-#if 0
- gdk_gc_set_foreground(w_current->gc,
- x_get_color(w_current->background_color));
-#endif
-
/* Erase primary primary rubber net line */
gdk_draw_line(w_current->window, w_current->xor_gc, w_current->start_x,
w_current->start_y, w_current->last_x, w_current->last_y);
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index 40f8111..ec871ec 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -357,11 +357,6 @@ void o_pin_eraserubber(TOPLEVEL *w_current)
GDK_JOIN_MITER);
}
-#if 0
- gdk_gc_set_foreground(w_current->xor_gc,
- x_get_color(w_current->background_color) );
-#endif
-
gdk_draw_line(w_current->window, w_current->xor_gc, w_current->start_x, w_current->start_y, w_current->last_x, w_current->last_y);
if (w_current->net_style == THICK ) {
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index 60ebd2b..f90c1b9 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -280,13 +280,6 @@ void o_select_box_end(TOPLEVEL *w_current, int x, int y)
int box_width, box_height;
int box_left, box_top;
-#if 0
- if (w_current->inside_action == 0) {
- o_redraw(w_current, w_current->page_current->object_head, TRUE);
- return;
- }
-#endif
-
box_width = abs(w_current->last_x - w_current->start_x);
box_height = abs(w_current->last_y - w_current->start_y);
@@ -322,13 +315,6 @@ void o_select_box_rubberband(TOPLEVEL *w_current, int x, int y)
int box_width, box_height;
int box_left, box_top;
-#if 0
- if (w_current->inside_action == 0) {
- o_redraw(w_current, w_current->page_current->object_head, TRUE);
- return;
- }
-#endif
-
box_width = abs(w_current->last_x - w_current->start_x);
box_height = abs(w_current->last_y - w_current->start_y);
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index c30bb3b..da09198 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -226,17 +226,6 @@ void o_slot_end(TOPLEVEL *w_current, char *string, int len)
o_erase_single(w_current, object);
o_attrib_slot_update(w_current, object);
-
-#if 0 /* NEWSEL */
- /* why? */
- /* erase the selection list */
- o_erase_selected(w_current);
-
- o_attrib_slot_copy(w_current, object,
- w_current->page_current->selection_list);
- o_redraw_single(w_current,object);
-#endif
-
o_redraw_single(w_current,object);
w_current->page_current->CHANGED = 1;
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 9a777ed..e81de34 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -117,24 +117,6 @@ void o_text_draw_rectangle(TOPLEVEL *w_current, OBJECT *o_current)
right - left,
bottom - top );
}
-
-#if 0 /* in prep for future performance enhancement */
- right = right+left;
- bottom = bottom+top;
- o_current->left = min(left, right);
- o_current->top = min(top, bottom);
- o_current->right = max(left, right);
- o_current->bottom = max(top, bottom);
-
- printf("%d %d %d %d\n", left, top, right, bottom);
-
- WORLDtoSCREEN(w_current,
- o_current->text->x,
- o_current->text->y,
- &o_current->text->screen_x,
- &o_current->text->screen_y);
-#endif
-
}
/*! \todo Finish function documentation!!!
@@ -156,18 +138,6 @@ void o_text_draw(TOPLEVEL *w_current, OBJECT *o_current)
}
if (!w_current->fast_mousepan || !w_current->doing_pan) {
-
-#if 0 /* in prep for future performance enhancement... */
- int pixel_height;
- pixel_height = SCREENabs(w_current, 26*o_current->text->size/2);
- if (pixel_height < 4 /* && w_current->text_rectangle */)
- {
- o_text_draw_rectangle(w_current, o_current);
- } else {
- o_text_draw_lowlevel(w_current, o_current);
- }
-#endif
-
o_text_draw_lowlevel(w_current, o_current);
/* Indicate on the schematic that the text is invisible by */
diff --git a/gschem/src/x_basic.c b/gschem/src/x_basic.c
index b517748..b720904 100644
--- a/gschem/src/x_basic.c
+++ b/gschem/src/x_basic.c
@@ -36,49 +36,6 @@
#include <gdk/gdkx.h>
#endif
-#if 0 /* once you are sure your new color system works... delete code */
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-GdkColor *x_get_color(int color)
-{
- switch(color) {
- case(RED): return(&red ); break;
- case(BLUE): return(&blue ); break;
- case(GREEN): return(&green ); break;
- case(YELLOW): return(&yellow); break;
- case(CYAN): return(&cyan ); break;
- case(GREY): return(&grey ); break;
- case(GREY90): return(&grey90); break;
- case(BLACK): return(&black ); break;
- case(WHITE): return(&white ); break;
- default: return(&white ); break;
- }
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-GdkColor *x_get_darkcolor(int color)
-{
- switch(color) {
- case(RED): return(&darkred ); break;
- case(BLUE): return(&darkblue ); break;
- case(GREEN): return(&darkgreen ); break;
- case(YELLOW): return(&darkyellow); break;
- case(CYAN): return(&darkcyan ); break;
- case(GREY): return(&darkgrey ); break;
- case(BLACK): return(&black ); break;
- case(WHITE): return(&grey ); break;
- default: return(&white ); break;
- }
-}
-#endif
-
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 511630c..ed0ed50 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -2612,13 +2612,6 @@ extern GtkWidget *stwindow;
*/
void x_dialog_raise_all(TOPLEVEL *w_current)
{
-
-#if 0 /* don't raise the log window */
- if (stwindow) {
- gdk_window_raise(stwindow->window);
- }
-#endif
-
if(w_current->fowindow) {
gdk_window_raise(w_current->fowindow->window);
}
@@ -2635,25 +2628,10 @@ void x_dialog_raise_all(TOPLEVEL *w_current)
gdk_window_raise(w_current->cswindow->window);
}
-#if 0 /* don't raise these windows ever */
- if(w_current->fileselect[FILESELECT].xfwindow) {
- gdk_window_raise(w_current->fileselect[FILESELECT].xfwindow->window);
- }
- if(w_current->fileselect[COMPSELECT].xfwindow) {
- gdk_window_raise(w_current->fileselect[COMPSELECT].xfwindow->window);
- }
-#endif
-
if(w_current->iwindow) {
gdk_window_raise(w_current->iwindow->window);
}
-#if 0 /* don't raise the page manager window */
- if(w_current->pswindow) {
- gdk_window_raise(w_current->pswindow->window);
- }
-#endif
-
if(w_current->tiwindow) {
gdk_window_raise(w_current->tiwindow->window);
}
diff --git a/gschem/src/x_event.c b/gschem/src/x_event.c
index ac036ae..b3aa1ab 100644
--- a/gschem/src/x_event.c
+++ b/gschem/src/x_event.c
@@ -377,15 +377,6 @@ gint x_event_button_pressed(GtkWidget *widget, GdkEventButton *event,
}
break;
-#if 0 /* old way with the text dialog box which was around only once */
- case(DRAWTEXT):
- w_current->start_x = fix_x(w_current, (int) event->x);
- w_current->start_y = fix_y(w_current, (int) event->y);
- o_text_input(w_current);
- w_current->inside_action = 1;
- break;
-#endif
-
case(ENDCOMP):
o_complex_end(w_current,
fix_x(w_current, (int) event->x),
@@ -1012,11 +1003,6 @@ gint x_event_motion(GtkWidget *widget, GdkEventMotion *event,
pdiff_x = mouse_x - start_pan_x;
pdiff_y = mouse_y - start_pan_y;
-#if 0
- printf("current center: %d %d\n", current_center_x, current_center_y);
- printf("pdiff: %d %d\n", pdiff_x, pdiff_y);
-#endif
-
if (!(throttle % 5)) {
a_pan_mouse(w_current, pdiff_x*w_current->mousepan_gain,
pdiff_y*w_current->mousepan_gain);
diff --git a/gschem/src/x_grid.c b/gschem/src/x_grid.c
index 337df3f..58a0666 100644
--- a/gschem/src/x_grid.c
+++ b/gschem/src/x_grid.c
@@ -154,16 +154,6 @@ void x_grid_draw(TOPLEVEL *w_current)
w_current->gc, points, count);
}
-#if 0
- gdk_draw_pixmap(w_current->window,
- w_current->gc,
- w_current->backingstore,
- 0, 0, 0, 0,
- w_current->drawing_area->allocation.width,
- w_current->drawing_area->allocation.height);
-
-#endif
-
#if DEBUG
/* highly temp, just for diag purposes */
x_draw_tiles(w_current);
diff --git a/gschem/src/x_stroke.c b/gschem/src/x_stroke.c
index 2ab0df0..1351ba2 100644
--- a/gschem/src/x_stroke.c
+++ b/gschem/src/x_stroke.c
@@ -61,14 +61,6 @@ void x_stroke_add_point(TOPLEVEL *w_current, int x, int y)
stroke_points = new_point;
}
- /* having this xored was causing some grief; when you zoomed
- * or changed the display, there would be point droppings, so
- * that's why this isn't xor */
-#if 0
- gdk_gc_set_foreground(w_current->xor_gc,
- x_get_color(w_current->stroke_color));
-#endif
-
gdk_gc_set_foreground(w_current->gc,
x_get_color(w_current->stroke_color));
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index d7cd9c0..ef9d274 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -446,16 +446,6 @@ void x_window_create_main(TOPLEVEL *w_current)
if( auto_place_mode )
gtk_widget_set_uposition (w_current->main_window, 10, 10);
- /* I could not get the destroy signal to work. always got a: */
- /* Gdk-ERROR **: an x io error occurred */
- /* aborting... */
- /* message */
-#if 0
- gtk_signal_connect (GTK_OBJECT (w_current->main_window), "destroy",
- GTK_SIGNAL_FUNC(i_callback_destroy_wm),
- w_current);
-#endif
-
/* this should work fine */
gtk_signal_connect (GTK_OBJECT (w_current->main_window), "delete_event",
GTK_SIGNAL_FUNC (i_callback_close_wm),
commit 2a0abb503110a7b7cfe5739f26bc1e4c7d939fff
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Wed Jun 27 16:47:20 2007 +0100
Correct some typos in gschem default texts.
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index 565165f..a8edd22 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -141,7 +141,7 @@ void o_lock(TOPLEVEL *w_current)
object->color = w_current->lock_color;
w_current->page_current->CHANGED=1;
} else {
- s_log_message(_("Object alreadly locked\n"));
+ s_log_message(_("Object already locked\n"));
}
}
@@ -179,7 +179,7 @@ void o_unlock(TOPLEVEL *w_current)
object->locked_color = -1;
w_current->page_current->CHANGED = 1;
} else {
- s_log_message(_("Object alreadly unlocked\n"));
+ s_log_message(_("Object already unlocked\n"));
}
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs