diff options
author | Radek Doulik <rodo@ximian.com> | 2004-01-24 01:21:50 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2004-01-24 01:21:50 +0800 |
commit | c6ba8e9f2d7c34b91e965343c9356d7e2a80e1a7 (patch) | |
tree | 2758ec5aa34baad0ef195e298dabe3d5414ccb18 /mail/mail-session.c | |
parent | 11d2ccf165bbe36403fa59e71725a12ec8614d61 (diff) | |
download | gsoc2013-evolution-c6ba8e9f2d7c34b91e965343c9356d7e2a80e1a7.tar.gz gsoc2013-evolution-c6ba8e9f2d7c34b91e965343c9356d7e2a80e1a7.tar.zst gsoc2013-evolution-c6ba8e9f2d7c34b91e965343c9356d7e2a80e1a7.zip |
use mail_session_get_sa_daemon_port
2004-01-23 Radek Doulik <rodo@ximian.com>
* em-junk-filter.c: use mail_session_get_sa_daemon_port
* em-mailer-prefs.c (em_mailer_prefs_construct): added
check_incoming_imap
(em_mailer_prefs_apply): ditto
(settings_changed): set check_incoming_imap sensitivity by
check_incoming state
* mail-session.c: add sa_daemon_port
(mail_session_init): init sa_daemon_port and check_junk_for_imap
(mail_session_check_junk_notify): watch for sa_daemon_port and
check_junk_for_imap
(mail_session_get_sa_daemon_port): new wrapper
(mail_session_set_sa_daemon_port): ditto
svn path=/trunk/; revision=24382
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r-- | mail/mail-session.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c index 101ee56ecc..c51a1f7aaf 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -76,6 +76,7 @@ typedef struct _MailSession { /* spamassassin filter options */ gboolean sa_local_only; gboolean sa_use_daemon; + int sa_daemon_port; } MailSession; typedef struct _MailSessionClass { @@ -785,6 +786,18 @@ mail_session_set_sa_use_daemon (gboolean value) MAIL_SESSION (session)->sa_use_daemon = value; } +int +mail_session_get_sa_daemon_port () +{ + return MAIL_SESSION (session)->sa_daemon_port; +} + +void +mail_session_set_sa_daemon_port (int value) +{ + MAIL_SESSION (session)->sa_daemon_port = value; +} + static void mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry, CamelSession *session) { @@ -798,10 +811,15 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry, key ++; if (!strcmp (key, "check_incoming")) camel_session_set_check_junk (session, gconf_value_get_bool (gconf_entry_get_value (entry))); + else if (!strcmp (key, "check_incoming_imap")) + camel_session_set_check_junk_for_imap (session, gconf_value_get_bool (gconf_entry_get_value (entry))); else if (!strcmp (key, "local_only")) mail_session_set_sa_local_only (gconf_value_get_bool (gconf_entry_get_value (entry))); else if (!strcmp (key, "use_daemon")) mail_session_set_sa_use_daemon (gconf_value_get_bool (gconf_entry_get_value (entry))); + else if (!strcmp (key, "daemon_port")) + mail_session_set_sa_daemon_port (gconf_value_get_int (gconf_entry_get_value (entry))); + } } @@ -822,6 +840,8 @@ mail_session_init (const char *base_directory) gconf = mail_config_get_gconf_client (); gconf_client_add_dir (gconf, "/apps/evolution/mail/junk", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); camel_session_set_check_junk (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming", NULL)); + camel_session_set_check_junk_for_imap (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming_imap", NULL)); + mail_session_set_sa_daemon_port (gconf_client_get_int (gconf, "/apps/evolution/mail/junk/sa/daemon_port", NULL)); session_check_junk_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/junk", (GConfClientNotifyFunc) mail_session_check_junk_notify, session, NULL, NULL); |