f-spot r4219 - in trunk: . src/Widgets



Author: rubenv
Date: Fri Aug  1 09:50:47 2008
New Revision: 4219
URL: http://svn.gnome.org/viewvc/f-spot?rev=4219&view=rev

Log:
2008-08-01  Ruben Vermeersch  <ruben savanne be>

	* src/Widgets/Sidebar.cs: Keep track of the selection in the Sidebar. This
	allows sidebar pages to get a reference to the current selection at any
	time, through the sidebar container.


Modified:
   trunk/ChangeLog
   trunk/src/Widgets/Sidebar.cs

Modified: trunk/src/Widgets/Sidebar.cs
==============================================================================
--- trunk/src/Widgets/Sidebar.cs	(original)
+++ trunk/src/Widgets/Sidebar.cs	Fri Aug  1 09:50:47 2008
@@ -89,6 +89,13 @@
 		public event IBrowsableCollectionChangedHandler SelectionChanged;
 		public event IBrowsableCollectionItemsChangedHandler SelectionItemsChanged;
 
+		// The photos selected.
+		private IBrowsableCollection selection;
+		public IBrowsableCollection Selection {
+			get { return selection; }
+			private set { selection = value; }
+		}
+
 		public Sidebar () : base ()
 		{
 			button_box = new HBox ();
@@ -207,6 +214,8 @@
 
         // Proxy selection change to the subscribed sidebar pages.
 		public void HandleSelectionChanged (IBrowsableCollection collection) {
+			Console.WriteLine("Selection Changed: {0}, {1}", collection, collection.Count);
+			Selection = collection;
 			if (SelectionChanged != null) 
 				SelectionChanged (collection);
 		}



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