aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2000-09-15 08:08:06 +0800
committerIain Holmes <iain@src.gnome.org>2000-09-15 08:08:06 +0800
commit22f72cc08e20c7871d93f05375fe2bafb0c1023a (patch)
treed765e7100abbfd00a916939716910b06e80e244c /widgets/e-table/e-table.c
parent6d35f43ab255e79770f4be53c058a084fe9c6826 (diff)
downloadgsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.tar
gsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.tar.gz
gsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.tar.bz2
gsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.tar.lz
gsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.tar.xz
gsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.tar.zst
gsoc2013-evolution-22f72cc08e20c7871d93f05375fe2bafb0c1023a.zip
Fix some crashes Make double clicking on the header dividers automatically
Fix some crashes Make double clicking on the header dividers automatically size the header to it's best fit. When dragging onto the header check the dragged item is a header object. Check the column is resizeable before setting the cursor to <-> Use the font and themes to draw the table and items. svn path=/trunk/; revision=5438
Diffstat (limited to 'widgets/e-table/e-table.c')
-rw-r--r--widgets/e-table/e-table.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c
index b40d7e4df8..cbc7ec3e4d 100644
--- a/widgets/e-table/e-table.c
+++ b/widgets/e-table/e-table.c
@@ -203,7 +203,17 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_
{
gnome_canvas_set_scroll_region (
GNOME_CANVAS (e_table->header_canvas),
- 0, 0, alloc->width - 1, COLUMN_HEADER_HEIGHT - 1);
+ 0, 0, alloc->width - 1, /* COLUMN_HEADER_HEIGHT - 1 */
+ E_TABLE_HEADER_ITEM (e_table->header_item)->height - 1);
+
+ /* When the header item is created ->height == 0,
+ as the font is only created when everything is realized.
+ So we set the usize here as well, so that the size of the
+ header is correct */
+ if (GTK_WIDGET (e_table->header_canvas)->allocation.height !=
+ E_TABLE_HEADER_ITEM (e_table->header_item)->height)
+ gtk_widget_set_usize (GTK_WIDGET (e_table->header_canvas), -1,
+ E_TABLE_HEADER_ITEM (e_table->header_item)->height);
}
static void
@@ -234,7 +244,8 @@ e_table_setup_header (ETable *e_table)
GTK_OBJECT (e_table->header_canvas), "size_allocate",
GTK_SIGNAL_FUNC (header_canvas_size_allocate), e_table);
- gtk_widget_set_usize (GTK_WIDGET (e_table->header_canvas), -1, COLUMN_HEADER_HEIGHT);
+ gtk_widget_set_usize (GTK_WIDGET (e_table->header_canvas), -1,
+ E_TABLE_HEADER_ITEM (e_table->header_item)->height);
}
static gboolean