From bc0d854e93fa0dd9ca596d1663f389f31f458439 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 3 Mar 2000 20:05:56 +0000 Subject: Removed some unused code. 2000-03-03 Christopher James Lahey * e-table.c: Removed some unused code. * e-table-header-item.c, e-table-header-item.h: Removed the unused normal_cursor variable and object. * e-table-col.c: Maintain a reference count in the contained ECell. svn path=/trunk/; revision=2024 --- widgets/e-table/ChangeLog | 9 +++++++++ widgets/e-table/e-table-col.c | 4 ++++ widgets/e-table/e-table-header-item.c | 5 ----- widgets/e-table/e-table-header-item.h | 2 +- widgets/e-table/e-table.c | 4 ++-- widgets/table/e-table-col.c | 4 ++++ widgets/table/e-table-header-item.c | 5 ----- widgets/table/e-table-header-item.h | 2 +- widgets/table/e-table.c | 4 ++-- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index a536a37fe5..62c8268043 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,3 +1,12 @@ +2000-03-03 Christopher James Lahey + + * e-table.c: Removed some unused code. + + * e-table-header-item.c, e-table-header-item.h: Removed the unused + normal_cursor variable and object. + + * e-table-col.c: Maintain a reference count in the contained ECell. + 2000-03-01 Ettore Perazzoli * Makefile.am: Use `libeutil.la', not `libeutil.a'. diff --git a/widgets/e-table/e-table-col.c b/widgets/e-table/e-table-col.c index e2e12caf63..457830843d 100644 --- a/widgets/e-table/e-table-col.c +++ b/widgets/e-table/e-table-col.c @@ -22,6 +22,8 @@ etc_destroy (GtkObject *object) { ETableCol *etc = E_TABLE_COL (object); + gtk_object_unref( GTK_OBJECT(etc->ecell) ); + if ( etc->is_pixbuf ) gdk_pixbuf_unref( etc->pixbuf ); else @@ -67,6 +69,8 @@ e_table_col_new (int col_idx, const char *text, int width, int min_width, etc->selected = 0; etc->resizeable = resizable; + gtk_object_ref(GTK_OBJECT(etc->ecell)); + return etc; } diff --git a/widgets/e-table/e-table-header-item.c b/widgets/e-table/e-table-header-item.c index 91a64d204a..475e15c31d 100644 --- a/widgets/e-table/e-table-header-item.c +++ b/widgets/e-table/e-table-header-item.c @@ -428,8 +428,6 @@ ethi_realize (GnomeCanvasItem *item) gnome_canvas_get_color (item->canvas, "black", &c); gdk_gc_set_foreground (ethi->gc, &c); - ethi->normal_cursor = gdk_cursor_new (GDK_ARROW); - if (!ethi->font){ g_warning ("Font had not been set for this ETableHeader"); ethi_font_load (ethi, "fixed"); @@ -467,9 +465,6 @@ ethi_unrealize (GnomeCanvasItem *item) gdk_gc_unref (ethi->gc); ethi->gc = NULL; - gdk_cursor_destroy (ethi->normal_cursor); - ethi->normal_cursor = NULL; - gtk_signal_disconnect (GTK_OBJECT (item->canvas), ethi->drag_motion_id); gtk_signal_disconnect (GTK_OBJECT (item->canvas), ethi->drag_end_id); gtk_signal_disconnect (GTK_OBJECT (item->canvas), ethi->drag_leave_id); diff --git a/widgets/e-table/e-table-header-item.h b/widgets/e-table/e-table-header-item.h index 156e25beef..2e889a6adf 100644 --- a/widgets/e-table/e-table-header-item.h +++ b/widgets/e-table/e-table-header-item.h @@ -15,7 +15,7 @@ typedef struct { ETableHeader *eth; GdkGC *gc; - GdkCursor *change_cursor, *normal_cursor; + GdkCursor *change_cursor; short x1, y1, height, width; GdkFont *font; diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c index 589c1ec704..074ed3c2ae 100644 --- a/widgets/e-table/e-table.c +++ b/widgets/e-table/e-table.c @@ -223,7 +223,7 @@ e_table_make_subtables (ETableModel *model, GArray *groups) return (ETableModel **) tables; } -#endif + typedef struct _Node Node; struct _Node { @@ -234,7 +234,7 @@ struct _Node { guint is_leaf:1; }; -#if 0 + static Node * leaf_new (GnomeCanvasItem *table_item, ETableModel *table_model, Node *parent) { diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index e2e12caf63..457830843d 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -22,6 +22,8 @@ etc_destroy (GtkObject *object) { ETableCol *etc = E_TABLE_COL (object); + gtk_object_unref( GTK_OBJECT(etc->ecell) ); + if ( etc->is_pixbuf ) gdk_pixbuf_unref( etc->pixbuf ); else @@ -67,6 +69,8 @@ e_table_col_new (int col_idx, const char *text, int width, int min_width, etc->selected = 0; etc->resizeable = resizable; + gtk_object_ref(GTK_OBJECT(etc->ecell)); + return etc; } diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 91a64d204a..475e15c31d 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -428,8 +428,6 @@ ethi_realize (GnomeCanvasItem *item) gnome_canvas_get_color (item->canvas, "black", &c); gdk_gc_set_foreground (ethi->gc, &c); - ethi->normal_cursor = gdk_cursor_new (GDK_ARROW); - if (!ethi->font){ g_warning ("Font had not been set for this ETableHeader"); ethi_font_load (ethi, "fixed"); @@ -467,9 +465,6 @@ ethi_unrealize (GnomeCanvasItem *item) gdk_gc_unref (ethi->gc); ethi->gc = NULL; - gdk_cursor_destroy (ethi->normal_cursor); - ethi->normal_cursor = NULL; - gtk_signal_disconnect (GTK_OBJECT (item->canvas), ethi->drag_motion_id); gtk_signal_disconnect (GTK_OBJECT (item->canvas), ethi->drag_end_id); gtk_signal_disconnect (GTK_OBJECT (item->canvas), ethi->drag_leave_id); diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h index 156e25beef..2e889a6adf 100644 --- a/widgets/table/e-table-header-item.h +++ b/widgets/table/e-table-header-item.h @@ -15,7 +15,7 @@ typedef struct { ETableHeader *eth; GdkGC *gc; - GdkCursor *change_cursor, *normal_cursor; + GdkCursor *change_cursor; short x1, y1, height, width; GdkFont *font; diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 589c1ec704..074ed3c2ae 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -223,7 +223,7 @@ e_table_make_subtables (ETableModel *model, GArray *groups) return (ETableModel **) tables; } -#endif + typedef struct _Node Node; struct _Node { @@ -234,7 +234,7 @@ struct _Node { guint is_leaf:1; }; -#if 0 + static Node * leaf_new (GnomeCanvasItem *table_item, ETableModel *table_model, Node *parent) { -- cgit