f-spot r4100 - in trunk: . src src/Editors



Author: rubenv
Date: Wed Jun 25 21:38:26 2008
New Revision: 4100
URL: http://svn.gnome.org/viewvc/f-spot?rev=4100&view=rev

Log:
2008-06-25  Ruben Vermeersch  <ruben savanne be>

	Move Editor to OldEditor, clearing up room for the new one. First patch in
	a large row, even though it doesn't have much effect, I'd like to keep the
	delta between my tree and HEAD small (currently 18 commits).

	* src/Editors/Editor.cs: Replaced with src/Editors/OldEditor.cs.
	* src/Makefile.am: Update build accordingly.
	* src/PhotoImageView.cs: Update references.


Added:
   trunk/src/Editors/OldEditor.cs
      - copied, changed from r4099, /trunk/src/Editors/Editor.cs
Removed:
   trunk/src/Editors/Editor.cs
Modified:
   trunk/ChangeLog
   trunk/src/Makefile.am
   trunk/src/PhotoImageView.cs

Copied: trunk/src/Editors/OldEditor.cs (from r4099, /trunk/src/Editors/Editor.cs)
==============================================================================
--- /trunk/src/Editors/Editor.cs	(original)
+++ trunk/src/Editors/OldEditor.cs	Wed Jun 25 21:38:26 2008
@@ -6,13 +6,13 @@
 using FSpot.Utils;
 
 namespace FSpot.Editors {
-	public abstract class Editor {
+	public abstract class OldEditor {
 		protected PhotoImageView view;
 		protected Gtk.Window controls;
-		
+
 		public event EventHandler Done;
 
-		public Editor (PhotoImageView view)
+		public OldEditor (PhotoImageView view)
 		{
 			SetView (view);
 		}
@@ -52,7 +52,7 @@
 				controls = win;
 #endif
 			}
-			
+
 		}
 
 		protected virtual Widget CreateControls ()
@@ -67,7 +67,7 @@
 
 		protected virtual void Close ()
 		{
-			
+
 			if (controls != null)
 				controls.Destroy ();
 
@@ -78,7 +78,7 @@
 		}
 	}
 
-	public class GlEditor : Editor {
+	public class GlEditor : OldEditor {
 		protected GlTransition transition;
 		protected Scale scale;
 		protected Texture texture;
@@ -120,8 +120,8 @@
 			Gl.glEnable (Gl.GL_CONVOLUTION_2D);
 			Gdk.Color c = view.Style.Background (view.State);
 			Gl.glClearColor (c.Red / (float) ushort.MaxValue,
-					 c.Blue / (float) ushort.MaxValue, 
-					 c.Green / (float) ushort.MaxValue, 
+					 c.Blue / (float) ushort.MaxValue,
+					 c.Green / (float) ushort.MaxValue,
 					 1.0f);
 
 			if (texture == null) {
@@ -134,21 +134,21 @@
 				if (!supported) {
 					System.Console.WriteLine ("GL_ARB_imaging not supported");
 					return;
-				}	
+				}
 #else
 				GlExtensionLoader.LoadAllExtensions ();
 #endif
-				
+
 				Gl.glConvolutionParameteri (Gl.GL_CONVOLUTION_2D,
 							    Gl.GL_CONVOLUTION_BORDER_MODE,
 							    Gl.GL_REPLICATE_BORDER);
 
 				Gl.glConvolutionFilter2D (Gl.GL_CONVOLUTION_2D,
-							  Gl.GL_INTENSITY, 
-							  3, 
+							  Gl.GL_INTENSITY,
+							  3,
 							  3,
 							  Gl.GL_INTENSITY,
-							  Gl.GL_FLOAT, 
+							  Gl.GL_FLOAT,
 							  kernel);
 
 				texture = new Texture (view.CompletePixbuf ());
@@ -157,17 +157,17 @@
 			Gl.glShadeModel(Gl.GL_FLAT);
 
 			Gl.glColor3f(1.0f, 1.0f, 1.0f);
-			
+
 			Gl.glEnable (Gl.GL_DEPTH_TEST);
 			Gl.glEnable (Gl.GL_NORMALIZE);
 			Gl.glShadeModel (Gl.GL_FLAT);
 			Gl.glEnable (Gl.GL_TEXTURE_RECTANGLE_ARB);
 			Gl.glClear (Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
 
-			
+
 
 			transition.Draw (view.Allocation, texture, texture);
-			
+
 			view.Glx.SwapBuffers (view.GdkWindow);
 			args.RetVal = true;
 			Gl.glDisable (Gl.GL_CONVOLUTION_2D);
@@ -185,12 +185,12 @@
 				view.Glx.MakeCurrent (view.GdkWindow);
 				texture.Dispose ();
 			}
-			
+
 			base.Close ();
 		}
 	}
 
-	public class EffectEditor : Editor {
+	public class EffectEditor : OldEditor {
 		protected IEffect effect;
 		protected Widgets.ImageInfo info;
 		bool double_buffer;
@@ -198,7 +198,7 @@
 		public EffectEditor (PhotoImageView view) : base (view)
 		{
 		}
-		
+
 		protected override void SetView (PhotoImageView value)
 		{
 			if (view != null) {
@@ -226,13 +226,13 @@
 			Context ctx = CairoUtils.CreateContext (view.GdkWindow);
 			Gdk.Color c = view.Style.Background (view.State);
 			ctx.Source = new SolidPattern (c.Red / (float) ushort.MaxValue,
-						       c.Blue / (float) ushort.MaxValue, 
+						       c.Blue / (float) ushort.MaxValue,
 						       c.Green / (float) ushort.MaxValue);
 
 			ctx.Paint ();
 
 			effect.OnExpose (ctx, view.Allocation);
-			
+
 			args.RetVal = true;
 		}
 
@@ -243,12 +243,11 @@
 			if (effect != null)
 				effect.Dispose ();
 			effect = null;
-			
+
 			if (info != null)
 				info.Dispose ();
 			info = null;
-			
+
 		}
 	}
 }
-

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Wed Jun 25 21:38:26 2008
@@ -88,7 +88,7 @@
 	$(srcdir)/DependentListStore.cs		\
 	$(srcdir)/DirectoryAdaptor.cs		\
 	$(srcdir)/DirectoryCollection.cs	\
-	$(srcdir)/Editors/Editor.cs		\
+	$(srcdir)/Editors/OldEditor.cs		\
 	$(srcdir)/Editors/SoftFocus.cs		\
 	$(srcdir)/Editors/Tilt.cs		\
 	$(srcdir)/ExportStore.cs		\

Modified: trunk/src/PhotoImageView.cs
==============================================================================
--- trunk/src/PhotoImageView.cs	(original)
+++ trunk/src/PhotoImageView.cs	Wed Jun 25 21:38:26 2008
@@ -19,7 +19,7 @@
 		ProgressType load_async = ProgressType.Full;
 		bool progressive_display;
 		public GdkGlx.Context Glx;
-		private Editor editor;
+		private OldEditor editor;
 
 		public PhotoImageView (IBrowsableCollection query) : this (new BrowsablePointer (query, -1))
 		{
@@ -77,7 +77,7 @@
 #endif
 		}
 
-		public Editor Editor {
+		public OldEditor Editor {
 			get { return editor; }
 			set {
 				value.Done += HandleEditorDone;
@@ -91,7 +91,7 @@
 
 		private void HandleEditorDone (object sender, EventArgs args)
 		{
-			Editor old = sender as Editor;
+			OldEditor old = sender as OldEditor;
 
 			old.Done -= HandleEditorDone;
 				



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