[evolution-patches] #41013, importer 'help' doesn't show up
- From: Not Zed <notzed ximian com>
- To: evolution-patches ximian com
- Cc: anna ximian com
- Subject: [evolution-patches] #41013, importer 'help' doesn't show up
- Date: 28 Apr 2003 16:44:52 +0930
The help text in the html is always being given a height of '0' by the
requisition code.
I tried to get the height from the gtkhtml at that point, but decided in
the end (after much trying) it would be easier just to use a plain
gtklabel, as none of the actual text is in html anyway (its not even
valid html for that matter, e.g. no entity encoding).
It uses word-wrapping because the strings are actually too wide with
their formatting to display very nicely, and this doesn't break the
string freeze.
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1258
diff -u -3 -r1.1258 ChangeLog
--- shell/ChangeLog 25 Apr 2003 17:33:19 -0000 1.1258
+++ shell/ChangeLog 28 Apr 2003 05:58:49 -0000
@@ -1,3 +1,27 @@
+2003-04-28 Not Zed <NotZed Ximian com>
+
+ [#41013]
+
+ * e-shell-importer.c (html_size_req): removed.
+ (create_help): renamed from create_html. Only creates a plain
+ label widget now, with line wrap turned on. Also make the
+ g_return an assert, it failing is entirely based on internal code.
+ (show_import_wizard): s/create_html/create_help/g
+
+ [#41648]
+
+ * e-config-upgrade.c (upgrade_xml_file): upgrade_xml_file_1_0 made
+ a bit more generic, this handles io, a callback handles xml
+ changes.
+ (is_xml1encoded): new function to tell if a string is in gal's
+ xml1 'encoded' format, or raw locale text.
+ (decode_xml1): decode xml1 encoded format to valid utf8.
+ (upgrade_xml_1_2_rec): upgrades xml1 encoded or badly encoded xml
+ content for specific parent->child nodes.
+ (CONF_REVISION): bump the config revision to 1.3.1.
+ (e_config_upgrade): if config revision < 1.3.1, then check xml
+ files for xml1 content.
+
2003-04-24 Dan Winship <danw ximian com>
* evolution-shell-component.c (impl_setOwner): Comment out the
Index: shell/e-shell-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-importer.c,v
retrieving revision 1.55
diff -u -3 -r1.55 e-shell-importer.c
--- shell/e-shell-importer.c 9 Apr 2003 08:25:24 -0000 1.55
+++ shell/e-shell-importer.c 28 Apr 2003 05:58:50 -0000
@@ -53,7 +53,6 @@
#include "importer/evolution-importer-client.h"
#include <glade/glade.h>
-#include <gtkhtml/gtkhtml.h>
#include <gal/widgets/e-gui-utils.h>
#include <gal/widgets/e-unicode.h>
@@ -132,7 +131,6 @@
#define OUT
#endif
-/* Some HTML helper functions copied from mail/mail-config-druid.c */
static struct {
char *name;
char *text;
@@ -150,57 +148,25 @@
N_("Please select the information that you would like to import:")
}
};
-static int num_info = (sizeof (info) / sizeof (info[0]));
-
-static void
-html_size_req (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- requisition->height = GTK_LAYOUT (widget)->height;
-}
+#define num_info (sizeof (info) / sizeof (info[0]))
static GtkWidget *
-create_html (const char *name)
+create_help (const char *name)
{
- GtkWidget *scrolled, *html;
- GtkHTMLStream *stream;
- GtkStyle *style;
+ GtkWidget *label;
int i;
- html = gtk_html_new ();
- GTK_LAYOUT (html)->height = 0;
- g_signal_connect (html, "size_request",
- G_CALLBACK (html_size_req), NULL);
- gtk_html_set_editable (GTK_HTML (html), FALSE);
- style = gtk_rc_get_style (html);
- if (!style)
- style = gtk_widget_get_style (html);
- if (style) {
- gtk_widget_modify_base (html, GTK_STATE_NORMAL, &style->bg[GTK_STATE_NORMAL]);
- gtk_widget_modify_text (html, GTK_STATE_NORMAL, &style->fg[GTK_STATE_NORMAL]);
- }
- gtk_widget_show (html);
-
- scrolled = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolled);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
- GTK_POLICY_NEVER, GTK_POLICY_NEVER);
- gtk_container_add (GTK_CONTAINER (scrolled), html);
-
for (i = 0; i < num_info; i++) {
if (!strcmp (name, info[i].name))
break;
}
- g_return_val_if_fail (i != num_info, scrolled);
+ g_assert(i != num_info);
- stream = gtk_html_begin_content (GTK_HTML (html),
- "text/html; charset=utf-8");
- gtk_html_write (GTK_HTML (html), stream, "<html><p>", 9);
- gtk_html_write (GTK_HTML (html), stream, _(info[i].text), strlen (_(info[i].text)));
- gtk_html_write (GTK_HTML (html), stream, "</p></html>", 11);
- gtk_html_end (GTK_HTML (html), stream, GTK_HTML_STREAM_OK);
+ label = gtk_label_new(_(info[i].text));
+ gtk_widget_show (label);
+ gtk_label_set_line_wrap((GtkLabel *)label, TRUE);
- return scrolled;
+ return label;
}
/* Importing functions */
@@ -1217,7 +1183,7 @@
g_signal_connect (data->typedialog, "next",
G_CALLBACK (next_type_page), data);
data->typepage = importer_type_page_new (data);
- html = create_html ("type_html");
+ html = create_help ("type_html");
gtk_box_pack_start (GTK_BOX (data->typepage->vbox), html, FALSE, TRUE, 0);
gtk_box_reorder_child (GTK_BOX (data->typepage->vbox), html, 0);
@@ -1232,7 +1198,7 @@
G_CALLBACK (prepare_intelligent_page), data);
data->importerpage = importer_importer_page_new (data);
- html = create_html ("intelligent_html");
+ html = create_help ("intelligent_html");
gtk_box_pack_start (GTK_BOX (data->importerpage->vbox), html, FALSE, TRUE, 0);
gtk_box_reorder_child (GTK_BOX (data->importerpage->vbox), html, 0);
@@ -1253,7 +1219,7 @@
data->filepage = importer_file_page_new (data);
- html = create_html ("file_html");
+ html = create_help ("file_html");
gtk_box_pack_start (GTK_BOX (data->filepage->vbox), html, FALSE, TRUE, 0);
gtk_box_reorder_child (GTK_BOX (data->filepage->vbox), html, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]