aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog16
-rw-r--r--mail/evolution-mail.schemas56
-rw-r--r--mail/mail-composer-prefs.c42
-rw-r--r--mail/mail-composer-prefs.h5
-rw-r--r--mail/mail-config.glade78
-rw-r--r--mail/mail-display.c35
-rw-r--r--mail/mail-preferences.c14
-rw-r--r--mail/mail-preferences.h6
8 files changed, 129 insertions, 123 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ec22310e8b..b99183261b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,19 @@
+2003-05-20 Larry Ewing <lewing@ximian.com>
+
+ * mail-composer-prefs.c: remove references to gtkhtml property
+ manager. Connect to missing settings.
+
+ * mail-preferences.c: remove references to gtkhtml property
+ manager. Connect to missing settings.
+
+ * mail-config.glade: remove keybinding setting.
+
+ * mail-display.c (mail_display_destroy): remove notification.
+ (display_notify): set animate and redisplay. We have to redisplay
+ because the citation color may have changed.
+
+ * evolution-mail.schemas: add composer and display gconf entries.
+
2003-05-19 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (mail_account_gui_save): Only re-add the
diff --git a/mail/evolution-mail.schemas b/mail/evolution-mail.schemas
index 2a3113a289..9dcec79ee9 100644
--- a/mail/evolution-mail.schemas
+++ b/mail/evolution-mail.schemas
@@ -32,6 +32,48 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/mail/composer/magic_links</key>
+ <applyto>/apps/evolution/mail/composer/magic_links</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Automatic link recognition</short>
+ <long>
+ Recognize links in text and replace them.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/composer/magic_smileys</key>
+ <applyto>/apps/evolution/mail/composer/send_smileys</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Automatic smiley recognition</short>
+ <long>
+ Recognize smileys in text and replace them with images.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/composer/inline_spelling</key>
+ <applyto>/apps/evolution/mail/composer/inline_spelling</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Spell check inline</short>
+ <long>
+ Draw spelling error indicators on words as you type.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/mail/composer/view/From</key>
<applyto>/apps/evolution/mail/composer/view/From</applyto>
<owner>evolution-mail</owner>
@@ -149,6 +191,20 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/mail/display/animate_images</key>
+ <applyto>/apps/evolution/mail/display/animate_images</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Show Animations</short>
+ <long>
+ Show animated images as animations.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/mail/display/mime_types</key>
<applyto>/apps/evolution/mail/display/mime_types</applyto>
<owner>evolution-mail</owner>
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c
index c875b25a1a..30873a3357 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/mail-composer-prefs.c
@@ -107,7 +107,6 @@ mail_composer_prefs_finalise (GObject *obj)
MailComposerPrefs *prefs = (MailComposerPrefs *) obj;
g_object_unref (prefs->gui);
- g_object_unref (prefs->pman);
g_object_unref (prefs->enabled_pixbuf);
gdk_pixmap_unref (prefs->mark_pixmap);
g_object_unref (prefs->mark_bitmap);
@@ -796,12 +795,6 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
gboolean bool;
int style;
char *buf;
- char *names[][2] = {
- { "live_spell_check", "chkEnableSpellChecking" },
- { "magic_smileys_check", "chkAutoSmileys" },
- { "gtk_html_prop_keymap_option", "omenuShortcutsType" },
- { NULL, NULL }
- };
prefs->gconf = gconf_client_get_default ();
@@ -826,10 +819,6 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
gtk_toggle_button_set_active (prefs->send_html, bool);
g_signal_connect (prefs->send_html, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
- prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys"));
- /* FIXME: set active? */
- g_signal_connect (prefs->auto_smileys, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
prefs->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/empty_subject", NULL);
gtk_toggle_button_set_active (prefs->prompt_empty_subject, bool);
@@ -840,6 +829,16 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
gtk_toggle_button_set_active (prefs->prompt_bcc_only, bool);
g_signal_connect (prefs->prompt_bcc_only, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
+ prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys"));
+ bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/magic_smileys", NULL);
+ gtk_toggle_button_set_active (prefs->auto_smileys, bool);
+ g_signal_connect (prefs->auto_smileys, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
+
+ prefs->spell_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSpellChecking"));
+ bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/inline_spelling", NULL);
+ gtk_toggle_button_set_active (prefs->spell_check, bool);
+ g_signal_connect (prefs->spell_check, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
+
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/composer/charset", NULL);
menu = e_charset_picker_new (buf ? buf : e_iconv_locale_charset ());
@@ -847,17 +846,6 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
option_menu_connect (prefs->charset, prefs);
g_free (buf);
-#warning "gtkhtml prop manager"
-#if 0
- /* Spell Checking: GtkHTML part */
- prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (NULL));
- g_signal_connect (prefs->pman, "changed", G_CALLBACK(toggle_button_toggled), prefs);
- g_object_ref (prefs->pman);
-
- gtk_html_propmanager_set_names (prefs->pman, names);
- gtk_html_propmanager_set_gui (prefs->pman, gui, NULL);
-#endif
-
/* Spell Checking: GNOME Spell part */
prefs->colour = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerSpellCheckColor"));
prefs->language = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSpellCheckLanguage"));
@@ -985,6 +973,12 @@ mail_composer_prefs_apply (MailComposerPrefs *prefs)
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/only_bcc",
gtk_toggle_button_get_active (prefs->prompt_bcc_only), NULL);
+ gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/inline_spelling",
+ gtk_toggle_button_get_active (prefs->spell_check), NULL);
+
+ gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/magic_smileys",
+ gtk_toggle_button_get_active (prefs->auto_smileys), NULL);
+
menu = gtk_option_menu_get_menu (prefs->charset);
if (!(string = e_charset_picker_get_charset (menu)))
string = g_strdup (e_iconv_locale_charset ());
@@ -993,10 +987,6 @@ mail_composer_prefs_apply (MailComposerPrefs *prefs)
g_free (string);
/* Spell Checking */
-#warning "gtkhtml propmanager"
-#if 0
- gtk_html_propmanager_apply (prefs->pman);
-#endif
spell_apply (prefs);
/* Forwards and Replies */
diff --git a/mail/mail-composer-prefs.h b/mail/mail-composer-prefs.h
index 666c1bb646..6c181c3d8a 100644
--- a/mail/mail-composer-prefs.h
+++ b/mail/mail-composer-prefs.h
@@ -32,9 +32,6 @@ extern "C" {
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <gtkhtml/gtkhtml.h>
-#warning "re-add gtkhtml prop manager"
-/* this isn't ported in gtkhtml yet */
-/*#include <gtkhtml/gtkhtml-propmanager.h>*/
#include <libgnomeui/gnome-color-picker.h>
#include <libgnomeui/gnome-file-entry.h>
@@ -74,8 +71,6 @@ struct _MailComposerPrefs {
GtkToggleButton *prompt_bcc_only;
GtkOptionMenu *charset;
- /* Spell Checking */
- struct _GtkHTMLPropmanager *pman;
GtkToggleButton *spell_check;
GnomeColorPicker *colour;
GtkTreeView *language;
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 06499178f8..384c817a11 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -4302,84 +4302,6 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="spacing">3</property>
<child>
- <widget class="GtkHBox" id="hboxShortcutsType">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="lblShortcutsType">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Shortcuts _type:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">omenuShortcutsType</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="omenuShortcutsType">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget29">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Emacs</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">XEmacs</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Microsoft</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkFrame" id="frameBehavior">
<property name="visible">True</property>
<property name="label_xalign">0</property>
diff --git a/mail/mail-display.c b/mail/mail-display.c
index c85d2c952c..fe35dec71c 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -100,6 +100,8 @@ struct _MailDisplayPrivate {
struct _mail_msg *fetch_msg ;
GIOChannel *fetch_cancel_channel;
guint fetch_cancel_watch;
+
+ guint display_notify_id;
};
/* max number of connections to download images */
@@ -1812,7 +1814,7 @@ mail_display_render (MailDisplay *md, GtkHTML *html, gboolean reset_scroll)
const char *flag, *completed;
GtkHTMLStream *html_stream;
MailDisplayStream *stream;
-
+
g_return_if_fail (IS_MAIL_DISPLAY (md));
g_return_if_fail (GTK_IS_HTML (html));
@@ -1826,7 +1828,7 @@ mail_display_render (MailDisplay *md, GtkHTML *html, gboolean reset_scroll)
/* This is a hack until there's a clean way to do this. */
GTK_HTML (md->html)->engine->newPage = FALSE;
}
-
+
gtk_html_stream_write (html_stream, HTML_HEADER, sizeof (HTML_HEADER) - 1);
if (md->current_message && md->display_style == MAIL_CONFIG_DISPLAY_SOURCE)
@@ -2112,6 +2114,13 @@ mail_display_destroy (GtkObject *object)
mail_display->invisible = NULL;
}
+ if (mail_display->priv && mail_display->priv->display_notify_id) {
+ GConfClient *gconf = gconf_client_get_default ();
+ gconf_client_notify_remove (gconf, mail_display->priv->display_notify_id);
+ mail_display->priv->display_notify_id = 0;
+ g_object_unref (gconf);
+ }
+
g_free (mail_display->priv);
mail_display->priv = NULL;
@@ -2639,6 +2648,17 @@ html_on_url (GtkHTML *html, const char *url, MailDisplay *mail_display)
}
}
+/* If if a gconf setting for the mail display has changed redisplay to pick up the changes */
+static void
+display_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data)
+{
+ MailDisplay *md = data;
+
+ /* this should really check which setting has changed but it is late */
+ gtk_html_set_animate (md->html, gconf_client_get_bool (gconf, "/apps/evolution/mail/display/animate_images", NULL));
+ mail_display_queue_redisplay ((MailDisplay *)data);
+}
+
GtkWidget *
mail_display_new (void)
{
@@ -2646,7 +2666,8 @@ mail_display_new (void)
GtkWidget *scroll, *html;
GdkAtom clipboard_atom;
HTMLTokenizer *tok;
-
+ GConfClient *gconf;
+
gtk_box_set_homogeneous (GTK_BOX (mail_display), FALSE);
gtk_widget_show (GTK_WIDGET (mail_display));
@@ -2679,6 +2700,14 @@ mail_display_new (void)
gtk_selection_add_target (mail_display->invisible,
clipboard_atom, GDK_SELECTION_TYPE_STRING, 1);
+ gconf = gconf_client_get_default ();
+ gtk_html_set_animate (GTK_HTML (html), gconf_client_get_bool (gconf, "/apps/evolution/mail/display/animate_images", NULL));
+
+ gconf_client_add_dir (gconf, "/apps/evolution/mail/display",GCONF_CLIENT_PRELOAD_NONE, NULL);
+ mail_display->priv->display_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display",
+ display_notify, mail_display, NULL, NULL);
+ g_object_unref (gconf);
+
mail_display->scroll = GTK_SCROLLED_WINDOW (scroll);
mail_display->html = GTK_HTML (html);
g_object_ref (mail_display->html);
diff --git a/mail/mail-preferences.c b/mail/mail-preferences.c
index dad50e251a..f2b6685a7f 100644
--- a/mail/mail-preferences.c
+++ b/mail/mail-preferences.c
@@ -90,7 +90,6 @@ mail_preferences_finalise (GObject *obj)
MailPreferences *prefs = (MailPreferences *) obj;
g_object_unref (prefs->gui);
- g_object_unref (prefs->pman);
g_object_unref (prefs->gconf);
((GObjectClass *)(parent_class))->finalize (obj);
@@ -311,6 +310,7 @@ mail_preferences_construct (MailPreferences *prefs)
/* HTML Mail tab */
/* Loading Images */
+
val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
prefs->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesNever"));
gtk_toggle_button_set_active (prefs->images_never, val == MAIL_CONFIG_HTTP_NEVER);
@@ -324,6 +324,11 @@ mail_preferences_construct (MailPreferences *prefs)
gtk_toggle_button_set_active (prefs->images_always, val == MAIL_CONFIG_HTTP_ALWAYS);
g_signal_connect (prefs->images_always, "toggled", G_CALLBACK (settings_changed), prefs);
+ prefs->show_animated = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowAnimatedImages"));
+ bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images", NULL);
+ gtk_toggle_button_set_active (prefs->show_animated, bool);
+ g_signal_connect (prefs->show_animated, "toggled", G_CALLBACK (settings_changed), prefs);
+
prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML"));
bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html", NULL);
gtk_toggle_button_set_active (prefs->prompt_unwanted_html, bool);
@@ -436,20 +441,19 @@ mail_preferences_apply (MailPreferences *prefs)
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", val, NULL);
-#warning "gtkhtml propmanager"
-#if 0
- gtk_html_propmanager_apply (prefs->pman);
-#endif
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable",
gnome_font_picker_get_font_name (prefs->font_variable), NULL);
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace",
gnome_font_picker_get_font_name (prefs->font_fixed), NULL);
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/fonts/use_custom",
!gtk_toggle_button_get_active (prefs->font_share), NULL);
+ gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images",
+ gtk_toggle_button_get_active (prefs->show_animated), NULL);
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html",
gtk_toggle_button_get_active (prefs->prompt_unwanted_html), NULL);
+
/* Labels and Colours */
list = NULL;
for (i = 4; i >= 0; i--) {
diff --git a/mail/mail-preferences.h b/mail/mail-preferences.h
index 210f1e3e15..bca18a316b 100644
--- a/mail/mail-preferences.h
+++ b/mail/mail-preferences.h
@@ -36,9 +36,6 @@ extern "C" {
#include <libgnomeui/gnome-color-picker.h>
#include <libgnomeui/gnome-font-picker.h>
-#warning "gtkhtml-propmanger"
-/*#include <gtkhtml/gtkhtml-propmanager.h>*/
-
#include "evolution-config-control.h"
#include <shell/Evolution.h>
@@ -95,9 +92,6 @@ struct _MailPreferences {
GtkToggleButton *autodetect_links;
GtkToggleButton *prompt_unwanted_html;
- /* GtkHTML Properties */
- struct _GtkHTMLPropmanager *pman;
-
/* Labels and Colours tab */
struct {
GtkEntry *name;