aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-16 13:39:06 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-16 13:39:06 +0800
commitbdef37bda345359b788d5940c58b2252bf13baa8 (patch)
tree393f623c3077fb36ae2f9faf6c0d218251c252a0 /widgets/e-table
parent4ad1d8f78370bd4604dabefc35f39c42c9991038 (diff)
downloadgsoc2013-evolution-bdef37bda345359b788d5940c58b2252bf13baa8.tar.gz
gsoc2013-evolution-bdef37bda345359b788d5940c58b2252bf13baa8.tar.zst
gsoc2013-evolution-bdef37bda345359b788d5940c58b2252bf13baa8.zip
Moved the reflow signal handling into an idle handler to fix a bug when
2000-06-16 Christopher James Lahey <clahey@helixcode.com> * e-table.c, e-table.h: Moved the reflow signal handling into an idle handler to fix a bug when resizing twice in succession. svn path=/trunk/; revision=3588
Diffstat (limited to 'widgets/e-table')
-rw-r--r--widgets/e-table/ChangeLog5
-rw-r--r--widgets/e-table/e-table.c20
-rw-r--r--widgets/e-table/e-table.h2
3 files changed, 24 insertions, 3 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index eb06ac3203..d699ce3fa9 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-16 Christopher James Lahey <clahey@helixcode.com>
+
+ * e-table.c, e-table.h: Moved the reflow signal handling into an
+ idle handler to fix a bug when resizing twice in succession.
+
2000-06-15 Chris Toshok <toshok@helixcode.com>
* e-cell-tree.c (ect_print): print the icon for the tree control.
diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c
index f278ad11a5..d368b92716 100644
--- a/widgets/e-table/e-table.c
+++ b/widgets/e-table/e-table.c
@@ -83,6 +83,10 @@ et_destroy (GtkObject *object)
gtk_signal_disconnect (GTK_OBJECT (et->sort_info),
et->group_info_change_id);
+ if (et->reflow_idle_id)
+ g_source_remove(et->reflow_idle_id);
+ et->reflow_idle_id = 0;
+
gtk_object_unref (GTK_OBJECT (et->model));
gtk_object_unref (GTK_OBJECT (et->full_header));
gtk_object_unref (GTK_OBJECT (et->header));
@@ -108,6 +112,7 @@ e_table_init (GtkObject *object)
e_table->sort_info = NULL;
e_table->group_info_change_id = 0;
+ e_table->reflow_idle_id = 0;
e_table->draw_grid = 1;
e_table->draw_focus = 1;
@@ -172,11 +177,11 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
}
-static void
-table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
+static gboolean
+table_canvas_reflow_idle (ETable *e_table)
{
gdouble height, width;
- GtkAllocation *alloc = &(GTK_WIDGET (canvas)->allocation);
+ GtkAllocation *alloc = &(GTK_WIDGET (e_table->table_canvas)->allocation);
gtk_object_get (GTK_OBJECT (e_table->group),
"height", &height,
@@ -186,6 +191,15 @@ table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
gnome_canvas_set_scroll_region (
GNOME_CANVAS (e_table->table_canvas),
0, 0, MAX((int)width, alloc->width) - 1, MAX ((int)height, alloc->height) - 1);
+ e_table->reflow_idle_id = 0;
+ return FALSE;
+}
+
+static void
+table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
+{
+ if (!e_table->reflow_idle_id)
+ e_table->reflow_idle_id = g_idle_add_full (400, (GSourceFunc) table_canvas_reflow_idle, e_table, NULL);
}
static void
diff --git a/widgets/e-table/e-table.h b/widgets/e-table/e-table.h
index 4679af538b..a733d5951e 100644
--- a/widgets/e-table/e-table.h
+++ b/widgets/e-table/e-table.h
@@ -39,6 +39,8 @@ typedef struct {
int group_info_change_id;
+ int reflow_idle_id;
+
GnomeCanvas *header_canvas, *table_canvas;
GnomeCanvasItem *header_item, *root;
n class='insertions'>+54 * - stage supportaz2014-01-0644-81/+48 * - stage supportaz2014-01-0638-77/+45 * - stage supportaz2014-01-052-3/+1 * - support stageaz2014-01-052-4/+2 * Convert the tree to USES=famantoine2014-01-056-12/+6 * - Set USE_GCC=any to fix build on FreeBSD 10 and HEAD.stefan2014-01-041-2/+3 * - reset maintainerjgh2014-01-041-1/+1 * Fix pkg name collisionbapt2014-01-042-2/+2 * - reintroduce DOCS option to user removed in r338576jgh2014-01-041-1/+1 * - update to 3.1.9 which fixes many minor bugsjgh2014-01-042-5/+6 * Part 2 at removing now useless FETCH_ARGS redifitionbapt2014-01-034-5/+0 * - Attempt to fix build on systems without gcc (error was:mandree2014-01-034-11/+25 * - Ruby 1.9 is default, remove conditionalization for itswills2014-01-031-2/+0 * - update to 0.17jgh2014-01-023-23/+25 * Stop using chown in stage part-- upstream's Makefile is keen to ensure ownershipcrees2014-01-023-18/+47 * Remove expired ports:rene2013-12-315-50/+0 * - Update to 1.2204sunpoet2013-12-312-3/+3 * - rename AL2 to APACHE20 in Mk/bsd.licenses.db.mkohauer2013-12-3111-11/+11 * Update LICENSE.ume2013-12-312-2/+2 * Enable stage supportjohans2013-12-303-7/+61 * Enable stage supportjohans2013-12-301-5/+3 * Clean up the Makefile and OPTIONS.crees2013-12-303-116/+130 * Update to 2013/12/29adamw2013-12-302-3/+3 * Update to 2013/12/29.adamw2013-12-293-8/+10 * Stage ports maintained by me in irc java mailcrees2013-12-296-20/+23 * - use STAGEDIRdinoex2013-12-281-11/+3 * mail/py-libgmail: support staging and use auto plistwg2013-12-282-10/+1 * - fix exports/importsdinoex2013-12-2813-127/+217 * Horde package update:mm2013-12-286-9/+9 * Update poppler to 0.24.4.kwm2013-12-281-1/+1 * - Update to 1.5.47vsevolod2013-12-272-5/+5 * - Update to 0.6.6vsevolod2013-12-273-10/+6 * - Support STAGEjadawin2013-12-271-6/+1 * - Marked as deprecated because of no more active development and not working ...jadawin2013-12-271-0/+3 * - Update LICENSEsunpoet2013-12-271-1/+1 * Update to 3.0.5.rakuco2013-12-263-942/+1798 * - Fix build on -currentpawel2013-12-241-23/+27 * - Update LICENSEsunpoet2013-12-241-1/+1 * Remove expired ports:rene2013-12-226-52/+0 * Update to 0.9.2crees2013-12-225-41/+106 * - update to 1.0.Alpha19.0dinoex2013-12-223-32/+21 * - Update to 0.6.5vsevolod2013-12-212-4/+4 * - Update to 0.6.4vsevolod2013-12-182-5/+5 * Use new LIB_DEPENDS regimeehaupt2013-12-181-4/+4 * Use new LIB_DEPENDS regimeehaupt2013-12-18