[f-spot: 6/40] propagate the orientation changed down to the ImageView
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot: 6/40] propagate the orientation changed down to the ImageView
- Date: Wed, 24 Jun 2009 09:48:12 +0000 (UTC)
commit d5f23f3871b3f4eac7bdffba5bf616cde6ba9980
Author: Stephane Delcroix <stephane delcroix org>
Date: Thu Jun 18 16:07:33 2009 +0200
propagate the orientation changed down to the ImageView
src/ImageLoader.cs | 2 +-
src/PhotoImageView.cs | 9 +--------
src/Widgets/ImageView.cs | 5 ++++-
3 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/ImageLoader.cs b/src/ImageLoader.cs
index a6b8c42..f8f6776 100644
--- a/src/ImageLoader.cs
+++ b/src/ImageLoader.cs
@@ -54,7 +54,7 @@ namespace FSpot {
{
using (ImageFile image_file = ImageFile.Create (uri)) {
image_stream = image_file.PixbufStream ();
- orientation = image_file.Orientation;
+ pixbuf_orientation = image_file.Orientation;
}
image_stream.BeginRead (buffer, 0, count, HandleReadDone, null);
loading = true;
diff --git a/src/PhotoImageView.cs b/src/PhotoImageView.cs
index c957915..fc19f0f 100644
--- a/src/PhotoImageView.cs
+++ b/src/PhotoImageView.cs
@@ -37,14 +37,8 @@ namespace FSpot.Widgets {
FSpot.ColorManagement.PhotoImageView = this;
}
-// ImageLoader loader;
public PhotoImageView (BrowsablePointer item)
{
-// loader = new ImageLoader ();
-// loader.AreaUpdated += HandlePixbufAreaUpdated;
-// loader.AreaPrepared += HandlePixbufPrepared;
-// loader.Completed += HandleDone;
-
FSpot.ColorManagement.PhotoImageView = this;
Transform = FSpot.ColorManagement.StandardTransform (); //for preview windows
@@ -83,7 +77,7 @@ namespace FSpot.Widgets {
public void HandleOrientationChanged (object sender, EventArgs e)
{
- PixbufOrientation = Accelerometer.GetViewOrientation (PixbufOrientation);
+ Reload ();
}
public void Reload ()
@@ -149,7 +143,6 @@ namespace FSpot.Widgets {
private void HandleDone (object sender, System.EventArgs args)
{
-Log.Warning ("PhotoImageView: loading DONE");
ImageLoader loader = sender as ImageLoader;
// FIXME the error hander here needs to provide proper information and we should
// pass the state and the write exception in the args
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index 7b3263f..df621a6 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -60,7 +60,10 @@ namespace FSpot.Widgets
public PixbufOrientation PixbufOrientation {
get { return pixbuf_orientation; }
set {
- Console.WriteLine ("pixbuf orientation changed");
+ if (value == pixbuf_orientation)
+ return;
+ pixbuf_orientation = value;
+ Console.WriteLine ("pixbuf orientation changed to {0}", value);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]