aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorLarry Ewing <lewing@src.gnome.org>2003-05-21 02:26:09 +0800
committerLarry Ewing <lewing@src.gnome.org>2003-05-21 02:26:09 +0800
commit81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2 (patch)
treea27f3bfff51e4ce728eaefea3ffe78bc7e998b24 /composer
parent96caa0f57239cec24696a73e3f704b9429e4f648 (diff)
downloadgsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.tar
gsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.tar.gz
gsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.tar.bz2
gsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.tar.lz
gsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.tar.xz
gsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.tar.zst
gsoc2013-evolution-81237cc33be1e7f4dc3016c2cb4b37c3a594a1d2.zip
i2003-05-20 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (composer_settings_update): set the various bonobo properties that are composer preferences. (create_composer): add notification of gconf changes. (destroy): disconnect notification. * e-msg-composer.h: keep the gcond notify handler id. svn path=/trunk/; revision=21287
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog9
-rw-r--r--composer/e-msg-composer.c39
-rw-r--r--composer/e-msg-composer.h2
3 files changed, 49 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index aea54e5c94..58f0eebec1 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-20 Larry Ewing <lewing@ximian.com>
+
+ * e-msg-composer.c (composer_settings_update): set the various
+ bonobo properties that are composer preferences.
+ (create_composer): add notification of gconf changes.
+ (destroy): disconnect notification.
+
+ * e-msg-composer.h: keep the gcond notify handler id.
+
2003-05-15 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 9f1709db49..76f09fd6f8 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2441,7 +2441,6 @@ destroy (GtkObject *object)
/* FIXME? I assume the Bonobo widget will get destroyed
normally? */
-
if (composer->address_dialog != NULL) {
gtk_widget_destroy (composer->address_dialog);
composer->address_dialog = NULL;
@@ -2451,6 +2450,13 @@ destroy (GtkObject *object)
composer->hdrs = NULL;
}
+ if (composer->notify_id) {
+ GConfClient *gconf = gconf_client_get_default ();
+ gconf_client_notify_remove (gconf, composer->notify_id);
+ composer->notify_id = 0;
+ g_object_unref (gconf);
+ }
+
if (composer->persist_stream_interface != CORBA_OBJECT_NIL) {
Bonobo_Unknown_unref (composer->persist_stream_interface, &ev);
CORBA_Object_release (composer->persist_stream_interface, &ev);
@@ -2859,6 +2865,28 @@ setup_cut_copy_paste (EMsgComposer *composer)
g_signal_connect (entry, "focus-out-event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
}
+static void
+composer_settings_update (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data)
+{
+ gboolean bool;
+ EMsgComposer *composer = data;
+
+ bool = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/magic_smileys", NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
+ "MagicSmileys", TC_CORBA_boolean, bool,
+ NULL);
+
+ bool = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/magic_links", NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
+ "MagicLinks", TC_CORBA_boolean, bool,
+ NULL);
+
+ bool = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/inline_spelling", NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
+ "InlineSpelling", TC_CORBA_boolean, bool,
+ NULL);
+}
+
static EMsgComposer *
create_composer (int visible_mask)
{
@@ -2866,6 +2894,7 @@ create_composer (int visible_mask)
GtkWidget *vbox;
Bonobo_Unknown editor_server;
CORBA_Environment ev;
+ GConfClient *gconf;
int vis;
composer = g_object_new (E_TYPE_MSG_COMPOSER, "win_name", _("Compose a message"), NULL);
@@ -2941,6 +2970,14 @@ create_composer (int visible_mask)
"FormatHTML", TC_CORBA_boolean, composer->send_html,
NULL);
+
+ gconf = gconf_client_get_default ();
+ composer_settings_update (gconf, 0, NULL, composer);
+ gconf_client_add_dir (gconf, "/apps/evolution/mail/composer", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+ composer->notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/composer",
+ composer_settings_update, composer, NULL, NULL);
+ g_object_unref (gconf);
+
editor_server = bonobo_widget_get_objref (BONOBO_WIDGET (composer->editor));
/* FIXME: handle exceptions */
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 4f9a8c6652..5c1e12bbbb 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -104,6 +104,8 @@ struct _EMsgComposer {
GtkWidget *sig_omenu;
CamelMimeMessage *redirect;
+
+ guint notify_id;
};
struct _EMsgComposerClass {