From 616052c0a7fa403b42cc2ced7dca7b9d79d6357f Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Wed, 13 Dec 2000 01:46:19 +0000 Subject: Count the number of rows correctly svn path=/trunk/; revision=6961 --- executive-summary/component/e-summary.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'executive-summary/component') diff --git a/executive-summary/component/e-summary.c b/executive-summary/component/e-summary.c index f2281e4b06..c55d6887f7 100644 --- a/executive-summary/component/e-summary.c +++ b/executive-summary/component/e-summary.c @@ -358,7 +358,7 @@ make_control_html (ESummaryWindow *window, html = g_strdup_printf ("
" "" - "", id); + "
", id); tmp = html; if (!config) { @@ -506,7 +506,7 @@ e_summary_rebuild_page (ESummary *esummary) ESummaryPrivate *priv; GList *windows; char *service_table = ""; - int numwindows; + int numwindows, numrows; int i, j, k; g_return_val_if_fail (esummary != NULL, FALSE); @@ -545,10 +545,15 @@ e_summary_rebuild_page (ESummary *esummary) numwindows = g_list_length (priv->window_list) - 1; windows = priv->window_list; - for (i = 0; i < numwindows / 3; i++) { + if ( (numwindows % 3) == 0) + numrows = numwindows / 3; + else + numrows = (numwindows / 3) + 1; + + for (i = 0; i < numrows; i++) { GList *window = windows; - g_print ("i: %d/%d\n", i, numwindows); + g_print ("i: %d/%d\n", i, numrows); /* Do the same row twice: Once for the title, once for the contents */ for (j = 0; j < 2; j++) { -- cgit