rpms/dates/devel dates-ftbfs.patch,NONE,1.1 dates.spec,1.25,1.26

Peter Robinson pbrobinson at fedoraproject.org
Mon Jul 26 12:32:40 UTC 2010


Author: pbrobinson

Update of /cvs/pkgs/rpms/dates/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26920

Modified Files:
	dates.spec 
Added Files:
	dates-ftbfs.patch 
Log Message:
- add patch to fix build against current evo, thanks Caolan for patch

dates-ftbfs.patch:
 dates_gtk.c  |   51 +++++++++++----------------------------------------
 dates_main.c |    2 +-
 dates_view.c |   14 ++++++++------
 3 files changed, 20 insertions(+), 47 deletions(-)

--- NEW FILE dates-ftbfs.patch ---
diff -ru dates-0.4.11.orig/src/dates_gtk.c dates-0.4.11/src/dates_gtk.c
--- dates-0.4.11.orig/src/dates_gtk.c	2010-07-26 09:41:35.000000000 +0100
+++ dates-0.4.11/src/dates_gtk.c	2010-07-26 09:54:20.000000000 +0100
@@ -1016,7 +1016,7 @@
 			GtkTreeIter iter;
 			GError *error = NULL;
 			const gchar *relative_uri;
-			guint32 new_colour;
+			gchar * scolor;
 
 #ifdef WITH_HILDON
 			GdkColor *hildon_color;
@@ -1054,25 +1054,16 @@
 			/* Create a new source to use */
 			source = e_source_new (name, relative_uri);
 
-#ifdef USE_OWL
-			new_colour = owl_colour_button_get_colour (OWL_COLOUR_BUTTON (color_button));
-#else
-
 #ifdef WITH_HILDON
 			hildon_color_button_get_color (HILDON_COLOR_BUTTON(color_button), &colour);
 #else
 			gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &colour);
 #endif
-			new_colour = (guint8)(colour.red >> 8);
-			new_colour <<= 8;
-			new_colour |= (guint8)(colour.green >> 8);
-			new_colour <<= 8;
-			new_colour |= (guint8)(colour.blue >> 8);
-			new_colour <<= 8;
-#endif
 
 			/* Set the colour */
-			e_source_set_color (source, new_colour);
+			scolor = gdk_color_to_string (&colour);
+			e_source_set_color_spec(source, scolor);
+			g_free (scolor);
 
 			/* Set the group for the source */
 			e_source_set_group (source, group);
@@ -1169,7 +1160,7 @@
 	ESourceGroup *group;
 
 	GdkColor colour;
-	guint32 raw_colour;
+	const gchar *scolor;
 
 	const gchar *name = NULL;
 	const gchar *uri = NULL;
@@ -1335,27 +1326,19 @@
 	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 
 	/* Get the colour from the the source */
-	e_source_get_color (source, &raw_colour);
+	scolor = e_source_peek_color_spec (source);
 
 	/* Munge this into something usable */
-	colour.red = (guint16)(((raw_colour & 0xff0000) >> 16) << 8);
-	colour.green = (guint16)(((raw_colour & 0xff00) >> 8) << 8);
-	colour.blue = (guint16)(((raw_colour & 0xff) << 8));
+	gdk_color_parse(scolor, &colour);
 
 	/* Now we need to allocate the colour */
 	gdk_colormap_alloc_color (gdk_colormap_get_system (), &colour, TRUE, TRUE);
 
-#ifdef USE_OWL
-	color_button = owl_colour_button_new ();
-	owl_colour_button_set_colour (OWL_COLOUR_BUTTON (color_button), raw_colour << 8);
-#else
-
 #ifdef WITH_HILDON
 	color_button = hildon_color_button_new_with_color (&colour);
 #else
 	color_button = gtk_color_button_new_with_color (&colour);
 #endif
-#endif
 
 	/* Add the label to the hbox */
 	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
@@ -1436,30 +1419,18 @@
 	{
 		case GTK_RESPONSE_OK:
 		{
-			/* 
-			 * Next we need to pack the GDK colour into guint32
-			 * for eds
-			 */
-			guint32 new_colour = 0;
+			gchar * scolor;
 
 			GError *error = NULL;
-#ifdef USE_OWL
-			new_colour = owl_colour_button_get_colour (OWL_COLOUR_BUTTON (color_button));
-#else
 #ifdef WITH_HILDON
 			hildon_color_button_get_color (HILDON_COLOR_BUTTON(color_button), &colour);
 #else
 			gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &colour);
-#endif			
-			new_colour = (guint8)(colour.red >> 8);
-			new_colour <<= 8;
-			new_colour |= (guint8)(colour.green >> 8);
-			new_colour <<= 8;
-			new_colour |= (guint8)(colour.blue >> 8);
-			new_colour <<= 8;
 #endif
 			/* Update the colour */
-			e_source_set_color (source, new_colour);
+			scolor = gdk_color_to_string (&colour);
+			e_source_set_color_spec(source, scolor);
+			g_free (scolor);
 
 			/* And the name */
 			e_source_set_name (source, (gtk_entry_get_text (GTK_ENTRY (name_entry))));
diff -ru dates-0.4.11.orig/src/dates_main.c dates-0.4.11/src/dates_main.c
--- dates-0.4.11.orig/src/dates_main.c	2010-07-26 09:41:35.000000000 +0100
+++ dates-0.4.11/src/dates_main.c	2010-07-26 09:43:31.000000000 +0100
@@ -112,7 +112,7 @@
 		system_source = e_source_new (_("Personal"), "system");
 
 		/* Default Evolution colour */
-		e_source_set_color (system_source, 0xBECEDD);
+		e_source_set_color_spec(system_source, "0xBECEDD");
 
 		/* Set the group for the source and put it in the group */
 		e_source_set_group (system_source, local_group);
diff -ru dates-0.4.11.orig/src/dates_view.c dates-0.4.11/src/dates_view.c
--- dates-0.4.11.orig/src/dates_view.c	2010-07-26 09:41:35.000000000 +0100
+++ dates-0.4.11/src/dates_view.c	2010-07-26 09:57:08.000000000 +0100
@@ -4846,7 +4846,8 @@
 	DatesViewPrivate *priv = DATES_VIEW_GET_PRIVATE (view);
 	DatesViewCalendar *cal;
 	ESource *source;
-	guint32 colour;
+	const gchar *scolor;
+	GdkColor gcolour;
 /*	GError *error = NULL;*/
 	
 	g_return_if_fail (E_IS_CAL (ecal));
@@ -4876,11 +4877,12 @@
 	cal->text_gc = gdk_gc_new (
 		GDK_DRAWABLE (priv->main->window));
 
-	if (e_source_get_color (source, &colour)) {
-		GdkColor gcolour, dgcolour, tgcolour;
-		gcolour.red = ((colour & 0xFF0000) >> 16) * 0x101;
-		gcolour.green = ((colour & 0xFF00) >> 8)  * 0x101;
-		gcolour.blue = (colour & 0xFF) * 0x101;
+	scolor = e_source_peek_color_spec (source);
+	if (scolor && gdk_color_parse(scolor, &gcolour)) {
+		GdkColor dgcolour, tgcolour;
+		gcolour.red *= 0x101;
+		gcolour.green *= 0x101;
+		gcolour.blue *= 0x101;
 
 		/* This is simplified sRGB -> LAB conversion; we do not need it
 		 * entirely precise, as we are only going to chose between


Index: dates.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dates/devel/dates.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- dates.spec	20 Jul 2010 19:12:01 -0000	1.25
+++ dates.spec	26 Jul 2010 12:32:40 -0000	1.26
@@ -1,6 +1,6 @@
 Name:			dates
 Version:		0.4.11
-Release:		5%{?dist}
+Release:		6%{?dist}
 Summary:		Small, lightweight calendar
 
 Group:			Applications/Productivity
@@ -8,6 +8,7 @@ License:		GPLv2+
 URL:			http://pimlico-project.org/dates.html
 Source0:		ftp://ftp.gnome.org/pub/gnome/sources/%{name}/0.4/%{name}-%{version}.tar.bz2
 Patch0:                 dates-fixdso.patch
+Patch1:                 dates-ftbfs.patch
 BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  	gtk2-devel
@@ -23,6 +24,7 @@ user interface and tailored support for 
 %prep
 %setup -q
 %patch0 -p1 -b .fixdso
+%patch1 -p1 -b .ftbfs
 
 %build
 %configure --disable-debug
@@ -64,6 +66,9 @@ gtk-update-icon-cache %{_datadir}/icons/
 %{_bindir}/%{name}
 
 %changelog
+* Mon Jul 26 2010 Peter Robinson <pbrobinson at gmail.com> 0.4.11-6
+- add patch to fix build against current evo, thanks Caolan for patch
+
 * Tue Jul 20 2010 Peter Robinson <pbrobinson at gmail.com> 0.4.11-5
 - rebuild against new evolution-data-server
 



More information about the scm-commits mailing list