<commit_before>/* 
 * Copyright 2007 Novell Inc.
 *
 * Author
 *   <NAME> <<EMAIL>>
 *
 * See COPYING for license information.
 *
 */
using Gtk;
using FSpot.Widgets;

namespace FSpot {
	public class InfoItem : InfoBox {
		BrowsablePointer item;
		
		public InfoItem (BrowsablePointer item)
		{
			this.item = item;
			item.Changed += HandleItemChanged;
			HandleItemChanged (item, null);
			VersionIdChanged += HandleVersionIdChanged;
			ShowTags = true;
		}
		
		private void HandleItemChanged (BrowsablePointer sender, BrowsablePointerChangedArgs args)
		{
			Photo = item.Current as Photo;
		}

		private void HandleVersionIdChanged (InfoBox box, uint version_id)
		{
			Photo p = item.Current as Photo;
			PhotoQuery q = item.Collection as PhotoQuery;

			if (p !=  null && q != null) {
				p.DefaultVersionId  = version_id;
				q.Commit (item.Index);
			}
		}
	}

	public class InfoOverlay : ControlOverlay {
		InfoItem box;

		public InfoOverlay (Widget w, BrowsablePointer item) : base (w)
		{
			XAlign = 1.0;
			YAlign = 0.1;
			box = new InfoItem (item);
			box.BorderWidth = 15;
			Add (box);
			box.Show ();
			Visibility = VisibilityType.Partial;
			KeepAbove = true;
			//WindowPosition = WindowPosition.Mouse;
			AutoHide = false;
		}
	}
}<commit_msg>fix the infobox for fullscreen<commit_after>/* 
 * Copyright 2007 Novell Inc.
 *
 * Author
 *   <NAME> <<EMAIL>>
 *
 * See COPYING for license information.
 *
 */
using Gtk;
using FSpot.Widgets;

namespace FSpot {
	public class InfoItem : InfoBox {
		BrowsablePointer item;
		
		public InfoItem (BrowsablePointer item)
		{
			this.item = item;
			item.Changed += HandleItemChanged;
			HandleItemChanged (item, null);
			VersionIdChanged += HandleVersionIdChanged;
			ShowTags = true;
		}
		
		private void HandleItemChanged (BrowsablePointer sender, BrowsablePointerChangedArgs args)
		{
			Photo = item.Current as Photo;
		}

		private void HandleVersionIdChanged (InfoBox box, uint version_id)
		{
			Photo p = item.Current as Photo;
			PhotoQuery q = item.Collection as PhotoQuery;

			if (p !=  null && q != null) {
				p.DefaultVersionId  = version_id;
				q.Commit (item.Index);
			}
		}
	}

	public class InfoOverlay : ControlOverlay {
		InfoItem box;

		public InfoOverlay (Widget w, BrowsablePointer item) : base (w)
		{
			XAlign = 1.0;
			YAlign = 0.1;
			box = new InfoItem (item);
			box.BorderWidth = 15;
			Add (box);
			box.ShowAll ();
			Visibility = VisibilityType.Partial;
			KeepAbove = true;
			//WindowPosition = WindowPosition.Mouse;
			AutoHide = false;
		}
	}
}
{'fraction_non_alphanumeric': 0.10344827586206896, 'fraction_numerical': 0.007836990595611285, 'mean_word_length': 3.1783960720130935, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3555580', 'n_tokens_mistral': 989, 'n_tokens_neox': 830, 'n_words': 228}