f-spot r4035 - in trunk: . src src/Widgets



Author: sdelcroix
Date: Wed Jun  4 12:12:05 2008
New Revision: 4035
URL: http://svn.gnome.org/viewvc/f-spot?rev=4035&view=rev

Log:
allowing compilation on mono 1.2.4 for gutsy users

Modified:
   trunk/configure.in
   trunk/src/ControlOverlay.cs
   trunk/src/Loupe.cs
   trunk/src/Widgets/Dissolve.cs
   trunk/src/Widgets/PreviewPopup.cs

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Jun  4 12:12:05 2008
@@ -59,7 +59,7 @@
 LIBEXIF_REQUIRED_MIN=0.5.7
 LIBEXIF_REQUIRED_MAX=0.7.0
 GTKSHARP_REQUIRED=2.8
-MONO_REQUIRED=1.2.5
+MONO_REQUIRED=1.2.4
 GTK_REQUIRED=2.6
 BEAGLE_REQUIRED=0.3.0
 NDESK_DBUS_REQUIRED=0.4.2
@@ -120,6 +120,9 @@
 if pkg-config --atleast-version=2.12.2 gtk-sharp-2.0; then
    CSC_DEFINES="$CSC_DEFINES -d:GTK_2_12_2"
 fi
+if pkg-config --atleast-version=1.2.5 mono; then
+   CSC_DEFINES="$CSC_DEFINES -d:MONO_1_2_5"
+fi
 if pkg-config --atleast-version=2.0 mono; then
    CSC_DEFINES="$CSC_DEFINES -d:MONO_2_0"
 fi

Modified: trunk/src/ControlOverlay.cs
==============================================================================
--- trunk/src/ControlOverlay.cs	(original)
+++ trunk/src/ControlOverlay.cs	Wed Jun  4 12:12:05 2008
@@ -135,13 +135,21 @@
 		protected virtual void ShapeSurface (Context cr, Cairo.Color color)
 		{
 			cr.Operator = Operator.Source;
+#if MONO_1_2_5
 			Cairo.Pattern p = new Cairo.SolidPattern (new Cairo.Color (0, 0, 0, 0));
+#else
+			Cairo.Pattern p = new Cairo.SolidPattern (new Cairo.Color (0, 0, 0, 0), true);
+#endif
 			cr.Source = p;
 			p.Destroy ();
 			cr.Paint ();
 			cr.Operator = Operator.Over;
 
+#if MONO_1_2_5
 			Cairo.Pattern r = new SolidPattern (color);
+#else
+			Cairo.Pattern r = new SolidPattern (color, true);
+#endif
 			cr.Source = r;
 			r.Destroy ();
 			cr.MoveTo (round, 0);

Modified: trunk/src/Loupe.cs
==============================================================================
--- trunk/src/Loupe.cs	(original)
+++ trunk/src/Loupe.cs	Wed Jun  4 12:12:05 2008
@@ -359,7 +359,11 @@
 			int cy = Center.Y;
 		
 			g.Operator = Operator.Source;
+#if MONO_1_2_5
 			g.Source = new SolidPattern (new Cairo.Color (0,0,0,0));
+#else
+			g.Source = new SolidPattern (new Cairo.Color (0,0,0,0), true);
+#endif
 			g.Rectangle (0, 0, width, height);
 			g.Paint ();
 
@@ -367,14 +371,22 @@
 			g.Translate (cx, cy);
 			g.Rotate (angle);
 
+#if MONO_1_2_5
 			g.Source = new SolidPattern (new Cairo.Color (0.2, 0.2, 0.2, .6));
+#else
+			g.Source = new SolidPattern (new Cairo.Color (0.2, 0.2, 0.2, .6), true);
+#endif
 			g.Operator = Operator.Over;
 			g.Rectangle (0, - (border + inner), inner_x, 2 * (border + inner));
 			g.Arc (inner_x, 0, inner + border, 0, 2 * Math.PI);
 			g.Arc (0, 0, radius + border, 0, 2 * Math.PI);
 			g.Fill ();
 
+#if MONO_1_2_5
 			g.Source = new SolidPattern (new Cairo.Color (0, 0, 0, 1.0));
+#else
+			g.Source = new SolidPattern (new Cairo.Color (0, 0, 0, 1.0), true);
+#endif
 			g.Operator = Operator.DestOut;
 			g.Arc (inner_x, 0, inner, 0, 2 * Math.PI);
 #if true			
@@ -414,7 +426,11 @@
 				g.Arc (0, 0, radius, angle, angle + Math.PI);
 				g.ClosePath ();
 				g.FillPreserve ();
+#if MONO_1_2_5
 				g.Source = new SolidPattern (new Cairo.Color (1.0, 1.0, 1.0, 1.0));
+#else
+				g.Source = new SolidPattern (new Cairo.Color (1.0, 1.0, 1.0, 1.0), true);
+#endif
 				g.Stroke ();
 			}
 		}

Modified: trunk/src/Widgets/Dissolve.cs
==============================================================================
--- trunk/src/Widgets/Dissolve.cs	(original)
+++ trunk/src/Widgets/Dissolve.cs	Wed Jun  4 12:12:05 2008
@@ -73,7 +73,11 @@
 			ctx.Operator = Operator.Over;
 			ctx.Matrix = end_buffer.Fill (allocation);
 			SurfacePattern sur = new SurfacePattern (end_buffer.Surface);
+#if MONO_1_2_5
 			Pattern black = new SolidPattern (new Cairo.Color (0.0, 0.0, 0.0, opacity));
+#else
+			Pattern black = new SolidPattern (new Cairo.Color (0.0, 0.0, 0.0, opacity), true);
+#endif
 			//ctx.Source = black;
 			//ctx.Fill ();
 			sur.Filter = Filter.Fast;

Modified: trunk/src/Widgets/PreviewPopup.cs
==============================================================================
--- trunk/src/Widgets/PreviewPopup.cs	(original)
+++ trunk/src/Widgets/PreviewPopup.cs	Wed Jun  4 12:12:05 2008
@@ -83,11 +83,19 @@
 			int round = 12;
 			Context g = CairoUtils.CreateContext (GdkWindow);
 			g.Operator = Operator.Source;
+#if MONO_1_2_5
 			g.Source = new SolidPattern (new Cairo.Color (0, 0, 0, 0));
+#else
+			g.Source = new SolidPattern (new Cairo.Color (0, 0, 0, 0), true);
+#endif
 			g.Paint ();
 			g.Operator = Operator.Over;
 #if true
+#if MONO_1_2_5
 			g.Source = new SolidPattern (new Cairo.Color (0, 0, 0, .7));
+#else
+			g.Source = new SolidPattern (new Cairo.Color (0, 0, 0, .7), true);
+#endif
 			g.MoveTo (round, 0);
 			//g.LineTo (Allocation.Width - round, 0);
 			g.Arc (Allocation.Width - round, round, round, - Math.PI * 0.5, 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]