<commit_before>using System;
using System.IO;
using Eto.Forms;
using System.Collections.Generic;
using System.Linq;

namespace Eto.GtkSharp.Forms
{
	public abstract class GtkFileDialog<TControl, TWidget> : WidgetHandler<TControl, TWidget>, FileDialog.IHandler
		where TControl: Gtk.FileChooserDialog
		where TWidget: FileDialog
	{
		IFileDialogFilter[] filters;



		public string FileName
		{
			get { return Control.Filename; }
			set
			{
				Control.SetCurrentFolder(Path.GetDirectoryName(value));
				Control.SetFilename(value);
			}
		}
		
		public Uri Directory {
			get {
				return new Uri(Control.CurrentFolderUri);
			}
			set {
				Control.SetCurrentFolderUri(value.AbsoluteUri);
			}
		}
		
		
		public IEnumerable<IFileDialogFilter> Filters
		{
			get { return filters; }
			set<commit_msg>Gtk: Fix setting FileDialog.FileName<commit_after>using System;
using System.IO;
using Eto.Forms;
using System.Collections.Generic;
using System.Linq;

namespace Eto.GtkSharp.Forms
{
	public abstract class GtkFileDialog<TControl, TWidget> : WidgetHandler<TControl, TWidget>, FileDialog.IHandler
		where TControl: Gtk.FileChooserDialog
		where TWidget: FileDialog
	{
		IFileDialogFilter[] filters;



		public string FileName
		{
			get { return Control.Filename; }
			set
			{
				Control.SetCurrentFolder(Path.GetDirectoryName(value));
				Control.SetFilename(value);
				Control.CurrentName = Path.GetFileName(value);
			}
		}
		
		public Uri Directory {
			get {
				return new Uri(Control.CurrentFolderUri);
			}
			set {
				Control.SetCurrentFolderUri(value.AbsoluteUri);
			}
		}
		
		
		public IEnumerable<IFileDialogFilter> Filters
		{
			get { return filters; }
			set
{'fraction_non_alphanumeric': 0.09036860879904875, 'fraction_numerical': 0.0, 'mean_word_length': 3.836206896551724, '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': '4652885', 'n_tokens_mistral': 638, 'n_tokens_neox': 524, 'n_words': 110}