コード例 #1
0
 protected virtual void ItemsChangedHandler(IBrowsableCollection collection, BrowsableEventArgs args)
 {
     if (ItemsChanged != null)
     {
         ItemsChanged(this, args);
     }
 }
コード例 #2
0
        void HandleParentItemsChanged(IBrowsableCollection collection, BrowsableEventArgs args)
        {
            if (ItemsChanged == null)
            {
                return;
            }

            var local_ids = new List <int> ();

            foreach (int parent_index in args.Items)
            {
                // If the item isn't part of the selection ignore it
                if (!Contains(collection [parent_index]))
                {
                    return;
                }

                int local_index = IndexOf(parent_index);
                if (local_index >= 0)
                {
                    local_ids.Add(local_index);
                }
            }

            if (local_ids.Count == 0)
            {
                return;
            }

            int [] localIdsItems = local_ids.ToArray();
            ItemsChanged(this, new BrowsableEventArgs(localIdsItems, args.Changes));
        }
コード例 #3
0
ファイル: Sidebar.cs プロジェクト: neuroradiology/f-spot
 // Proxy selection item changes to the subscribed sidebar pages.
 public void HandleSelectionItemsChanged(IBrowsableCollection collection, BrowsableEventArgs args)
 {
     if (SelectionItemsChanged != null)
     {
         SelectionItemsChanged(collection, args);
     }
 }
コード例 #4
0
 protected void HandleCollectionItemsChanged(IBrowsableCollection collection,
                                             BrowsableEventArgs event_args)
 {
     foreach (int item in event_args.Items)
     {
         if (item == Index)
         {
             SetIndex(Index, event_args.Changes);
         }
     }
 }
コード例 #5
0
        void HandleCollectionItemsChanged(IBrowsableCollection coll, BrowsableEventArgs args)
        {
            if (!args.Changes.DataChanged)
            {
                return;
            }
            foreach (int item in args.Items)
            {
                thumb_cache.TryRemove(FSpot.ThumbnailGenerator.ThumbnailPath((selection.Collection [item]).DefaultVersionUri));
            }

            //FIXME call QueueDrawArea
            QueueDraw();
        }
コード例 #6
0
        internal void HandleSelectionItemsChanged(IBrowsableCollection collection, BrowsableEventArgs args)
        {
            if (!args.Changes.MetadataChanged)
            {
                return;
            }

            if (!Visible)
            {
                up_to_date = false;
            }
            else
            {
                Task.Run(Update);
            }
        }
コード例 #7
0
        internal void HandleSelectionItemsChanged(IBrowsableCollection collection, BrowsableEventArgs args)
        {
            if (!args.Changes.MetadataChanged)
            {
                return;
            }

            if (!Page.IsActive)
            {
                up_to_date = false;
            }
            else
            {
                update_delay.Start();
            }
        }
コード例 #8
0
 protected virtual void ItemsChangedHandler(IBrowsableCollection collection, BrowsableEventArgs args)
 {
     if (ItemsChanged != null)
         ItemsChanged (this, args);
 }
コード例 #9
0
		// Proxy selection item changes to the subscribed sidebar pages.
		public void HandleSelectionItemsChanged (IBrowsableCollection collection, BrowsableEventArgs args) {
			if (SelectionItemsChanged != null)
				SelectionItemsChanged (collection, args);
		}
コード例 #10
0
		void HandleCollectionItemsChanged (IBrowsableCollection coll, BrowsableEventArgs args)
		{
			if (!args.Changes.DataChanged)
				return;
			foreach (int item in args.Items)
				thumb_cache.TryRemove (FSpot.ThumbnailGenerator.ThumbnailPath ((selection.Collection [item]).DefaultVersionUri));

			//FIXME call QueueDrawArea
			QueueDraw ();
		}
コード例 #11
0
ファイル: MetadataDisplay.cs プロジェクト: iainlane/f-spot
        internal void HandleSelectionItemsChanged(IBrowsableCollection collection, BrowsableEventArgs args)
        {
            if (!args.Changes.MetadataChanged)
                return;

            if (!((Page.Sidebar as Sidebar).IsActive (Page)))
                up_to_date = false;
            else
                update_delay.Start ();
        }
コード例 #12
0
		private void HandleItemsChanged (FSpot.IBrowsableCollection sender, BrowsableEventArgs args)
		{
			foreach (int item in args.Items) {
				if (args.Changes.DataChanged)
					UpdateThumbnail (item);
				InvalidateCell (item);
			}
		}
コード例 #13
0
			private void HandleParentItemsChanged (IBrowsableCollection collection, BrowsableEventArgs args)
			{
				if (this.ItemsChanged == null)
					return;

				ArrayList local_ids = new ArrayList ();
				foreach (int parent_index in args.Items) {
					// If the item isn't part of the selection ignore it
					if (!this.Contains (collection [parent_index]))
						return;

					int local_index = this.IndexOf (parent_index);
					if (local_index >= 0)
						local_ids.Add (local_index);
				}

				if (local_ids.Count == 0)
					return;

				int [] items = (int [])local_ids.ToArray (typeof (int));
				ItemsChanged (this, new BrowsableEventArgs (items, args.Changes));
			}
コード例 #14
0
ファイル: MainWindow.cs プロジェクト: mono/f-spot
		void HandleSelectionItemsChanged (IBrowsableCollection collection, BrowsableEventArgs args)
		{
			UpdateMenus ();
			UpdateTagEntryFromSelection ();
			photo_view.UpdateTagView ();
			InfoBox.Photos = SelectedPhotos ();
		}
コード例 #15
0
ファイル: MainWindow.cs プロジェクト: mono/f-spot
			void HandleSelectionItemsChanged (IBrowsableCollection collection, BrowsableEventArgs args)
			{
				if (win.ViewMode == ModeType.IconView && ItemsChanged != null)
					ItemsChanged (this, args);
			}
コード例 #16
0
ファイル: MainWindow.cs プロジェクト: mono/f-spot
			void HandleQueryItemsChanged (IBrowsableCollection collection, BrowsableEventArgs args)
			{
				// FIXME for now we only listen to changes directly from the query
				// when we are in PhotoView mode because we presume that we'll get
				// proper notification from the icon view selection in icon view mode
				if (win.ViewMode != ModeType.PhotoView || ItemsChanged == null)
					return;

				foreach (int item in args.Items.Where(item => win.photo_view.Item.Index == item)) {
					ItemsChanged (this, new BrowsableEventArgs (item, args.Changes));
					break;
				}
			}
コード例 #17
0
ファイル: MainWindow.cs プロジェクト: mono/f-spot
		//
		// IconView event handlers
		//

		void HandleDoubleClicked (object sender, BrowsableEventArgs args)
		{
			Widget widget = sender as Widget;
			if (widget == null)
				return;

			switch (ViewMode) {
			case ModeType.IconView:
				icon_view.FocusCell = args.Items [0];
				SetViewMode (ModeType.PhotoView);
				break;
			case ModeType.PhotoView:
				SetViewMode (ModeType.IconView);
				break;
			}
		}
コード例 #18
0
		protected void HandleCollectionItemsChanged (IBrowsableCollection collection,
							     BrowsableEventArgs event_args)
		{
			foreach (int item in event_args.Items)
				if (item == Index) 
					SetIndex (Index, event_args.Changes);
		}