~jejones/do/future-actionsource

« back to all changes in this revision

Viewing changes to Do.Addins/src/Do.UI/Bezel/Bezel.cs

  • Committer: Jason Smith
  • Date: 2008-11-07 05:55:21 UTC
  • Revision ID: jassmith@gmail.com-20081107055521-kn6dalpx89ua3pjp
  Do.Addins/src/Do.UI/BaseWidgets/ResultsWindow.cs
  Do.Addins/src/Do.UI/Bezel/Bezel.cs
  Do.Addins/src/Do.UI/Bezel/BezelGlassResults.cs
  Do.Addins/src/Do.UI/ClassicWindow/ClassicWindow.cs
  Do.Addins/src/Do.UI/IUIContext.cs
  Do.Addins/src/Do.UI/UIContext.cs
  Do/src/Do.Core/Controller.cs
  Do/src/Do.Core/IUniverseManager.cs
  Do/src/Do.Core/SearchControllers/ISearchController.cs
  Do/src/Do.Core/SearchControllers/SecondSearchController.cs
  Do/src/Do.Core/SearchControllers/SimpleSearchContext.cs
  Do/src/Do.Core/SearchControllers/SimpleSearchController.cs
  Do/src/Do.Core/SimpleUniverseManager.cs

Convert Universe and related classes to use IList (so we get indexing) instead of using concrete arrays.  Convert (at least the obvious) n time length to constant time with .Any()

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
using System;
20
20
using System.Collections.Generic;
 
21
using System.Linq;
21
22
 
22
23
using Cairo;
23
24
using Gdk;
180
181
                        // happened is the universe has "nulled" the pane by fluke.  We detect this and replace the
181
182
                        // query with an invisible space.
182
183
                        string query;
183
 
                        if (pane == Pane.Third && context.Selection == null && string.IsNullOrEmpty (context.Query) && context.Results.Length == 0) {
 
184
                        if (pane == Pane.Third && context.Selection == null && string.IsNullOrEmpty (context.Query) && !context.Results.Any ()) {
184
185
                                query = " ";
185
186
                        } else {
186
187
                                query = context.Query;