f-spot r4632 - in trunk: . src src/Core src/UI.Dialog src/Widgets
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4632 - in trunk: . src src/Core src/UI.Dialog src/Widgets
- Date: Wed, 26 Nov 2008 14:13:03 +0000 (UTC)
Author: sdelcroix
Date: Wed Nov 26 14:13:03 2008
New Revision: 4632
URL: http://svn.gnome.org/viewvc/f-spot?rev=4632&view=rev
Log:
fix the signature of BP.Changed, inherits BPCEA from EventArgs, adapt for signature changes
2008-11-26 Stephane Delcroix <sdelcroix novell com>
* src/Core/BrowsablePointer.cs: fix the Changed signature
* src/Core/BrowsablePointerChangedEventArgs.cs: inherits from
EventArgs.
* src/: changes for the new signature
Added:
trunk/src/Core/BrowsablePointerChangedEventArgs.cs
- copied, changed from r4631, /trunk/src/Core/BrowsablePointerEventArgs.cs
Removed:
trunk/src/Core/BrowsablePointerEventArgs.cs
Modified:
trunk/ChangeLog
trunk/src/Core/BrowsablePointer.cs
trunk/src/FullScreenView.cs
trunk/src/InfoOverlay.cs
trunk/src/ItemAction.cs
trunk/src/Loupe.cs
trunk/src/Makefile.am
trunk/src/PhotoImageView.cs
trunk/src/SingleView.cs
trunk/src/TextureDisplay.cs
trunk/src/UI.Dialog/AdjustTimeDialog.cs
trunk/src/Widgets/Filmstrip.cs
Modified: trunk/src/Core/BrowsablePointer.cs
==============================================================================
--- trunk/src/Core/BrowsablePointer.cs (original)
+++ trunk/src/Core/BrowsablePointer.cs Wed Nov 26 14:13:03 2008
@@ -10,12 +10,12 @@
namespace FSpot
{
- public delegate void ItemChangedHandler (BrowsablePointer pointer, BrowsablePointerChangedArgs old);
+
public class BrowsablePointer {
IBrowsableCollection collection;
IBrowsableItem item;
int index;
- public event ItemChangedHandler Changed;
+ public event EventHandler<BrowsablePointerChangedEventArgs> Changed;
public BrowsablePointer (IBrowsableCollection collection, int index)
{
@@ -110,9 +110,7 @@
private void SetIndex (int value, IBrowsableItemChanges changes)
{
- BrowsablePointerChangedArgs args;
-
- args = new BrowsablePointerChangedArgs (Current, index, changes);
+ BrowsablePointerChangedEventArgs args = new BrowsablePointerChangedEventArgs (Current, index, changes);
index = value;
item = Current;
Copied: trunk/src/Core/BrowsablePointerChangedEventArgs.cs (from r4631, /trunk/src/Core/BrowsablePointerEventArgs.cs)
==============================================================================
--- /trunk/src/Core/BrowsablePointerEventArgs.cs (original)
+++ trunk/src/Core/BrowsablePointerChangedEventArgs.cs Wed Nov 26 14:13:03 2008
@@ -1,5 +1,5 @@
/*
- * FSpot.BrowsablePointerEventArgs.cs
+ * FSpot.BrowsablePointerChangedEventArgs.cs
*
* Author(s):
* Larry Ewing <lewing novell com>
@@ -9,7 +9,8 @@
namespace FSpot
{
- public class BrowsablePointerChangedArgs {
+ public class BrowsablePointerChangedEventArgs : System.EventArgs
+ {
IBrowsableItem previous_item;
public IBrowsableItem PreviousItem {
get { return previous_item; }
@@ -25,7 +26,7 @@
get { return changes; }
}
- public BrowsablePointerChangedArgs (IBrowsableItem previous_item, int previous_index, IBrowsableItemChanges changes)
+ public BrowsablePointerChangedEventArgs (IBrowsableItem previous_item, int previous_index, IBrowsableItemChanges changes) : base ()
{
this.previous_item = previous_item;
this.previous_index = previous_index;
Modified: trunk/src/FullScreenView.cs
==============================================================================
--- trunk/src/FullScreenView.cs (original)
+++ trunk/src/FullScreenView.cs Wed Nov 26 14:13:03 2008
@@ -194,7 +194,7 @@
this.GdkWindow.Cursor = null;
}
- private void HandleItemChanged (object sender, BrowsablePointerChangedArgs args)
+ private void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
if (scroll.ControlBox.Visible)
scroll.ShowControls ();
Modified: trunk/src/InfoOverlay.cs
==============================================================================
--- trunk/src/InfoOverlay.cs (original)
+++ trunk/src/InfoOverlay.cs Wed Nov 26 14:13:03 2008
@@ -25,7 +25,7 @@
Context = ViewContext.FullScreen;
}
- private void HandleItemChanged (BrowsablePointer sender, BrowsablePointerChangedArgs args)
+ private void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
Photo = item.Current as Photo;
}
Modified: trunk/src/ItemAction.cs
==============================================================================
--- trunk/src/ItemAction.cs (original)
+++ trunk/src/ItemAction.cs Wed Nov 26 14:13:03 2008
@@ -31,8 +31,8 @@
item.Changed += ItemChanged;
}
- protected virtual void ItemChanged (BrowsablePointer sender,
- BrowsablePointerChangedArgs args)
+ protected virtual void ItemChanged (object sender,
+ BrowsablePointerChangedEventArgs args)
{
Sensitive = item.IsValid;
}
@@ -105,8 +105,7 @@
{
}
- protected override void ItemChanged (BrowsablePointer p,
- BrowsablePointerChangedArgs args)
+ protected override void ItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
Sensitive = item.Index < item.Collection.Count -1;
}
@@ -127,8 +126,7 @@
{
}
- protected override void ItemChanged (BrowsablePointer p,
- BrowsablePointerChangedArgs args)
+ protected override void ItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
Sensitive = item.Index > 0;
}
Modified: trunk/src/Loupe.cs
==============================================================================
--- trunk/src/Loupe.cs (original)
+++ trunk/src/Loupe.cs Wed Nov 26 14:13:03 2008
@@ -551,7 +551,7 @@
return false;
}
- private void HandleItemChanged (BrowsablePointer pointer, BrowsablePointerChangedArgs args)
+ private void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
UpdateSample ();
}
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Wed Nov 26 14:13:03 2008
@@ -21,7 +21,7 @@
$(srcdir)/Core/Animator.cs \
$(srcdir)/Core/BrowsableEventArgs.cs \
$(srcdir)/Core/BrowsablePointer.cs \
- $(srcdir)/Core/BrowsablePointerEventArgs.cs \
+ $(srcdir)/Core/BrowsablePointerChangedEventArgs.cs \
$(srcdir)/Core/Category.cs \
$(srcdir)/Core/DbItem.cs \
$(srcdir)/Core/Delay.cs \
Modified: trunk/src/PhotoImageView.cs
==============================================================================
--- trunk/src/PhotoImageView.cs (original)
+++ trunk/src/PhotoImageView.cs Wed Nov 26 14:13:03 2008
@@ -307,7 +307,7 @@
this.ZoomFit ();
}
- private void PhotoItemChanged (BrowsablePointer item, BrowsablePointerChangedArgs args)
+ private void PhotoItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
// If it is just the position that changed fall out
if (args != null &&
Modified: trunk/src/SingleView.cs
==============================================================================
--- trunk/src/SingleView.cs (original)
+++ trunk/src/SingleView.cs Wed Nov 26 14:13:03 2008
@@ -161,11 +161,14 @@
collection.Changed += HandleCollectionChanged;
// wrap the methods to fit to the delegate
- image_view.Item.Changed += delegate (BrowsablePointer pointer, BrowsablePointerChangedArgs old) {
- IBrowsableItem [] item = {pointer.Current};
- PhotoArray item_array = new PhotoArray (item);
- sidebar.HandleSelectionChanged (item_array);
- };
+ image_view.Item.Changed += delegate (object sender, BrowsablePointerChangedEventArgs old) {
+ BrowsablePointer pointer = sender as BrowsablePointer;
+ if (pointer == null)
+ return;
+ IBrowsableItem [] item = {pointer.Current};
+ PhotoArray item_array = new PhotoArray (item);
+ sidebar.HandleSelectionChanged (item_array);
+ };
image_view.Item.Collection.ItemsChanged += sidebar.HandleSelectionItemsChanged;
@@ -262,8 +265,12 @@
UpdateStatusLabel ();
}
- private void HandleItemChanged (BrowsablePointer pointer, BrowsablePointerChangedArgs old)
+ private void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs old)
{
+ BrowsablePointer pointer = sender as BrowsablePointer;
+ if (pointer == null)
+ return;
+
directory_view.FocusCell = pointer.Index;
directory_view.Selection.Clear ();
if (collection.Count > 0) {
Modified: trunk/src/TextureDisplay.cs
==============================================================================
--- trunk/src/TextureDisplay.cs (original)
+++ trunk/src/TextureDisplay.cs Wed Nov 26 14:13:03 2008
@@ -175,7 +175,7 @@
}
Animator animator;
- private void HandleItemChanged (BrowsablePointer p, BrowsablePointerChangedArgs args)
+ private void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
Animator = new Animator (3000, 20, HandleTick);
Modified: trunk/src/UI.Dialog/AdjustTimeDialog.cs
==============================================================================
--- trunk/src/UI.Dialog/AdjustTimeDialog.cs (original)
+++ trunk/src/UI.Dialog/AdjustTimeDialog.cs Wed Nov 26 14:13:03 2008
@@ -119,7 +119,7 @@
Offset);
}
- void HandleItemChanged (BrowsablePointer pointer, BrowsablePointerChangedArgs args)
+ void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs args)
{
//back_button.Sensitive = (Item.Index > 0 && collection.Count > 0);
//forward_button.Sensitive = (Item.Index < collection.Count - 1);
Modified: trunk/src/Widgets/Filmstrip.cs
==============================================================================
--- trunk/src/Widgets/Filmstrip.cs (original)
+++ trunk/src/Widgets/Filmstrip.cs Wed Nov 26 14:13:03 2008
@@ -477,7 +477,7 @@
QueueDraw ();
}
- void HandlePointerChanged (BrowsablePointer pointer, BrowsablePointerChangedArgs old)
+ void HandlePointerChanged (object sender, BrowsablePointerChangedEventArgs args)
{
Position = ActiveItem;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]