evolution r35411 - branches/gnome-2-22/mail
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35411 - branches/gnome-2-22/mail
- Date: Wed, 23 Apr 2008 10:50:46 +0100 (BST)
Author: mcrha
Date: Wed Apr 23 09:50:46 2008
New Revision: 35411
URL: http://svn.gnome.org/viewvc/evolution?rev=35411&view=rev
Log:
2008-04-23 Milan Crha <mcrha redhat com>
** Fix for bug #529375
* em-utils.h: (em_utils_in_addressbook):
* em-utils.c: (em_utils_in_addressbook):
* em-format-html.c: (emfh_gethttp):
* mail-session.c: (lookup_addressbook): Look up in local address book
for addresses to exclude mail sent by known contacts from junk
filtering if said so in /apps/evolution/mail/display/photo_local.
* em-format-html-display.c: (efhd_update_bar):
* em-popup.c: (emp_standard_menu_factory): Compiler warnings fix.
Modified:
branches/gnome-2-22/mail/ChangeLog
branches/gnome-2-22/mail/em-format-html-display.c
branches/gnome-2-22/mail/em-format-html.c
branches/gnome-2-22/mail/em-popup.c
branches/gnome-2-22/mail/em-utils.c
branches/gnome-2-22/mail/em-utils.h
branches/gnome-2-22/mail/mail-session.c
Modified: branches/gnome-2-22/mail/em-format-html-display.c
==============================================================================
--- branches/gnome-2-22/mail/em-format-html-display.c (original)
+++ branches/gnome-2-22/mail/em-format-html-display.c Wed Apr 23 09:50:46 2008
@@ -2361,10 +2361,11 @@
EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh;
struct _EMFormatHTMLDisplayPrivate *priv = efhd->priv;
- e_attachment_bar_refresh (priv->attachment_bar);
+ e_attachment_bar_refresh (E_ATTACHMENT_BAR (priv->attachment_bar));
return TRUE;
}
+
static gboolean
efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
{
Modified: branches/gnome-2-22/mail/em-format-html.c
==============================================================================
--- branches/gnome-2-22/mail/em-format-html.c (original)
+++ branches/gnome-2-22/mail/em-format-html.c Wed Apr 23 09:50:46 2008
@@ -480,7 +480,7 @@
if (!(job->format->load_http_now
|| job->format->load_http == MAIL_CONFIG_HTTP_ALWAYS
|| (job->format->load_http == MAIL_CONFIG_HTTP_SOMETIMES
- && em_utils_in_addressbook((CamelInternetAddress *)camel_mime_message_get_from(job->format->format.message))))) {
+ && em_utils_in_addressbook((CamelInternetAddress *)camel_mime_message_get_from(job->format->format.message), FALSE)))) {
/* TODO: Ideally we would put the http requests into another queue and only send them out
if the user selects 'load images', when they do. The problem is how to maintain this
state with multiple renderings, and how to adjust the thread dispatch/setup routine to handle it */
Modified: branches/gnome-2-22/mail/em-popup.c
==============================================================================
--- branches/gnome-2-22/mail/em-popup.c (original)
+++ branches/gnome-2-22/mail/em-popup.c Wed Apr 23 09:50:46 2008
@@ -756,7 +756,7 @@
gchar *cp;
/* GNOME-VFS expects lowercase MIME types. */
- for (cp = mime_type; *cp != NULL; cp++)
+ for (cp = mime_type; *cp != 0; cp++)
*cp = g_ascii_tolower (*cp);
apps = gnome_vfs_mime_get_all_applications(mime_type);
Modified: branches/gnome-2-22/mail/em-utils.c
==============================================================================
--- branches/gnome-2-22/mail/em-utils.c (original)
+++ branches/gnome-2-22/mail/em-utils.c Wed Apr 23 09:50:46 2008
@@ -1930,7 +1930,7 @@
}
gboolean
-em_utils_in_addressbook(CamelInternetAddress *iaddr)
+em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
{
GError *err = NULL;
GSList *s, *g, *addr_sources = NULL;
@@ -1981,6 +1981,9 @@
/* FIXME: this aint threadsafe by any measure, but what can you do eh??? */
for (g = e_source_list_peek_groups(emu_addr_list);g;g=g_slist_next(g)) {
+ if (local_only && e_source_group_peek_base_uri ((ESourceGroup *)g->data) && !g_str_has_prefix (e_source_group_peek_base_uri ((ESourceGroup *)g->data), "file://"))
+ continue;
+
for (s = e_source_group_peek_sources((ESourceGroup *)g->data);s;s=g_slist_next(s)) {
ESource *src = s->data;
const char *completion = e_source_get_property (src, "completion");
Modified: branches/gnome-2-22/mail/em-utils.h
==============================================================================
--- branches/gnome-2-22/mail/em-utils.h (original)
+++ branches/gnome-2-22/mail/em-utils.h Wed Apr 23 09:50:46 2008
@@ -107,7 +107,7 @@
void em_utils_show_info_silent (struct _GtkWidget *widget);
/* is this address in the addressbook? caches results */
-gboolean em_utils_in_addressbook(struct _CamelInternetAddress *addr);
+gboolean em_utils_in_addressbook (struct _CamelInternetAddress *addr, gboolean local_only);
struct _CamelMimePart *em_utils_contact_photo (struct _CamelInternetAddress *addr, gboolean local);
const char *em_utils_snoop_type(struct _CamelMimePart *part);
Modified: branches/gnome-2-22/mail/mail-session.c
==============================================================================
--- branches/gnome-2-22/mail/mail-session.c (original)
+++ branches/gnome-2-22/mail/mail-session.c Wed Apr 23 09:50:46 2008
@@ -390,13 +390,15 @@
{
CamelInternetAddress *addr;
gboolean ret;
+ GConfClient *gconf;
if (!mail_config_get_lookup_book ())
return FALSE;
+ gconf = mail_config_get_gconf_client ();
addr = camel_internet_address_new ();
camel_address_decode ((CamelAddress *)addr, name);
- ret = em_utils_in_addressbook(addr);
+ ret = em_utils_in_addressbook (addr, gconf_client_get_bool (gconf, "/apps/evolution/mail/display/photo_local", NULL));
camel_object_unref (addr);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]