[f-spot: 2/41] wip



commit 598ac1e6aed675b86745fffd3cd992c608ae7e96
Author: Stephane Delcroix <stephane delcroix org>
Date:   Sat Jun 6 10:46:57 2009 +0200

    wip

 src/AsyncPixbufLoader.cs    |    2 +-
 src/Core/ColorManagement.cs |   12 ++++++------
 src/PhotoImageView.cs       |    3 +--
 src/Widgets/ImageView.cs    |   18 +++++++++++++-----
 4 files changed, 21 insertions(+), 14 deletions(-)
---
diff --git a/src/AsyncPixbufLoader.cs b/src/AsyncPixbufLoader.cs
index 577817d..ee91b9a 100644
--- a/src/AsyncPixbufLoader.cs
+++ b/src/AsyncPixbufLoader.cs
@@ -122,7 +122,7 @@ namespace FSpot {
 					
 					if (FSpot.ColorManagement.IsEnabled && !thumb.HasAlpha) {
 						if (img.GetProfile () == null)
-							FSpot.ColorManagement.PhotoImageView.Transform = FSpot.ColorManagement.StandartTransform ();
+							FSpot.ColorManagement.PhotoImageView.Transform = FSpot.ColorManagement.StandardTransform ();
 						else
 							FSpot.ColorManagement.PhotoImageView.Transform = FSpot.ColorManagement.CreateTransform (thumb, img.GetProfile ());
 					}
diff --git a/src/Core/ColorManagement.cs b/src/Core/ColorManagement.cs
index c44f6b0..57cd2b0 100644
--- a/src/Core/ColorManagement.cs
+++ b/src/Core/ColorManagement.cs
@@ -55,7 +55,7 @@ public class ColorManagement {
 			get { return destination_profile; }
 		}
 		
-		private static void GetStandartProfiles ()
+		private static void GetStandardProfiles ()
 		{
 			Profiles.Add (Cms.Profile.CreateStandardRgb ());
 			Profiles.Add (Cms.Profile.CreateAlternateRgb ());
@@ -124,23 +124,23 @@ public class ColorManagement {
 		public static void LoadSettings ()
 		{
 			Profiles.Clear ();
-			GetStandartProfiles ();
+			GetStandardProfiles ();
 			foreach (string dir in search_dir)
 				GetProfiles (dir);
 			GetXProfile ();
 			GetSettings ();
-			CreateStandartTransform ();
+			CreateStandardTransform ();
 		}
 		
 		public static void ReloadSettings()
 		{
 			GetXProfile ();
 			GetSettings ();
-			CreateStandartTransform ();
+			CreateStandardTransform ();
 			PhotoImageView.Reload ();
 		}
 		
-		private static void CreateStandartTransform ()
+		private static void CreateStandardTransform ()
 		{
 			Cms.Profile [] list = new Cms.Profile [] { Cms.Profile.CreateStandardRgb (), display_profile };
 			
@@ -151,7 +151,7 @@ public class ColorManagement {
 		}
 		
 		//it returns the cached transformation
-		public static Cms.Transform StandartTransform ()
+		public static Cms.Transform StandardTransform ()
 		{
 			if (IsEnabled)
 				return standart_transform;
diff --git a/src/PhotoImageView.cs b/src/PhotoImageView.cs
index c9e32ca..10beb7b 100644
--- a/src/PhotoImageView.cs
+++ b/src/PhotoImageView.cs
@@ -33,7 +33,7 @@ namespace FSpot.Widgets {
 			loader.Done += HandleDone;
 			
 			FSpot.ColorManagement.PhotoImageView = this;
-			this.Transform = FSpot.ColorManagement.StandartTransform (); //for preview windows
+			Transform = FSpot.ColorManagement.StandardTransform (); //for preview windows
 
 			Accelerometer.OrientationChanged += HandleOrientationChanged;
 
@@ -47,7 +47,6 @@ namespace FSpot.Widgets {
 			this.item = item;
 			item.Changed += PhotoItemChanged;
 			this.Destroyed += HandleDestroyed;
-			this.SetTransparentColor (this.Style.BaseColors [(int)Gtk.StateType.Normal]);
 		}
 		
 		protected override void OnStyleSet (Gtk.Style previous)
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index 059a9af..2028cbe 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -52,9 +52,10 @@ namespace FSpot.Widgets
 			set { throw new NotImplementedException ();} 
 		}
 
+		Cms.Transform transform;
 		public Cms.Transform Transform {
-			get { throw new NotImplementedException ();} 
-			set { throw new NotImplementedException ();} 
+			get { return transform; } 
+			set { transform = value;} 
 		}
 
 		public Gdk.InterpType Interpolation {
@@ -73,18 +74,25 @@ namespace FSpot.Widgets
 			throw new NotImplementedException ();	
 		}
 		
+		Gdk.Color transparent_color = this.Style.BaseColors [(int)Gtk.StateType.Normal];
+		public Gdk.Color TransparentColor {
+			get { return transparent_color; }
+			set { transparent_color = value; }
+		}
+
+		[Obsolete ("Use the TransparentColor property")]
 		public void SetTransparentColor (Gdk.Color color)
 		{
-			throw new NotImplementedException ();
+			TransparentColor = color;
 		} 
 
 		public void SetTransparentColor (string color) //format "#000000"
 		{
-			SetTransparentColor (new Gdk.Color (
+			TransparentColor  = new Gdk.Color (
 					Byte.Parse (color.Substring (1,2), System.Globalization.NumberStyles.AllowHexSpecifier),
 					Byte.Parse (color.Substring (3,2), System.Globalization.NumberStyles.AllowHexSpecifier),
 					Byte.Parse (color.Substring (5,2), System.Globalization.NumberStyles.AllowHexSpecifier)
-			));
+			);
 		}
 
 		[Obsolete ("use the CheckSize Property instead")]



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