~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/PlacesView.cpp

  • Committer: Gord Allott
  • Date: 2011-02-28 16:27:57 UTC
  • mto: This revision was merged to the branch mainline in revision 902.
  • Revision ID: gord.allott@canonical.com-20110228162757-zk8otqin3bir0sml
erm, bunch of stuff. support for keynav, woo

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
  _home_entry = new PlaceEntryHome (_factory);
45
45
 
46
46
  _layout = new nux::VLayout (NUX_TRACKER_LOCATION);
47
 
  
 
47
 
48
48
  _search_bar = new PlacesSearchBar ();
49
49
  _layout->AddView (_search_bar, 0, nux::eCenter, nux::eFull);
50
50
  AddChild (_search_bar);
52
52
 
53
53
  _layered_layout = new nux::LayeredLayout (NUX_TRACKER_LOCATION);
54
54
  _layout->AddLayout (_layered_layout, 1, nux::eCenter, nux::eFull);
55
 
  
 
55
 
56
56
  _home_view = new PlacesHomeView ();
57
57
  _layered_layout->AddLayer (_home_view);
58
58
  AddChild (_home_view);
81
81
  _icon_loader = IconLoader::GetDefault ();
82
82
 
83
83
  SetActiveEntry (_home_entry, 0, "");
 
84
 
 
85
  //_layout->SetFocused (true);
84
86
}
85
87
 
86
88
PlacesView::~PlacesView ()
130
132
  GfxContext.PushClippingRectangle (GetGeometry() );
131
133
  GfxContext.GetRenderStates ().SetBlend (true);
132
134
  GfxContext.GetRenderStates ().SetPremultipliedBlend (nux::SRC_OVER);
133
 
  
 
135
 
134
136
  if (_layout)
135
137
    _layout->ProcessDraw (GfxContext, force_draw);
136
 
  
 
138
 
137
139
  GfxContext.GetRenderStates ().SetBlend (false);
138
140
 
139
141
  GfxContext.PopClippingRectangle ();
161
163
 
162
164
    _results_controller->Clear ();
163
165
  }
164
 
  
 
166
 
165
167
  _entry = entry;
166
168
 
167
169
  _entry->SetActive (true);
168
170
  _search_bar->SetActiveEntry (_entry, section_id, search_string, (_entry == _home_entry));
169
171
 
170
172
  _entry->ForeachGroup (sigc::mem_fun (this, &PlacesView::OnGroupAdded));
171
 
  
 
173
 
172
174
  if (_entry != _home_entry)
173
175
    _entry->ForeachResult (sigc::mem_fun (this, &PlacesView::OnResultAdded));
174
176
 
312
314
    SetActiveEntry (_home_entry, section_id, search_string);
313
315
    return;
314
316
  }
315
 
  
 
317
 
316
318
  for (it = places.begin (); it != places.end (); ++it)
317
319
  {
318
320
    Place *place = static_cast<Place *> (*it);
367
369
  g_variant_builder_add (builder, "{sv}", "x", g_variant_new_int32 (geo.x));
368
370
  g_variant_builder_add (builder, "{sv}", "y", g_variant_new_int32 (geo.y));
369
371
  g_variant_builder_add (builder, "{sv}", "width", g_variant_new_int32 (geo.width));
370
 
  g_variant_builder_add (builder, "{sv}", "height", g_variant_new_int32 (geo.height)); 
 
372
  g_variant_builder_add (builder, "{sv}", "height", g_variant_new_int32 (geo.height));
371
373
}
372
374
 
373
375
//