[f-spot] drop the conditionals for unsupported mono versions
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] drop the conditionals for unsupported mono versions
- Date: Mon, 18 May 2009 08:30:02 -0400 (EDT)
commit 3f2b847e3bb5d2a77c72bf46b67543c233ca500b
Author: Stephane Delcroix <stephane delcroix org>
Date: Mon May 18 14:20:52 2009 +0200
drop the conditionals for unsupported mono versions
---
src/ControlOverlay.cs | 8 --------
src/Core/Photo.cs | 5 -----
src/Loupe.cs | 16 ----------------
src/MainWindow.cs | 16 ----------------
src/PhotoStore.cs | 20 --------------------
src/Utils/UriUtils.cs | 4 ----
src/Widgets/Dissolve.cs | 4 ----
src/Widgets/PreviewPopup.cs | 8 --------
8 files changed, 0 insertions(+), 81 deletions(-)
diff --git a/src/ControlOverlay.cs b/src/ControlOverlay.cs
index 8414a65..b478e5e 100644
--- a/src/ControlOverlay.cs
+++ b/src/ControlOverlay.cs
@@ -135,21 +135,13 @@ namespace FSpot {
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);
diff --git a/src/Core/Photo.cs b/src/Core/Photo.cs
index a0d643e..61a331a 100644
--- a/src/Core/Photo.cs
+++ b/src/Core/Photo.cs
@@ -297,13 +297,8 @@ namespace FSpot
{
string name_without_extension = System.IO.Path.GetFileNameWithoutExtension (Name);
-#if MONO_2_0
return new System.Uri (System.IO.Path.Combine (DirectoryPath, name_without_extension
+ " (" + UriUtils.EscapeString (version_name, false, true, true) + ")" + extension));
-#else
- return new System.Uri (System.IO.Path.Combine (DirectoryPath, name_without_extension
- + " (" + UriUtils.EscapeString (version_name, false, true, true) + ")" + extension), true);
-#endif
}
public bool VersionNameExists (string version_name)
diff --git a/src/Loupe.cs b/src/Loupe.cs
index f391959..763ed96 100644
--- a/src/Loupe.cs
+++ b/src/Loupe.cs
@@ -361,11 +361,7 @@ namespace FSpot {
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 ();
@@ -373,22 +369,14 @@ namespace FSpot {
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
@@ -428,11 +416,7 @@ namespace FSpot {
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 ();
}
}
diff --git a/src/MainWindow.cs b/src/MainWindow.cs
index cdeae9f..bd39936 100644
--- a/src/MainWindow.cs
+++ b/src/MainWindow.cs
@@ -923,15 +923,7 @@ public class MainWindow {
int [] selected_ids = SelectedIds ();
if (command.Execute (direction, SelectedPhotos (selected_ids)))
-#if MONO_1_9_0
query.MarkChanged (selected_ids, new PhotoChanges () {DataChanged = true});
-#else
- {
- PhotoChanges changes = new PhotoChanges ();
- changes.DataChanged = true;
- query.MarkChanged (selected_ids, changes);
- }
-#endif
}
//
@@ -2582,15 +2574,7 @@ public class MainWindow {
int [] selected_ids = SelectedIds ();
if (command.Execute (SelectedPhotos (selected_ids)))
-#if MONO_1_9_0
query.MarkChanged (selected_ids, new PhotoChanges {DataChanged = true});
-#else
- {
- PhotoChanges changes = new PhotoChanges ();
- changes.DataChanged = true;
- query.MarkChanged (selected_ids, changes);
- }
-#endif
}
public void HandleRotate90Command (object sender, EventArgs args)
diff --git a/src/PhotoStore.cs b/src/PhotoStore.cs
index 16b1e4b..56d85d2 100644
--- a/src/PhotoStore.cs
+++ b/src/PhotoStore.cs
@@ -230,11 +230,7 @@ public class PhotoStore : DbStore {
while (reader.Read ()) {
uint version_id = Convert.ToUInt32 (reader ["version_id"]);
string name = reader["name"].ToString ();
-#if MONO_2_0
System.Uri uri = new System.Uri (reader["uri"].ToString ());
-#else
- System.Uri uri = new System.Uri (reader["uri"].ToString (), true);
-#endif
string md5_sum = reader["md5_sum"] != null ? reader ["md5_sum"].ToString () : null;
bool is_protected = Convert.ToBoolean (reader["protected"]);
photo.AddVersionUnsafely (version_id, uri, md5_sum, name, is_protected);
@@ -274,11 +270,7 @@ public class PhotoStore : DbStore {
if (reader ["version_id"] != null) {
uint version_id = Convert.ToUInt32 (reader ["version_id"]);
string name = reader["name"].ToString ();
-#if MONO_2_0
System.Uri uri = new System.Uri (reader["uri"].ToString ());
-#else
- System.Uri uri = new System.Uri (reader["uri"].ToString (), true);
-#endif
string md5_sum = reader["md5_sum"] != null ? reader ["md5_sum"].ToString () : null;
bool is_protected = Convert.ToBoolean (reader["protected"]);
photo.AddVersionUnsafely (version_id, uri, md5_sum, name, is_protected);
@@ -336,11 +328,7 @@ public class PhotoStore : DbStore {
if (reader.Read ()) {
photo = new Photo (id,
Convert.ToInt64 (reader ["time"]),
-#if MONO_2_0
new System.Uri (reader ["uri"].ToString ()),
-#else
- new System.Uri (reader ["uri"].ToString (), true),
-#endif
reader["md5_sum"] != null ? reader["md5_sum"].ToString () : null
);
@@ -427,11 +415,7 @@ public class PhotoStore : DbStore {
while (reader.Read ()) {
Photo photo = new Photo (Convert.ToUInt32 (reader ["id"]),
Convert.ToInt64 (reader ["time"]),
-#if MONO_2_0
new System.Uri (reader ["uri"].ToString ()),
-#else
- new System.Uri (reader ["uri"].ToString (), true),
-#endif
md5_sum
);
@@ -892,11 +876,7 @@ public class PhotoStore : DbStore {
if (photo == null) {
photo = new Photo (id,
Convert.ToInt64 (reader ["time"]),
-#if MONO_2_0
new System.Uri (reader ["uri"].ToString ()),
-#else
- new System.Uri (reader ["uri"].ToString (), true),
-#endif
reader["md5_sum"] != null ? reader ["md5_sum"].ToString () : null
);
photo.Description = reader["description"].ToString ();
diff --git a/src/Utils/UriUtils.cs b/src/Utils/UriUtils.cs
index 7cd26ac..15b78d4 100644
--- a/src/Utils/UriUtils.cs
+++ b/src/Utils/UriUtils.cs
@@ -42,11 +42,7 @@ namespace FSpot.Utils
}
builder.Append (path);
-#if MONO_2_0
return new Uri (builder.ToString ());
-#else
- return new Uri (builder.ToString (), true);
-#endif
}
static char[] CharsToQuote = { ';', '?', ':', '@', '&', '=', '$', ',', '#' };
diff --git a/src/Widgets/Dissolve.cs b/src/Widgets/Dissolve.cs
index dc55037..40e2f8e 100644
--- a/src/Widgets/Dissolve.cs
+++ b/src/Widgets/Dissolve.cs
@@ -73,11 +73,7 @@ namespace FSpot.Widgets {
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;
diff --git a/src/Widgets/PreviewPopup.cs b/src/Widgets/PreviewPopup.cs
index ae2f1a8..05fa9b9 100644
--- a/src/Widgets/PreviewPopup.cs
+++ b/src/Widgets/PreviewPopup.cs
@@ -82,19 +82,11 @@ namespace FSpot {
int round = 12;
Context g = Gdk.CairoHelper.Create (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]