static void LoadHistory (string propertyName, ComboBoxEntry entry)
{
var ec = new EntryCompletion ();
/* entry.Changed += delegate {
if (!entry.Entry.HasFocus)
entry.Entry.GrabFocus ();
};*/
entry.Entry.Completion = ec;
var store = new ListStore (typeof(string));
entry.Entry.Completion.Model = store;
entry.Model = store;
entry.Entry.ActivatesDefault = true;
entry.TextColumn = 0;
var history = PropertyService.Get<string> (propertyName);
if (!string.IsNullOrEmpty (history)) {
string[] items = history.Split (historySeparator);
foreach (string item in items) {
if (string.IsNullOrEmpty (item))
continue;
store.AppendValues (item);
}
entry.Entry.Text = items[0];
}
}