void HandleItemsChanged (object o, ItemsChangedArgs args)
		{
			if (AlwaysShowRecent)
				SetItem (Provider.Items.First ());
		}
Пример #2
0
		void ProviderItemsChanged (object sender, ItemsChangedArgs args)
		{
			foreach (AbstractDockItem item in args.AddedItems)
				RegisterItem (item);
			
			foreach (AbstractDockItem item in args.RemovedItems) {
				remove_time = DateTime.UtcNow;
				UnregisterItem (item);
				
				remove_index = Items.IndexOf (item) - .5;
				remove_size = IconSize; //FIXME
			}
			
			UpdateCollectionBuffer ();
			UpdateMaxIconSize ();
			DelayedSetSizeRequest ();
			
			AnimatedDraw ();
			
			// if the provider has no more items and its set to auto disable, remove it from the dock
			AbstractDockItemProvider provider = sender as AbstractDockItemProvider;
			
			if (provider.Items.Count () == 0 && provider.AutoDisable)
				preferences.RemoveProvider (provider);
		}