aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-importer.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-04-29 10:40:56 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-04-29 10:40:56 +0800
commit8f2a49962fb7cf66c84091a0bda71e3f261a0b9e (patch)
tree6a119fa2a042c7017f579a593d041680574d6e83 /shell/e-shell-importer.c
parent56bb2117f020133b873dad7c97ce1bd9741d6daf (diff)
downloadgsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.tar
gsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.tar.gz
gsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.tar.bz2
gsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.tar.lz
gsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.tar.xz
gsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.tar.zst
gsoc2013-evolution-8f2a49962fb7cf66c84091a0bda71e3f261a0b9e.zip
[#41013]
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. svn path=/trunk/; revision=20999
Diffstat (limited to 'shell/e-shell-importer.c')
-rw-r--r--shell/e-shell-importer.c56
1 files changed, 11 insertions, 45 deletions
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index bc03ab4417..309fa313a9 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -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 @@ typedef struct _SelectedImporterData{
#define OUT
#endif
-/* Some HTML helper functions copied from mail/mail-config-druid.c */
static struct {
char *name;
char *text;
@@ -150,57 +148,25 @@ static struct {
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 @@ show_import_wizard (BonoboUIComponent *component,
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 @@ show_import_wizard (BonoboUIComponent *component,
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 @@ show_import_wizard (BonoboUIComponent *component,
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);