aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGediminas Paulauskas <menesis@delfi.lt>2001-04-04 10:14:11 +0800
committerGediminas Paulauskas <menesis@src.gnome.org>2001-04-04 10:14:11 +0800
commit7296e1c66438454fa48b616605a6720e6ab05923 (patch)
treefcc8f32a13472453eedadca7f385ac6dba43d208
parent2723c5fba64556af7aadf82916a765cbecb0bda5 (diff)
downloadgsoc2013-evolution-7296e1c66438454fa48b616605a6720e6ab05923.tar.gz
gsoc2013-evolution-7296e1c66438454fa48b616605a6720e6ab05923.tar.zst
gsoc2013-evolution-7296e1c66438454fa48b616605a6720e6ab05923.zip
set content type to utf8. fix warning. just call on_link_clicked().
2001-04-04 Gediminas Paulauskas <menesis@delfi.lt> * mail-config-druid.c (create_html): set content type to utf8. * mail-config.c (mail_config_check_service): fix warning. * mail-display.c (link_open_in_browser): just call on_link_clicked(). (link_menu): Open link works. (link_copy_location): claim selection. (on_selection_get): new function, selection handler. (mail_display_new): connect to selection_get. FIXME: does not work. 2001-04-04 Gediminas Paulauskas <menesis@delfi.lt> * importer/importer.c (create_html): copied newer and fixed function from mail/mail-config-druid.c. (html_new, put_html): removed. (show_import_wizard): use create_html instead of html_new/put_html pair. * importer/importer.glade: a try to set logo. removed source generation options. svn path=/trunk/; revision=9161
-rw-r--r--art/Makefile.am1
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-config-druid.c3
-rw-r--r--mail/mail-config.c3
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/importer/import.glade28
-rw-r--r--shell/importer/importer.c87
7 files changed, 76 insertions, 65 deletions
diff --git a/art/Makefile.am b/art/Makefile.am
index eea7c69c75..fac9c3f1d5 100644
--- a/art/Makefile.am
+++ b/art/Makefile.am
@@ -9,6 +9,7 @@ images_DATA = \
encrypt.xpm \
folder.xpm \
forward.xpm \
+ import.png \
import.xpm \
move_message.xpm \
print.xpm \
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8b0522cdec..fce55d6ae6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,15 @@
2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
+ * mail-config-druid.c (create_html): set content type to utf8.
+ * mail-config.c (mail_config_check_service): fix warning.
+ * mail-display.c (link_open_in_browser): just call on_link_clicked().
+ (link_menu): Open link works.
+ (link_copy_location): claim selection.
+ (on_selection_get): new function, selection handler.
+ (mail_display_new): connect to selection_get. FIXME: does not work.
+
+2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
+
* component-factory.c: use big trash icon, stolen from mc.
2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 6b99bd4a4a..c6d386507f 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -149,7 +149,8 @@ create_html (const char *name)
}
g_return_val_if_fail (i != num_info, scrolled);
- stream = gtk_html_begin (GTK_HTML (html));
+ stream = gtk_html_begin_content (GTK_HTML (html),
+ "text/html; charset=utf-8");
gtk_html_write (GTK_HTML (html), stream, "<html><p>", 9);
utf8 = e_utf8_from_locale_string (_(info[i].text));
gtk_html_write (GTK_HTML (html), stream, utf8, strlen (utf8));
diff --git a/mail/mail-config.c b/mail/mail-config.c
index a5ce5329f1..cf7e1eb517 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1017,7 +1017,8 @@ mail_config_check_service (const char *url, CamelProviderType type, GList **auth
GNOME_STOCK_BUTTON_CANCEL,
NULL);
label = gtk_label_new (_("Connecting to server..."));
- gtk_box_pack_start (GNOME_DIALOG (dialog)->vbox, label, TRUE, TRUE, 10);
+ gtk_box_pack_start (GTK_BOX(GNOME_DIALOG (dialog)->vbox),
+ label, TRUE, TRUE, 10);
gnome_dialog_set_close (GNOME_DIALOG (dialog), FALSE);
gtk_signal_connect (GTK_OBJECT (dialog), "clicked",
GTK_SIGNAL_FUNC (check_cancelled), &id);
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 822d329040..feafca398d 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,12 @@
+2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
+
+ * importer/importer.c (create_html): copied newer and fixed function
+ from mail/mail-config-druid.c.
+ (html_new, put_html): removed.
+ (show_import_wizard): use create_html instead of html_new/put_html pair.
+ * importer/importer.glade: a try to set logo. removed source generation
+ options.
+
2001-04-03 Dan Winship <danw@ximian.com>
* main.c:
diff --git a/shell/importer/import.glade b/shell/importer/import.glade
index d3163c9bbe..b540129d27 100644
--- a/shell/importer/import.glade
+++ b/shell/importer/import.glade
@@ -5,29 +5,19 @@
<name>import</name>
<program_name>import</program_name>
<directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
+ <source_directory>.</source_directory>
+ <pixmaps_directory>../../art</pixmaps_directory>
<language>C</language>
<gnome_support>True</gnome_support>
<gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>True</output_main_file>
- <output_support_files>True</output_support_files>
- <output_build_files>True</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
- <translatable_strings_file></translatable_strings_file>
+ <output_main_file>False</output_main_file>
+ <output_support_files>False</output_support_files>
+ <output_build_files>False</output_build_files>
</project>
<widget>
<class>GtkWindow</class>
<name>importwizard</name>
- <cxx_use_heap>True</cxx_use_heap>
<visible>False</visible>
<title>Evolution Importer Utility</title>
<type>GTK_WINDOW_TOPLEVEL</type>
@@ -40,12 +30,10 @@
<widget>
<class>GnomeDruid</class>
<name>druid1</name>
- <cxx_use_heap>True</cxx_use_heap>
<widget>
<class>GnomeDruidPageStart</class>
<name>page1</name>
- <cxx_use_heap>True</cxx_use_heap>
<title>Evolution Import Utility</title>
<text>Welcome to the Evolution Import Utility.
With this wizard you will be guided through the process of
@@ -55,22 +43,22 @@ importing external files into Evolution.</text>
<background_color>153,174,191</background_color>
<logo_background_color>255,255,255</logo_background_color>
<textbox_color>255,255,255</textbox_color>
+ <logo_image>../../images/evolution/import.png</logo_image>
</widget>
<widget>
<class>GnomeDruidPageStandard</class>
<name>page2</name>
- <cxx_use_heap>True</cxx_use_heap>
<title>Select a file</title>
<title_color>1,1,1</title_color>
<background_color>153,174,191</background_color>
<logo_background_color>255,255,255</logo_background_color>
+ <logo_image>../../images/evolution/import.png</logo_image>
<widget>
<class>GtkVBox</class>
<child_name>GnomeDruidPageStandard:vbox</child_name>
<name>druid-vbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
@@ -88,7 +76,6 @@ importing external files into Evolution.</text>
<widget>
<class>GnomeDruidPageFinish</class>
<name>page3</name>
- <cxx_use_heap>True</cxx_use_heap>
<title>Import</title>
<text>Click &quot;Import&quot; to begin importing the file into Evolution. </text>
<background_color>153,174,191</background_color>
@@ -96,6 +83,7 @@ importing external files into Evolution.</text>
<textbox_color>255,255,255</textbox_color>
<text_color>0,0,0</text_color>
<title_color>1,1,1</title_color>
+ <logo_image>../../images/evolution/import.png</logo_image>
</widget>
</widget>
</widget>
diff --git a/shell/importer/importer.c b/shell/importer/importer.c
index 20e11524af..e7163cf329 100644
--- a/shell/importer/importer.c
+++ b/shell/importer/importer.c
@@ -44,6 +44,7 @@
#include <gal/widgets/e-gui-utils.h>
#include <e-util/e-html-utils.h>
#include <gal/widgets/e-gui-utils.h>
+#include <gal/widgets/e-unicode.h>
#include "importer.h"
#include "GNOME_Evolution_Importer.h"
@@ -77,7 +78,20 @@ typedef struct _ImportData {
#define OUT
#endif
-/* Some HTML helper functions from mail/mail-config-gui.c */
+/* Some HTML helper functions copied from mail/mail-config-druid.c */
+static struct {
+ char *name;
+ char *text;
+} info[] = {
+ { "file_html",
+ N_("Choose the file that you want to import into Evolution, "
+ "and select what type of file it is from the list.\n\n"
+ "You can select \"Automatic\" if you do not know, and "
+ "Evolution will attempt to work it out.")
+ }
+};
+static int num_info = (sizeof (info) / sizeof (info[0]));
+
static void
html_size_req (GtkWidget *widget,
GtkRequisition *requisition)
@@ -85,14 +99,14 @@ html_size_req (GtkWidget *widget,
requisition->height = GTK_LAYOUT (widget)->height;
}
-/* Returns a GtkHTML which is already inside a GtkScrolledWindow. If
- * @white is TRUE, the GtkScrolledWindow will be inside a GtkFrame.
- */
static GtkWidget *
-html_new (gboolean white)
+create_html (const char *name)
{
- GtkWidget *html, *scrolled, *frame;
+ GtkWidget *scrolled, *html;
+ GtkHTMLStream *stream;
GtkStyle *style;
+ char *utf8;
+ int i;
html = gtk_html_new ();
GTK_LAYOUT (html)->height = 0;
@@ -100,43 +114,36 @@ html_new (gboolean white)
GTK_SIGNAL_FUNC (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_html_set_default_background_color (GTK_HTML (html),
- white ? &style->white:
&style->bg[0]);
}
- gtk_widget_set_sensitive (html, FALSE);
+ 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);
- if (white) {
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame),
- GTK_SHADOW_ETCHED_IN);
- gtk_container_add (GTK_CONTAINER (frame), scrolled);
- gtk_widget_show_all (frame);
- } else {
- gtk_widget_show_all (scrolled);
- }
- return html;
-}
-
-static void
-put_html (GtkHTML *html,
- const char *text)
-{
- GtkHTMLStream *handle;
- char *htmltext;
-
- htmltext = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL);
- handle = gtk_html_begin (html);
- gtk_html_write (html, handle, "<HTML><BODY>", 12);
- gtk_html_write (html, handle, text, strlen (text));
- gtk_html_write (html, handle, "</BODY></HTML>", 14);
- g_free (htmltext);
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
+ for (i = 0; i < num_info; i++) {
+ if (!strcmp (name, info[i].name))
+ break;
+ }
+ g_return_val_if_fail (i != num_info, scrolled);
+
+ stream = gtk_html_begin_content (GTK_HTML (html),
+ "text/html; charset=utf-8");
+ gtk_html_write (GTK_HTML (html), stream, "<html><p>", 9);
+ utf8 = e_utf8_from_locale_string (_(info[i].text));
+ gtk_html_write (GTK_HTML (html), stream, utf8, strlen (utf8));
+ g_free (utf8);
+ gtk_html_write (GTK_HTML (html), stream, "</p></html>", 11);
+ gtk_html_end (GTK_HTML (html), stream, GTK_HTML_STREAM_OK);
+
+ return scrolled;
}
/* Importing functions */
@@ -642,15 +649,9 @@ show_import_wizard (BonoboUIComponent *component,
data->filepage = importer_file_page_new (data);
data->vbox = data->filepage->vbox;
- html = html_new (TRUE);
- put_html (GTK_HTML (html),
- _("Choose the file that you want to import into Evolution, "
- "and select what type of file it is from the list.\n\n"
- "You can select \"Automatic\" if you do not know, and "
- "Evolution will attempt to work it out."));
- gtk_box_pack_start (GTK_BOX (data->vbox), html->parent->parent,
- FALSE, TRUE, 0);
- gtk_box_reorder_child (GTK_BOX (data->vbox), html->parent->parent, 0);
+ html = create_html ("file_html");
+ gtk_box_pack_start (GTK_BOX (data->vbox), html, FALSE, TRUE, 0);
+ gtk_box_reorder_child (GTK_BOX (data->vbox), html, 0);
gtk_box_pack_start (GTK_BOX (GNOME_DRUID_PAGE_STANDARD (data->filedialog)->vbox), data->vbox, TRUE, TRUE, 0);