예제 #1
0
        bool FillList()
        {
            if ((completionDataList.Count == 0) && !IsChanging)
            {
                return(false);
            }

            Style = CompletionWidget.GtkStyle;

            if (PropertyService.Get("HideObsoleteItems", false))
            {
                foreach (var item in completionDataList.Where(x => x.DisplayFlags.HasFlag(DisplayFlags.Obsolete)).ToList())
                {
                    completionDataList.Remove(item);
                }
            }

            //sort, sinking obsolete items to the bottoms
            //the string comparison is ordinal as that makes it an order of magnitude faster, which
            //which makes completion triggering noticeably more responsive
            if (!completionDataList.IsSorted)
            {
                completionDataList.Sort(new DataItemComparer());
            }

            Reposition(true);
            return(true);
        }
        bool FillList()
        {
            if ((completionDataList.Count == 0) && !IsChanging)
            {
                return(false);
            }

            Style = CompletionWidget.GtkStyle;

            //sort, sinking obsolete items to the bottoms
            //the string comparison is ordinal as that makes it an order of magnitude faster, which
            //which makes completion triggering noticeably more responsive
            if (!completionDataList.IsSorted)
            {
                completionDataList.Sort(new DataItemComparer());
            }

            Reposition(true);
            return(true);
        }