~dylanmccall/unity/panel-drag-frontmost-maximized

« back to all changes in this revision

Viewing changes to src/PlacesSearchBar.cpp

  • Committer: Gord Allott
  • Date: 2011-03-10 15:21:45 UTC
  • mfrom: (918.8.5 keynav-fixes-11-03-07)
  • Revision ID: gord.allott@canonical.com-20110310152145-3ur561rrjgl6lwsc
updated keynav support, much better behaviour now

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
  _search_icon->SetMinMaxSize (icon->GetWidth (), icon->GetHeight ());
66
66
  _layout->AddView (_search_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
67
67
  _search_icon->OnMouseClick.connect (sigc::mem_fun (this, &PlacesSearchBar::OnClearClicked));
 
68
  _search_icon->SetCanFocus (false);
68
69
 
69
70
  _layered_layout = new nux::LayeredLayout ();
70
71
 
71
72
  _hint = new nux::StaticCairoText (" ");
72
73
  _hint->SetTextColor (nux::Color (1.0f, 1.0f, 1.0f, 0.5f));
 
74
  _hint->SetCanFocus (false);
73
75
  _layered_layout->AddLayer (_hint);
74
76
 
75
77
  _pango_entry = new nux::TextEntry ("", NUX_TRACKER_LOCATION);
76
78
  _pango_entry->sigTextChanged.connect (sigc::mem_fun (this, &PlacesSearchBar::OnSearchChanged));
 
79
  _pango_entry->SetCanFocus (true);
77
80
  _pango_entry->activated.connect (sigc::mem_fun (this, &PlacesSearchBar::OnEntryActivated));
78
81
  _layered_layout->AddLayer (_pango_entry);
79
82
 
87
90
  _combo->SetVisible (false);
88
91
  _combo->sigTriggered.connect (sigc::mem_fun (this, &PlacesSearchBar::OnComboChanged));
89
92
  _combo->GetMenuPage ()->sigMouseDownOutsideMenuCascade.connect (sigc::mem_fun (this, &PlacesSearchBar::OnMenuClosing));
 
93
  _combo->SetCanFocus (false); // NOT SUPPORTING THIS QUITE YET
90
94
  _layout->AddView (_combo, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
91
95
 
92
96
  _layout->SetVerticalExternalMargin (18);
119
123
  return "";
120
124
}
121
125
 
122
 
bool
123
 
PlacesSearchBar::CanFocus ()
124
 
{
125
 
  return false;
126
 
}
127
 
 
128
126
void PlacesSearchBar::AddProperties (GVariantBuilder *builder)
129
127
{
130
128
  nux::Geometry geo = GetGeometry ();