From e1f9153014f0fbcdd9d1c0682ac23bef74499947 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Tue, 12 Dec 2000 02:59:59 +0000 Subject: Warning-- Table layout changed and works nice. Warning-- Table layout changed and works nice. svn path=/trunk/; revision=6937 --- executive-summary/ChangeLog | 7 ++ executive-summary/component/e-summary.c | 124 ++++++++++++++------- .../executive-summary-component.c | 2 +- executive-summary/summary.html | 2 +- 4 files changed, 90 insertions(+), 45 deletions(-) (limited to 'executive-summary') diff --git a/executive-summary/ChangeLog b/executive-summary/ChangeLog index d8bd05ccc9..afd46b1ba4 100644 --- a/executive-summary/ChangeLog +++ b/executive-summary/ChangeLog @@ -18,6 +18,13 @@ between the HtmlView and the BonoboPropertyControl. * component/e-summary.c (html_event): Use the name spaced #define. + (e_summary_start_load): Add a new hack to set the border width of the + GtkHTML widget to 0. + (e_summary_rebuild_page): Redid the way the tables are drawn. Made the + title icon be constrained to 48. + + * evolution-services/executive-summary-component.c + (impl_GNOME_Evolution_Summary_ComponentFactory_createViw): Fixed a warning. * component/e-summary-util (e_pixmap_file): Free the edir. diff --git a/executive-summary/component/e-summary.c b/executive-summary/component/e-summary.c index cf085bfb1f..3454e37f83 100644 --- a/executive-summary/component/e-summary.c +++ b/executive-summary/component/e-summary.c @@ -135,8 +135,14 @@ e_summary_start_load (ESummary *esummary) priv->stream = gtk_html_begin (GTK_HTML (priv->html)); + /* HTML hacks */ /* Hack to stop page returning to the top */ GTK_HTML (priv->html)->engine->newPage = FALSE; + /* Hack to make the border width of the page 0 */ + GTK_HTML (priv->html)->engine->leftBorder = 0; + GTK_HTML (priv->html)->engine->rightBorder = 0; + GTK_HTML (priv->html)->engine->topBorder = 0; + GTK_HTML (priv->html)->engine->bottomBorder = 0; } static void @@ -356,14 +362,15 @@ make_control_html (ESummaryWindow *window, tmp = html; if (!config) { html = g_strdup_printf ("%s" - "", tmp); + "", tmp); } else { html = g_strdup_printf ("%s" "" - "", tmp, id); + "", tmp, id); } g_free (tmp); +#if 0 tmp = html; if (!l) { html = g_strdup_printf ("%s" @@ -387,7 +394,6 @@ make_control_html (ESummaryWindow *window, g_free (tmp); -#if 0 tmp = html; if (!d) { html = g_strdup_printf ("%s" @@ -415,41 +421,53 @@ make_control_html (ESummaryWindow *window, } static void -e_summary_display_window (ESummary *esummary, - ESummaryWindow *window, - int row, - int col, - int numwindows) +e_summary_display_window_title (ESummary *esummary, + ESummaryWindow *window, + int row, + int col, + int numwindows) { ESummaryPrivate *priv; - char *footer = ""; char *title_html; char *control_html; - char *colour[2] = {"e6e8e4", - "edeeeb"}; - char *title_colour[2] = {"bac1b6", + char *title_colour[2] = {"bac1b6", "cdd1c7"}; priv = esummary->private; control_html = make_control_html (window, row, col, numwindows); - title_html = g_strdup_printf ("" - "" - "
" + title_html = g_strdup_printf ("" "" + "" "
" - "" - "%s%s
", + "%s%s
", title_colour[col % 2], window->icon, - window->title, control_html, - colour[col % 2]); + window->title, control_html); g_free (control_html); gtk_html_write (GTK_HTML (priv->html), priv->stream, title_html, strlen (title_html)); g_free (title_html); +} +static void +e_summary_display_window (ESummary *esummary, + ESummaryWindow *window, + int row, + int col, + int numwindows) +{ + ESummaryPrivate *priv; + char *footer = ""; + char *header; + char *colour[2] = {"e6e8e4", + "edeeeb"}; + + priv = esummary->private; + + header = g_strdup_printf ("", colour[col % 2]); + gtk_html_write (GTK_HTML (priv->html), priv->stream, header, strlen (header)); + if (window->html != CORBA_OBJECT_NIL) { char *html; CORBA_Environment ev; @@ -487,8 +505,8 @@ e_summary_rebuild_page (ESummary *esummary) ESummaryPrivate *priv; GList *windows; char *service_table = ""; - int loc; int numwindows; + int i, j, k; g_return_val_if_fail (esummary != NULL, FALSE); g_return_val_if_fail (IS_E_SUMMARY (esummary), FALSE); @@ -523,33 +541,53 @@ e_summary_rebuild_page (ESummary *esummary) gtk_html_write (GTK_HTML (priv->html), priv->stream, service_table, strlen (service_table)); /* Load each of the services */ - loc = 0; - numwindows = g_list_length (priv->window_list); - for (windows = priv->window_list; windows; windows = windows->next) { - ESummaryWindow *window; - char *td = "", 5); - } - gtk_html_write (GTK_HTML (priv->html), - priv->stream, "", 18); - } + windows = priv->window_list; + for (i = 0; i < numwindows / 3; i++) { + GList *window = windows; - gtk_html_write (GTK_HTML (priv->html), priv->stream, - td, strlen (td)); + g_print ("i: %d/%d\n", i, numwindows); + /* Do the same row twice: + Once for the title, once for the contents */ + for (j = 0; j < 2; j++) { + + gtk_html_write (GTK_HTML (priv->html), priv->stream, + "", 4); + /* For each window on row i */ + for (k = 0; k < 3; k++) { + + g_print ("%d of 3\n", k); + if (j == 0) { + e_summary_display_window_title (esummary, + window->data, + k, k, + numwindows); + } else { + e_summary_display_window (esummary, + window->data, + k, k, + numwindows); + } - e_summary_display_window (esummary, window, - (loc / 3), (loc % 3), numwindows); + window = window->next; + if (window == NULL) + break; + } - gtk_html_write (GTK_HTML (priv->html), priv->stream, "", 5); - loc++; + gtk_html_write (GTK_HTML (priv->html), priv->stream, + "", 5); + if (j == 0) + window = windows; + else { + if (window) + windows = window->next; + else + break; + } + } } - + gtk_html_write (GTK_HTML (priv->html), priv->stream, "
"; - - window = windows->data; + numwindows = g_list_length (priv->window_list) - 1; - if (loc % 3 == 0) { - if (loc != 0) { - gtk_html_write (GTK_HTML (priv->html), - priv->stream, "
", 13); diff --git a/executive-summary/evolution-services/executive-summary-component.c b/executive-summary/evolution-services/executive-summary-component.c index 5339defc6b..96c50b1acb 100644 --- a/executive-summary/evolution-services/executive-summary-component.c +++ b/executive-summary/evolution-services/executive-summary-component.c @@ -226,7 +226,7 @@ impl_GNOME_Evolution_Summary_ComponentFactory_createView (PortableServer_Servant CORBA_Environment *ev) { BonoboObject *bonobo_object; - ExecutiveSummaryComponent *view; + BonoboObject *view; ExecutiveSummaryComponentFactory *factory; ExecutiveSummaryComponentFactoryPrivate *priv; GNOME_Evolution_Summary_Component component, component_dup; diff --git a/executive-summary/summary.html b/executive-summary/summary.html index 458080bf6e..ba23111e81 100644 --- a/executive-summary/summary.html +++ b/executive-summary/summary.html @@ -13,7 +13,7 @@ E V O L U T I O N   - + -- cgit v1.2.3
Search on Google: