~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-02-05 10:49:36 UTC
  • mto: (10.3.1)
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20120205104936-4ujoylapu24cquuo
Tags: upstream-2.8.6.3+dfsg
ImportĀ upstreamĀ versionĀ 2.8.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
                static bool inCategoryMode;
89
89
                public bool InCategoryMode {
90
90
                        get { return inCategoryMode; }
91
 
                        set { inCategoryMode = value; this.CalcVisibleRows (); this.UpdatePage (); }
 
91
                        set {
 
92
                                inCategoryMode = value;
 
93
                                this.CalcVisibleRows ();
 
94
                                this.UpdatePage ();
 
95
                                if (inCategoryMode)
 
96
                                        SelectFirstItemInCategory ();
 
97
                        }
92
98
                }
93
99
                public int CategoryCount {
94
100
                        get { return this.categories.Count; }
555
561
                        categories.Sort (delegate (Category left, Category right) {
556
562
                                return right.CompletionCategory != null ? right.CompletionCategory.CompareTo (left.CompletionCategory) : -1;
557
563
                        });
 
564
                        
 
565
                        SelectFirstItemInCategory ();
558
566
                        CalcVisibleRows ();
559
567
                        UpdatePage ();
560
568
                        
561
569
                        OnWordsFiltered (EventArgs.Empty);
562
570
                }
563
571
                
 
572
                void SelectFirstItemInCategory ()
 
573
                {
 
574
                        if (string.IsNullOrEmpty (CompletionString) && inCategoryMode)
 
575
                                selection = categories.First ().Items.First ();
 
576
                }
 
577
                
564
578
                protected virtual void OnWordsFiltered (EventArgs e)
565
579
                {
566
580
                        EventHandler handler = this.WordsFiltered;