aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.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/table/e-table-item.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/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 1cd37d1961..186587838c 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -367,7 +367,9 @@ eti_remove_header_model (ETableItem *eti)
eti->header_structure_change_id);
gtk_signal_disconnect (GTK_OBJECT (eti->header),
eti->header_dim_change_id);
-
+ gtk_signal_disconnect (GTK_OBJECT (eti->header),
+ eti->header_request_width_id);
+
if (eti->cell_views){
eti_unrealize_cell_views (eti);
eti_detach_cell_views (eti);
@@ -377,6 +379,7 @@ eti_remove_header_model (ETableItem *eti)
eti->header_structure_change_id = 0;
eti->header_dim_change_id = 0;
+ eti->header_request_width_id = 0;
eti->header = NULL;
}
@@ -826,6 +829,18 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));
}
+static int
+eti_request_column_width (ETableHeader *eth, int col, ETableItem *eti)
+{
+ int width = 0;
+
+ if (eti->cell_views) {
+ width = e_cell_max_width (eti->cell_views[col], view_to_model_col(eti, col), col);
+ }
+
+ return width;
+}
+
static void
eti_add_header_model (ETableItem *eti, ETableHeader *header)
{
@@ -843,6 +858,10 @@ eti_add_header_model (ETableItem *eti, ETableHeader *header)
eti->header_structure_change_id = gtk_signal_connect (
GTK_OBJECT (header), "structure_change",
GTK_SIGNAL_FUNC (eti_header_structure_changed), eti);
+
+ eti->header_request_width_id = gtk_signal_connect
+ (GTK_OBJECT (header), "request_width",
+ GTK_SIGNAL_FUNC (eti_request_column_width), eti);
}
/*