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

« back to all changes in this revision

Viewing changes to src/PlacesView.cpp

  • Committer: Neil Jagdish Patel
  • Date: 2011-02-09 12:24:11 UTC
  • mto: (831.4.2 unity.fix-scrolling)
  • mto: This revision was merged to the branch mainline in revision 844.
  • Revision ID: neil.patel@canonical.com-20110209122411-5bk6xej9p7xlzs83
Lots of fixes in views

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  _results_controller->SetView (_results_view);
59
59
  _layered_layout->AddLayer (_results_view);
60
60
 
 
61
  _layered_layout->SetActiveLayer (_home_view);
 
62
 
61
63
  SetCompositionLayout (_layout);
62
64
 
63
65
  // Register for all the events
109
111
  if (_entry)
110
112
  {
111
113
    _entry->SetActive (false);
 
114
 
112
115
    g_signal_handler_disconnect (_entry->GetGroupsModel (), _group_added_id);
113
116
    g_signal_handler_disconnect (_entry->GetGroupsModel (), _group_removed_id);
114
117
    g_signal_handler_disconnect (_entry->GetResultsModel (), _result_added_id);
118
121
 
119
122
    _results_controller->Clear ();
120
123
  }
121
 
 
 
124
  
122
125
  _entry = entry;
123
126
  
124
127
  if (_entry)
125
128
  {
126
129
    std::map <gchar*, gchar*> hints;
127
 
    DeeModel     *groups;
 
130
    DeeModel     *groups, *results;
128
131
    DeeModelIter *iter, *last;
129
132
 
130
133
    _entry->SetActive (true);
140
143
      iter = dee_model_next (groups, iter);
141
144
    }
142
145
 
 
146
    results = _entry->GetResultsModel ();
 
147
    iter = dee_model_get_first_iter (results);
 
148
    last = dee_model_get_last_iter (results);
 
149
    while (iter != last)
 
150
    {
 
151
      OnResultAdded (results, iter, this);
 
152
      iter = dee_model_next (results, iter);
 
153
    }
 
154
 
143
155
    _group_added_id = g_signal_connect (_entry->GetGroupsModel (), "row-added",
144
156
                                        (GCallback)&PlacesView::OnGroupAdded, this);
145
157
    _group_removed_id = g_signal_connect (_entry->GetGroupsModel (), "row-removed",
148
160
                                         (GCallback)&PlacesView::OnResultAdded, this);
149
161
    _result_removed_id = g_signal_connect (_entry->GetResultsModel (), "row-removed",
150
162
                                           (GCallback)&PlacesView::OnResultRemoved, this);
151
 
  }
 
163
 
 
164
    _layered_layout->SetActiveLayer (_results_view);
 
165
  }
 
166
  else
 
167
  {
 
168
    _layered_layout->SetActiveLayer (_home_view);
 
169
  }
 
170
 
152
171
  _search_bar->SetActiveEntry (_entry, section_id, search_string);
153
172
 
154
173
  if (signal)