aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-field-chooser-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-08 15:07:21 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-08 15:07:21 +0800
commit2f3245408c26ebef806b0824a1f5885b15529fce (patch)
treed03313d46f7338dd2fbfb94c22f07e31e1b0ddf4 /widgets/table/e-table-field-chooser-item.c
parente1ef78b8f4d27c83c4d281bf18980b9acf8568b7 (diff)
downloadgsoc2013-evolution-2f3245408c26ebef806b0824a1f5885b15529fce.tar.gz
gsoc2013-evolution-2f3245408c26ebef806b0824a1f5885b15529fce.tar.zst
gsoc2013-evolution-2f3245408c26ebef806b0824a1f5885b15529fce.zip
More work on the Field Chooser. Not quite done yet.
2000-06-08 Christopher James Lahey <clahey@helixcode.com> * e-table-field-chooser-dialog.c, e-table-field-chooser-dialog.h, e-table-field-chooser-item.c, e-table-field-chooser.c, e-table-field-chooser.glade, e-table-field-chooser.h, e-table-header-item.c, e-table.c: More work on the Field Chooser. Not quite done yet. svn path=/trunk/; revision=3475
Diffstat (limited to 'widgets/table/e-table-field-chooser-item.c')
-rw-r--r--widgets/table/e-table-field-chooser-item.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index fd08af3307..4d0d03b0d4 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -44,9 +44,8 @@ static void etfci_drop_table_header (ETableFieldChooserItem *etfci);
enum {
ARG_0,
- ARG_TABLE_HEADER,
+ ARG_FULL_HEADER,
ARG_DND_CODE,
- ARG_TABLE_FONTSET,
ARG_WIDTH,
ARG_HEIGHT,
};
@@ -140,10 +139,15 @@ etfci_drop_table_header (ETableFieldChooserItem *etfci)
return;
header = GTK_OBJECT (etfci->full_header);
- gtk_signal_disconnect (header, etfci->structure_change_id);
- gtk_signal_disconnect (header, etfci->dimension_change_id);
+ if (etfci->structure_change_id)
+ gtk_signal_disconnect (header, etfci->structure_change_id);
+ if (etfci->dimension_change_id)
+ gtk_signal_disconnect (header, etfci->dimension_change_id);
+ etfci->structure_change_id = 0;
+ etfci->dimension_change_id = 0;
- gtk_object_unref (header);
+ if (header)
+ gtk_object_unref (header);
etfci->full_header = NULL;
etfci->height = 0;
}
@@ -185,9 +189,10 @@ etfci_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
etfci = E_TABLE_FIELD_CHOOSER_ITEM (o);
switch (arg_id){
- case ARG_TABLE_HEADER:
+ case ARG_FULL_HEADER:
etfci_drop_table_header (etfci);
- etfci_add_table_header (etfci, E_TABLE_HEADER(GTK_VALUE_OBJECT (*arg)));
+ if (GTK_VALUE_OBJECT (*arg))
+ etfci_add_table_header (etfci, E_TABLE_HEADER(GTK_VALUE_OBJECT (*arg)));
break;
case ARG_DND_CODE:
@@ -195,11 +200,6 @@ etfci_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
etfci->dnd_code = g_strdup(GTK_VALUE_STRING (*arg));
break;
- case ARG_TABLE_FONTSET:
- etfci_font_load (etfci, GTK_VALUE_STRING (*arg));
- e_canvas_item_request_reflow(item);
- break;
-
case ARG_WIDTH:
etfci->width = GTK_VALUE_DOUBLE (*arg);
gnome_canvas_item_request_update(item);
@@ -506,17 +506,14 @@ etfci_class_init (GtkObjectClass *object_class)
item_class->point = etfci_point;
item_class->event = etfci_event;
- gtk_object_add_arg_type ("ETableFieldChooserItem::ETableHeader", GTK_TYPE_OBJECT,
- GTK_ARG_WRITABLE, ARG_TABLE_HEADER);
gtk_object_add_arg_type ("ETableFieldChooserItem::dnd_code", GTK_TYPE_STRING,
GTK_ARG_READWRITE, ARG_DND_CODE);
- gtk_object_add_arg_type ("ETableFieldChooserItem::fontset", GTK_TYPE_STRING,
- GTK_ARG_WRITABLE, ARG_TABLE_FONTSET);
+ gtk_object_add_arg_type ("ETableFieldChooserItem::full_header", GTK_TYPE_OBJECT,
+ GTK_ARG_WRITABLE, ARG_FULL_HEADER);
gtk_object_add_arg_type ("ETableFieldChooserItem::width", GTK_TYPE_DOUBLE,
GTK_ARG_READWRITE, ARG_WIDTH);
gtk_object_add_arg_type ("ETableFieldChooserItem::height", GTK_TYPE_DOUBLE,
GTK_ARG_READABLE, ARG_HEIGHT);
-
}
static void