aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-click-to-add.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-01-11 04:45:18 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-11 04:45:18 +0800
commita082bd60213de883a79d13f254bedd5b16a91df4 (patch)
treee04163b10d43a833c45de86e3ff58f5a393045b2 /widgets/table/e-table-click-to-add.c
parent8592ae36ae9c99fe8a5eae31ec83e046fc245567 (diff)
downloadgsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.tar
gsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.tar.gz
gsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.tar.bz2
gsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.tar.lz
gsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.tar.xz
gsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.tar.zst
gsoc2013-evolution-a082bd60213de883a79d13f254bedd5b16a91df4.zip
Made this the same size as an ETableItem with all text items. Made the
2001-01-10 Christopher James Lahey <clahey@helixcode.com> * e-table-click-to-add.c: Made this the same size as an ETableItem with all text items. Made the background color white. These need to be made themeable. svn path=/trunk/; revision=7370
Diffstat (limited to 'widgets/table/e-table-click-to-add.c')
-rw-r--r--widgets/table/e-table-click-to-add.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index e7f8c2a74e..832e7a6d9c 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -224,14 +224,7 @@ static void
etcta_realize (GnomeCanvasItem *item)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
- etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
- e_text_get_type(),
- "text", etcta->message ? etcta->message : "",
- "anchor", GTK_ANCHOR_NW,
- "width", etcta->width - 4,
- "draw_background", FALSE,
- NULL);
- e_canvas_item_move_absolute (etcta->text, 2, 2);
+
etcta->rect = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
gnome_canvas_rect_get_type(),
"x1", (double) 0,
@@ -239,9 +232,18 @@ etcta_realize (GnomeCanvasItem *item)
"x2", (double) etcta->width - 1,
"y2", (double) etcta->height - 1,
"outline_color", "black",
- "fill_color", NULL,
+ "fill_color", "white",
NULL);
+ etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
+ e_text_get_type(),
+ "text", etcta->message ? etcta->message : "",
+ "anchor", GTK_ANCHOR_NW,
+ "width", etcta->width - 4,
+ "draw_background", FALSE,
+ NULL);
+ e_canvas_item_move_absolute (etcta->text, 2, 2);
+
if (GNOME_CANVAS_ITEM_CLASS (etcta_parent_class)->realize)
(*GNOME_CANVAS_ITEM_CLASS (etcta_parent_class)->realize)(item);
}
@@ -370,7 +372,7 @@ etcta_reflow (GnomeCanvasItem *item, int flags)
gtk_object_get(GTK_OBJECT(etcta->text),
"height", &etcta->height,
NULL);
- etcta->height += 4;
+ etcta->height += 6;
}
if (etcta->row) {
gtk_object_get(GTK_OBJECT(etcta->row),
@@ -473,6 +475,8 @@ e_table_click_to_add_get_type (void)
return type;
}
+
+/* The colors in this need to be themefied. */
void
e_table_click_to_add_commit (ETableClickToAdd *etcta)
{
@@ -482,16 +486,6 @@ e_table_click_to_add_commit (ETableClickToAdd *etcta)
gtk_object_destroy(GTK_OBJECT(etcta->row));
etcta->row = NULL;
}
- if (!etcta->text) {
- etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
- e_text_get_type(),
- "text", etcta->message ? etcta->message : "",
- "anchor", GTK_ANCHOR_NW,
- "width", etcta->width - 4,
- "draw_background", FALSE,
- NULL);
- e_canvas_item_move_absolute (etcta->text, 2, 2);
- }
if (!etcta->rect) {
etcta->rect = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
gnome_canvas_rect_get_type(),
@@ -499,8 +493,18 @@ e_table_click_to_add_commit (ETableClickToAdd *etcta)
"y1", (double) 0,
"x2", (double) etcta->width - 1,
"y2", (double) etcta->height - 1,
- "outline_color", "black",
- "fill_color", NULL,
+ "outline_color", "black",
+ "fill_color", "white",
+ NULL);
+ }
+ if (!etcta->text) {
+ etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
+ e_text_get_type(),
+ "text", etcta->message ? etcta->message : "",
+ "anchor", GTK_ANCHOR_NW,
+ "width", etcta->width - 4,
+ "draw_background", FALSE,
NULL);
+ e_canvas_item_move_absolute (etcta->text, 3, 3);
}
}