<commit_before>using System;
using Eto.Forms;
using Eto.Drawing;
using Eto.Platform.GtkSharp.Drawing;

namespace Eto.Platform.GtkSharp
{
	public class RadioButtonHandler : GtkControl<Gtk.RadioButton, RadioButton>, IRadioButton
	{
		Gtk.AccelLabel label;

		protected override Gtk.Widget FontControl
		{
			get { return label; }
		}
		
		public void Create(RadioButton controller)
		{
			if (controller != null) Control = new Gtk.RadioButton((Gtk.RadioButton)controller.ControlObject);
			else Control = new Gtk.RadioButton((Gtk.RadioButton)null);
			label = new Gtk.AccelLabel("");
			Control.Add(label); //control.AddMnemonicLabel(label);
			Control.Toggled += control_Toggled;
		}
		
		void control_Toggled(Object sender, EventArgs e)
		{
			Widget.OnCheckedChanged(e);
		}

		public override string Text
		{
			get { return MnuemonicToString(label.Text); }
			set { label.TextWithMnemonic = StringToMnuemonic(value); }
		}
		
		public bool Checked
		{
			get { return Control.Active; }
			set { Control.Active = value; }
		}
		
	}
}
<commit_msg>Gtk: RadioButton will no longer auto select first item to work like other platforms<commit_after>using System;
using Eto.Forms;
using Eto.Drawing;
using Eto.Platform.GtkSharp.Drawing;

namespace Eto.Platform.GtkSharp
{
	public class RadioButtonHandler : GtkControl<Gtk.RadioButton, RadioButton>, IRadioButton
	{
		Gtk.AccelLabel label;

		protected override Gtk.Widget FontControl
		{
			get { return label; }
		}
		
		public void Create (RadioButton controller)
		{
			if (controller != null)
				Control = new Gtk.RadioButton (RadioButtonHandler.GetControl (controller));
			else {
				Control = new Gtk.RadioButton ((Gtk.RadioButton)null);
				// make gtk work like others in that no radio button is initially selected
				var inactive = new Gtk.RadioButton (Control);
				inactive.Active = true;
			}
			label = new Gtk.AccelLabel("");
			Control.Add(label); //control.AddMnemonicLabel(label);
			Control.Toggled += control_Toggled;
		}
		
		void control_Toggled(Object sender, EventArgs e)
		{
			Widget.OnCheckedChanged(e);
		}

		public override string Text
		{
			get { return MnuemonicToString(label.Text); }
			set { label.TextWithMnemonic = StringToMnuemonic(value); }
		}
		
		public bool Checked
		{
			get { return Control.Active; }
			set { Control.Active = value; }
		}
		
	}
}

{'fraction_non_alphanumeric': 0.10162254483347566, 'fraction_numerical': 0.0, 'mean_word_length': 3.7525354969574036, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '13130', 'n_tokens_mistral': 877, 'n_tokens_neox': 752, 'n_words': 179}