CR#6878806 Evolution : Search Folders report randomly wrong unread values opensolaris-2009-06 OSOL0906_SRU5_03
authoran230044
Fri, 18 Sep 2009 09:06:53 +0000
branchopensolaris-2009-06
changeset 14339 5403b989da88
parent 14338 2cce66a0f3c7
child 14340 f57088bd958e
CR#6878806 Evolution : Search Folders report randomly wrong unread values
ChangeLog
base-specs/evolution-data-server.spec
base-specs/evolution.spec
patches/evolution-13-account-change.diff
patches/evolution-15-calendar-item.diff
patches/evolution-data-server-01-libexec.diff
--- a/ChangeLog	Fri Sep 04 08:57:22 2009 +0000
+++ b/ChangeLog	Fri Sep 18 09:06:53 2009 +0000
@@ -1,3 +1,12 @@
+2009-09-18  Abhijit Nath <[email protected]>
+
+        * base-specs/evolution-data-server.spec : bump evolution-data-server to 2.24.5 
+        * base-specs/evolution.spec : bump evolution-data-server to 2.24.5  
+	* patches/evolution-15-calendar-item.diff:added  
+	* patches/evolution-13-account-change.diff:removed
+	* patches/evolution-data-server-01-libexec.diff:modified
+	* To fix CR#6878806 Evolution : Search Folders report randomly wrong unread values
+
 2009-09-04  Abhijit Nath <[email protected]>
 
         * base-specs/libpng12.spec: bump libpng tarball libpng-1.2.38 
--- a/base-specs/evolution-data-server.spec	Fri Sep 04 08:57:22 2009 +0000
+++ b/base-specs/evolution-data-server.spec	Fri Sep 18 09:06:53 2009 +0000
@@ -9,7 +9,7 @@
 Name:         evolution-data-server
 License:      GPL
 Group:        System/Libraries/GNOME
-Version:      2.24.2
+Version:      2.24.5
 Release:      2
 Distribution: Java Desktop System
 Vendor:       Sun Microsystems, Inc.
@@ -188,6 +188,8 @@
 %{_datadir}/idl/*
 
 %changelog
+* Fri Sep 18 2009 - [email protected]
+- Bump to 2.24.5 to fix CR#6878806
 * Tue Jul 21 2009 - [email protected]
 - Add -03-remember-calendar-color to fix 6861855
 * Fri Nov 28 2008 - [email protected]
--- a/base-specs/evolution.spec	Fri Sep 04 08:57:22 2009 +0000
+++ b/base-specs/evolution.spec	Fri Sep 18 09:06:53 2009 +0000
@@ -13,7 +13,7 @@
 Group:        System/GUI/GNOME
 # major_version is generally a 'stable' build number i.e. has an even number.
 %define major_version 2.24
-Version:      2.24.2
+Version:      2.24.5
 Release:      1
 Distribution: java-desktop-system
 Vendor:       Sun Microsystems, Inc.
@@ -50,10 +50,10 @@
 Patch11:       evolution-11-iconv.diff
 # date:2008-09-25 bugzilla:553535 owner:jefftsai type:bug
 Patch12:       evolution-12-reply-signature.diff
-# date:2009-01-05 bugzilla:552583 bugster:6789377 owner:jefftsai type:bug
-Patch13:       evolution-13-account-change.diff
 # date:2009-06-18 bugster:6851160 owner:hemantha type:bug
 Patch14:       evolution-14-disable-attachments-when-wcap.diff
+# date:2009-09-18 bugster:6878806 owner:abhijit nath type:bug
+Patch15:       evolution-15-calendar-item.diff
 URL:          http://www.gnome.org
 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
 Docdir:       %{_defaultdocdir}/evolution
@@ -142,8 +142,8 @@
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
-%patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 %build
 
@@ -269,6 +269,8 @@
 %{_datadir}/gnome-pilot/*
 
 %changelog
+* Fri Sep 18 2009 - [email protected]
+- Bump to 2.24.5 to fix CR#6878806
 * Sat Jul 25 2009 - [email protected]
 - Add patch 15-attachment in trunk with modifications for Evolution 2.24,
   as -14-disable-attachments-when-wcap to fix 6851160
--- a/patches/evolution-13-account-change.diff	Fri Sep 04 08:57:22 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
---- evolution-2.24.2/mail/mail-config.c	Tue Dec 30 15:11:09 2008
-+++ evolution-2.24.2/mail/mail-config.c.new	Tue Dec 30 15:18:23 2008
-@@ -778,53 +778,67 @@
- 	return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid);
- }
- 
-+static gboolean
-+mail_config_account_url_equal (const CamelURL *u1,
-+                               const CamelURL *u2)
-+{
-+	/* For the purpose of matching a URL to an EAccount, only compare
-+	 * the protocol, user, host and port and disregard the rest. */
-+
-+	if (g_strcmp0 (u1->protocol, u2->protocol) != 0)
-+		return FALSE;
-+
-+	if (g_strcmp0 (u1->user, u2->user) != 0)
-+		return FALSE;
-+
-+	if (g_strcmp0 (u1->host, u2->host) != 0)
-+		return FALSE;
-+
-+	return (u1->port == u2->port);
-+}
-+
- EAccount *
- mail_config_get_account_by_source_url (const char *source_url)
- {
- 	EAccount *account = NULL;
- 	EIterator *iter;
-+	CamelURL *url;
- 
- 	g_return_val_if_fail (source_url != NULL, NULL);
- 
-+	url = camel_url_new (source_url, NULL);
-+	g_return_val_if_fail (url != NULL, NULL);
-+
- 	iter = e_list_get_iterator ((EList *) config->accounts);
--	while (e_iterator_is_valid (iter)) {
--		CamelURL *url;
--		gchar *string;
-+	while (account == NULL && e_iterator_is_valid (iter)) {
-+		CamelURL *account_url;
- 
- 		account = (EAccount *) e_iterator_get (iter);
- 
- 		e_iterator_next (iter);
- 
--		if (account->source == NULL)
-+		if ( !account || (account->source == NULL) || 
-+			(account->source->url == NULL) || (*account->source->url == '\0')) {
-+			account = NULL;
- 			continue;
-+		}
- 
--		else if (account->source->url == NULL)
-+		account_url = camel_url_new (account->source->url, NULL);
-+		if (account_url == NULL) {
-+			account = NULL;
- 			continue;
-+		}
- 
--		else if (*account->source->url == '\0')
--			continue;
--
--		url = camel_url_new (account->source->url, NULL);
--		if (url == NULL)
--			continue;
--
--		/* Simplify the account URL for comparison. */
--		string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
--		if (string == NULL || strcmp (string, source_url) != 0)
-+		if (!mail_config_account_url_equal (url, account_url))
- 			account = NULL;  /* not a match */
- 
--		camel_url_free (url);
--		g_free (string);
--
--		if (account != NULL) {
--			g_object_unref (iter);
--			return account;
--		}
-+		camel_url_free (account_url);
- 	}
- 
- 	g_object_unref (iter);
-+	camel_url_free (url);
- 
--	return NULL;
-+	return account;
- }
- 
- EAccount *
-@@ -832,48 +846,43 @@
- {
- 	EAccount *account = NULL;
- 	EIterator *iter;
-+	CamelURL *url;
- 
- 	g_return_val_if_fail (transport_url != NULL, NULL);
- 
-+	url = camel_url_new (transport_url, NULL);
-+	g_return_val_if_fail (url != NULL, NULL);
-+
- 	iter = e_list_get_iterator ((EList *) config->accounts);
--	while (e_iterator_is_valid (iter)) {
--		CamelURL *url;
--		gchar *string;
-+	while (account == NULL && e_iterator_is_valid (iter)) {
-+		CamelURL *account_url;
- 
- 		account = (EAccount *) e_iterator_get (iter);
- 
- 		e_iterator_next (iter);
- 
--		if (account->transport == NULL)
--			continue;
-+		if ( !account || (account->transport == NULL) || 
-+			(account->transport->url == NULL) || (*account->transport->url == '\0')) {
-+				account = NULL;
-+				continue;
-+		}
- 
--		else if (account->transport->url == NULL)
-+		account_url = camel_url_new (account->transport->url, NULL);
-+		if (account_url == NULL) {
-+			account = NULL;
- 			continue;
-+		}
- 
--		else if (*account->transport->url == '\0')
--			continue;
--
--		url = camel_url_new (account->transport->url, NULL);
--		if (url == NULL)
--			continue;
--
--		/* Simplify the account URL for comparison. */
--		string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
--		if (string == NULL || strcmp (string, transport_url) != 0)
-+		if (!mail_config_account_url_equal (url, account_url))
- 			account = NULL;  /* not a match */
- 
--		camel_url_free (url);
--		g_free (string);
--
--		if (account != NULL) {
--			g_object_unref (iter);
--			return account;
--		}
-+		camel_url_free (account_url);
- 	}
- 
- 	g_object_unref (iter);
-+	camel_url_free (url);
- 
--	return NULL;
-+	return account;
- }
- 
- int
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/evolution-15-calendar-item.diff	Fri Sep 18 09:06:53 2009 +0000
@@ -0,0 +1,78 @@
+diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
+index da4c063..07f0bb3 100644
+--- a/widgets/misc/e-calendar-item.c
++++ b/widgets/misc/e-calendar-item.c
+@@ -1364,6 +1364,33 @@ e_calendar_item_draw_month	(ECalendarItem   *calitem,
+ 	cairo_destroy (cr);
+ }
+ 
++static const char *
++get_digit_fomat ()
++{
++
++#ifdef HAVE_GNU_GET_LIBC_VERSION
++#include <gnu/libc-version.h>
++
++	const char *libc_version = gnu_get_libc_version ();
++	char **split = g_strsplit (libc_version, ".", -1);
++	int major = 0;
++	int minor = 0;
++	int revision = 0;
++
++	major = atoi (split [0]);
++	minor = atoi (split [1]);
++
++	if (g_strv_length (split) > 2)
++		revision = atoi (split [2]);
++	g_strfreev (split);
++
++	if (major > 2 || minor > 2 || (minor == 2 && revision > 2)) {
++		return _("%Id");
++	} 
++#endif
++	
++	return "%d";
++}
+ 
+ static void
+ e_calendar_item_draw_day_numbers (ECalendarItem	*calitem,
+@@ -1505,12 +1532,12 @@ e_calendar_item_draw_day_numbers (ECalendarItem	*calitem,
+ 			if (week_num >= 10) {
+ 				digit = week_num / 10;
+ 				text_x -= calitem->week_number_digit_widths[digit];
+-				num_chars += sprintf (&buffer[num_chars], "%Id", digit);
++				num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
+ 			}
+ 
+ 			digit = week_num % 10;
+ 			text_x -= calitem->week_number_digit_widths[digit] + 6;
+-			num_chars += sprintf (&buffer[num_chars], "%Id", digit);
++			num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
+ 
+ 			cairo_save (cr);
+ 			gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_ACTIVE]);
+@@ -1618,12 +1645,12 @@ e_calendar_item_draw_day_numbers (ECalendarItem	*calitem,
+ 				if (day_num >= 10) {
+ 					digit = day_num / 10;
+ 					day_x -= calitem->digit_widths[digit];
+-					num_chars += sprintf (&buffer[num_chars], "%Id", digit);
++					num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
+ 				}
+ 
+ 				digit = day_num % 10;
+ 				day_x -= calitem->digit_widths[digit];
+-				num_chars += sprintf (&buffer[num_chars], "%Id", digit);
++				num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
+ 
+ 				cairo_save (cr);
+ 				if (fg_color) {
+@@ -1958,7 +1985,7 @@ e_calendar_item_recalc_sizes		(ECalendarItem *calitem)
+ 		gchar locale_digit[5];
+ 		int locale_digit_len;
+ 		
+-		locale_digit_len = sprintf (locale_digit, "%Id", digit);
++		locale_digit_len = sprintf (locale_digit, get_digit_fomat (), digit);
+ 
+ 		pango_layout_set_text (layout, locale_digit, locale_digit_len);
+ 		pango_layout_get_pixel_size (layout, &width, NULL);
+
--- a/patches/evolution-data-server-01-libexec.diff	Fri Sep 04 08:57:22 2009 +0000
+++ b/patches/evolution-data-server-01-libexec.diff	Fri Sep 18 09:06:53 2009 +0000
@@ -1,8 +1,13 @@
---- evolution-data-server-2.22.0/src/Makefile.am	2005-12-08 15:54:23.000000000 +0800
-+++ evolution-data-server-2.22.0/src/Makefile.am	2005-12-22 10:23:59.747081000 +0800
-@@ -63,8 +63,8 @@
+--- evolution-data-server-2.24.5/src/Makefile.am	2009-09-07 15:12:00.497949000 +0530
++++ evolution-data-server-2.24.2/src/Makefile.am	2009-09-07 15:06:14.344710000 +0530
+@@ -63,13 +63,9 @@ evolution_data_server_LDADD =           
+         $(E_FACTORY_LIBS)						\
  	$(E_DATA_SERVER_LIBS)
  
+-if OS_WIN32
+-evolution_data_server_LDFLAGS = -mwindows
+-endif
+-
  install-evolution-data-servers:
 -	$(mkinstalldirs) $(DESTDIR)$(libexecdir)
 -	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution-data-server $(DESTDIR)$(libexecdir)/evolution-data-server-$(BASE_VERSION)
@@ -11,8 +16,8 @@
  
  SERVER_IN_FILE=GNOME_Evolution_DataServer.server.in.in
  
---- evolution-data-server-1.4.1.1/src/GNOME_Evolution_DataServer.server.in.in.orig	2006-10-10 13:17:44.021053000 +0800
-+++ evolution-data-server-1.4.1.1/src/GNOME_Evolution_DataServer.server.in.in	2006-10-10 13:17:57.220608000 +0800
+--- evolution-data-server-2.24.5/src/GNOME_Evolution_DataServer.server.in.in	2009-09-07 15:12:00.529379000 +0530
++++ evolution-data-server-2.24.2/src/GNOME_Evolution_DataServer.server.in.in	2009-09-07 15:06:14.396975000 +0530
 @@ -2,7 +2,7 @@
  
  <oaf_server iid="OAFIID:GNOME_Evolution_DataServer_BookFactory:@API_VERSION@"