f-spot r3750 - in trunk: . src



Author: sdelcroix
Date: Wed Mar 12 11:31:27 2008
New Revision: 3750
URL: http://svn.gnome.org/viewvc/f-spot?rev=3750&view=rev

Log:
2008-03-12  Stephane Delcroix  <stephane delcroix org>

	* src/Makefile.am:
	* src/Widgets/Filmstrip.cs: new Filmstrip widget.

	* src/PhotoImageView.cs: Adds a constructor for BrowsablePointer
	
	* src/PhotoView.cs: create the BrowsablePointer and gives it to
	PhotoImageView. Displays the filmstrip.


Modified:
   trunk/ChangeLog
   trunk/src/Makefile.am
   trunk/src/PhotoImageView.cs
   trunk/src/PhotoView.cs

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Wed Mar 12 11:31:27 2008
@@ -242,6 +242,7 @@
 	$(srcdir)/Widgets/CompositeUtils.cs	\
 	$(srcdir)/Widgets/CustomPrintWidget.cs	\
 	$(srcdir)/Widgets/Dissolve.cs		\
+	$(srcdir)/Widgets/Filmstrip.cs		\
 	$(srcdir)/Widgets/FindBar.cs		\
 	$(srcdir)/Widgets/GdkUtils.cs		\
 	$(srcdir)/Widgets/IEffect.cs		\

Modified: trunk/src/PhotoImageView.cs
==============================================================================
--- trunk/src/PhotoImageView.cs	(original)
+++ trunk/src/PhotoImageView.cs	Wed Mar 12 11:31:27 2008
@@ -20,7 +20,11 @@
 		public GdkGlx.Context Glx;
 		private Editor editor;
 
-		public PhotoImageView (IBrowsableCollection query)
+		public PhotoImageView (IBrowsableCollection query) : this (new BrowsablePointer (query, -1))
+		{
+		}
+
+		public PhotoImageView (BrowsablePointer item)
 		{
 			loader = new FSpot.AsyncPixbufLoader ();
 			loader.AreaUpdated += HandlePixbufAreaUpdated;
@@ -36,7 +40,7 @@
 			//this.Realized += HandleRealized;
 			this.Unrealized += HandleUnrealized;
 			this.ScrollEvent += HandleScrollEvent;
-			this.item = new BrowsablePointer (query, -1);
+			this.item = item;
 			item.Changed += PhotoItemChanged;
 			this.Destroyed += HandleDestroyed;
 			this.SetTransparentColor (this.Style.BaseColors [(int)Gtk.StateType.Normal]);

Modified: trunk/src/PhotoView.cs
==============================================================================
--- trunk/src/PhotoView.cs	(original)
+++ trunk/src/PhotoView.cs	Wed Mar 12 11:31:27 2008
@@ -6,6 +6,7 @@
 using Mono.Unix;
 
 using FSpot.Xmp;
+using FSpot.Widgets;
 using FSpot.Utils;
 using FSpot.UI.Dialog;
 
@@ -17,6 +18,8 @@
 	private FSpot.PhotoImageView photo_view;
 	private ScrolledWindow photo_view_scrolled;
 	private EventBox background;
+	
+	private Filmstrip filmstrip;
 
 	private Widgets.TagView tag_view;
 	
@@ -478,7 +481,17 @@
 
 		frame.Add (inner_vbox);
 		
-		photo_view = new FSpot.PhotoImageView (query);
+		BrowsablePointer bp = new BrowsablePointer (query, -1);
+		photo_view = new FSpot.PhotoImageView (bp);
+
+		filmstrip = new Filmstrip (bp);
+		Gdk.Pixbuf bg = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, true, 8, 1, 69);
+		bg.Fill (0x00000000);
+		filmstrip.BackgroundTile = bg;
+		filmstrip.ThumbOffset = 1;
+		filmstrip.Spacing = 4;
+		inner_vbox.PackStart (filmstrip, false, false, 0);
+
 		photo_view.PhotoChanged += HandlePhotoChanged;
 		photo_view.SelectionChanged += HandleSelectionChanged;
 
@@ -588,6 +601,7 @@
 
 	private void SetColors ()
 	{
+		GtkUtil.ModifyColors (filmstrip);
 		GtkUtil.ModifyColors (tag_view);
 		GtkUtil.ModifyColors (photo_view);
 		GtkUtil.ModifyColors (background);



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