Merge lp:~charon030/unity/fix-tabs-spaces into lp:unity

Proposed by Charon
Status: Merged
Approved by: Thomi Richards
Approved revision: no longer in the source branch.
Merged at revision: 2922
Proposed branch: lp:~charon030/unity/fix-tabs-spaces
Merge into: lp:unity
Diff against target: 518 lines (+61/-62)
16 files modified
dash/CoverflowResultView.cpp (+9/-9)
dash/CoverflowResultView.h (+7/-7)
dash/DashController.cpp (+2/-2)
dash/DashView.cpp (+9/-9)
dash/FilterAllButton.cpp (+1/-1)
dash/FilterRatingsButton.cpp (+1/-1)
dash/LensBar.cpp (+2/-2)
dash/LensBarIcon.cpp (+1/-1)
dash/LensView.cpp (+7/-7)
dash/PlacesGroup.cpp (+10/-11)
dash/PlacesGroup.h (+1/-1)
dash/PreviewStateMachine.cpp (+1/-1)
dash/PreviewStateMachine.h (+1/-1)
dash/ResultView.cpp (+2/-2)
dash/ResultViewGrid.cpp (+6/-6)
dash/ResultViewGrid.h (+1/-1)
To merge this branch: bzr merge lp:~charon030/unity/fix-tabs-spaces
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+134992@code.launchpad.net

Commit message

Whitespace cleanup in dash source files.

Description of the change

This is just simple code cleaning of the dash. I removed whitespace characters at the end of lines and replaced tabs with the correct amount of spaces.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/CoverflowResultView.cpp'
2--- dash/CoverflowResultView.cpp 2012-10-11 01:44:15 +0000
3+++ dash/CoverflowResultView.cpp 2012-11-19 18:59:20 +0000
4@@ -84,11 +84,11 @@
5 std::string const& icon_hint = result.icon_hint;
6 std::string icon_name = !icon_hint.empty() ? icon_hint : ". GThemedIcon text-x-preview";
7 static const int element_size = style.GetTileHeight();
8-
9+
10 icon_texture_ = new IconTexture(icon_name.c_str(), element_size, true);
11 icon_texture_->SinkReference();
12 icon_texture_->LoadIcon();
13-
14+
15 icon_texture_->texture_updated.connect([&] (nux::BaseTexture *texture)
16 {
17 if (parent_)
18@@ -168,7 +168,7 @@
19 glib::String proposed_unique_id;
20
21 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);
22-
23+
24 if (proposed_unique_id.Str() != parent_->unique_id())
25 return;
26
27@@ -176,7 +176,7 @@
28 int current_index = GetIndexForUri(uri);
29 if (nav_mode == -1) // left
30 {
31- current_index--;
32+ current_index--;
33 }
34 else if (nav_mode == 1) // right
35 {
36@@ -187,7 +187,7 @@
37 {
38 return;
39 }
40-
41+
42 if (nav_mode)
43 {
44 std::string uri = GetUriForIndex(current_index);
45@@ -198,7 +198,7 @@
46
47 CoverflowResultView::Impl::~Impl()
48 {
49-
50+
51 }
52
53 int CoverflowResultView::Impl::GetIndexForUri(std::string uri)
54@@ -228,7 +228,7 @@
55
56 CoverflowResultView::~CoverflowResultView()
57 {
58-
59+
60 }
61
62 void CoverflowResultView::SetModelRenderer(ResultRenderer* renderer)
63@@ -254,7 +254,7 @@
64 pimpl->coverflow_->model()->RemoveItem(item);
65 break;
66 }
67- }
68+ }
69 }
70
71 void CoverflowResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
72@@ -280,7 +280,7 @@
73
74 GfxContext.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
75 }
76-
77+
78 if (GetCompositionLayout())
79 {
80 nux::Geometry geo = GetCompositionLayout()->GetGeometry();
81
82=== modified file 'dash/CoverflowResultView.h'
83--- dash/CoverflowResultView.h 2012-10-11 01:44:15 +0000
84+++ dash/CoverflowResultView.h 2012-11-19 18:59:20 +0000
85@@ -39,7 +39,7 @@
86
87 virtual void AddResult(Result& result);
88 virtual void RemoveResult(Result& result);
89-
90+
91 virtual void Activate(std::string const& uri, int index, ActivateType type);
92
93 protected:
94@@ -51,9 +51,9 @@
95 private:
96 struct Impl;
97 Impl* pimpl;
98-};
99-
100-}
101-}
102-
103-#endif
104\ No newline at end of file
105+};
106+
107+}
108+}
109+
110+#endif
111
112=== modified file 'dash/DashController.cpp'
113--- dash/DashController.cpp 2012-11-08 09:12:24 +0000
114+++ dash/DashController.cpp 2012-11-19 18:59:20 +0000
115@@ -83,7 +83,7 @@
116 {
117 // Relayout here so the input window size updates.
118 Relayout();
119-
120+
121 window_->PushToFront();
122 window_->SetInputFocus();
123 nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus());
124@@ -443,7 +443,7 @@
125 {
126 LOG_WARNING(logger) << "Object registration failed. Dash DBus interface not available.";
127 }
128-
129+
130 g_dbus_node_info_unref(introspection_data);
131 }
132 }
133
134=== modified file 'dash/DashView.cpp'
135--- dash/DashView.cpp 2012-11-14 08:57:56 +0000
136+++ dash/DashView.cpp 2012-11-19 18:59:20 +0000
137@@ -266,10 +266,10 @@
138 AddChild(preview_container_.GetPointer());
139 preview_container_->SetParentObject(this);
140 preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right
141-
142+
143 preview_container_->SetGeometry(layout_->GetGeometry());
144 preview_displaying_ = true;
145-
146+
147 // connect to nav left/right signals to request nav left/right movement.
148 preview_container_->navigate_left.connect([&] () {
149 preview_navigation_mode_ = previews::Navigation::LEFT;
150@@ -281,7 +281,7 @@
151
152 preview_container_->navigate_right.connect([&] () {
153 preview_navigation_mode_ = previews::Navigation::RIGHT;
154-
155+
156 // sends a message to all result views, sending the the uri of the current preview result
157 // and the unique id of the result view that should be handling the results
158 ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(iss)", 1, last_activated_uri_.c_str(), stored_activated_unique_id_.c_str()));
159@@ -531,7 +531,7 @@
160 auto& style = dash::Style::Instance();
161
162 renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
163-
164+
165 nux::Geometry clip_geo = layout_->GetGeometry();
166 clip_geo.x += style.GetVSeparatorSize();
167 graphics_engine.PushClippingRectangle(clip_geo);
168@@ -600,7 +600,7 @@
169 {
170 layout_->ProcessDraw(graphics_engine, force_draw);
171 }
172-
173+
174 // Animation effect rendering
175 if (display_ghost || IsFullRedraw())
176 {
177@@ -609,7 +609,7 @@
178 unsigned int current_dest_blend_factor;
179 graphics_engine.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
180
181- float ghost_opacity = 0.25f;
182+ float ghost_opacity = 0.25f;
183 float tint_factor = 1.2f;
184 float saturation_ref = 0.4f;
185 nux::Color bg_color = background_color_;
186@@ -643,7 +643,7 @@
187 nux::Color(fade_out_value_, fade_out_value_, fade_out_value_, fade_out_value_)
188 );
189 filter_width += active_lens_view_->filter_bar()->GetWidth();
190- }
191+ }
192
193 float saturation = fade_out_value_ + (1.0f - fade_out_value_) * saturation_ref;
194 float opacity = fade_out_value_ < ghost_opacity ? ghost_opacity : fade_out_value_;
195@@ -1186,7 +1186,7 @@
196 search_bar_->search_string = "";
197 else
198 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);
199-
200+
201 return true;
202 }
203 return false;
204@@ -1439,7 +1439,7 @@
205
206 nux::Geometry const& DashView::GetContentGeometry() const
207 {
208- return content_geo_;
209+ return content_geo_;
210 }
211
212 }
213
214=== modified file 'dash/FilterAllButton.cpp'
215--- dash/FilterAllButton.cpp 2012-09-18 11:55:33 +0000
216+++ dash/FilterAllButton.cpp 2012-11-19 18:59:20 +0000
217@@ -38,7 +38,7 @@
218 SetInputEventSensitivity(false);
219
220 state_change.connect(sigc::mem_fun(this, &FilterAllButton::OnStateChanged));
221-
222+
223 SetRedirectRenderingToTexture(true);
224 //SetCopyPreviousFboTexture(false);
225 SetClearBeforeDraw(true);
226
227=== modified file 'dash/FilterRatingsButton.cpp'
228--- dash/FilterRatingsButton.cpp 2012-09-06 05:36:00 +0000
229+++ dash/FilterRatingsButton.cpp 2012-11-19 18:59:20 +0000
230@@ -126,7 +126,7 @@
231
232 for (int index = 0; index < num_stars; ++index)
233 {
234- Style& style = Style::Instance();
235+ Style& style = Style::Instance();
236 nux::BaseTexture* texture = style.GetStarSelectedIcon();
237 if (index < total_full_stars)
238 {
239
240=== modified file 'dash/LensBar.cpp'
241--- dash/LensBar.cpp 2012-11-08 09:12:24 +0000
242+++ dash/LensBar.cpp 2012-11-19 18:59:20 +0000
243@@ -234,8 +234,8 @@
244
245 if (activate_previous && icon->IsVisible())
246 {
247- SetActive(icon);
248- return;
249+ SetActive(icon);
250+ return;
251 }
252 if (icon->active)
253 activate_previous = true;
254
255=== modified file 'dash/LensBarIcon.cpp'
256--- dash/LensBarIcon.cpp 2012-09-06 05:36:00 +0000
257+++ dash/LensBarIcon.cpp 2012-11-19 18:59:20 +0000
258@@ -49,7 +49,7 @@
259 SetMaximumHeight(FOCUS_OVERLAY_HEIGHT);
260
261 focus_layer_.reset(Style::Instance().FocusOverlay(FOCUS_OVERLAY_WIDTH, FOCUS_OVERLAY_HEIGHT));
262-
263+
264 SetOpacity(inactive_opacity_);
265
266 SetAcceptKeyNavFocus(true);
267
268=== modified file 'dash/LensView.cpp'
269--- dash/LensView.cpp 2012-11-14 08:57:56 +0000
270+++ dash/LensView.cpp 2012-11-19 18:59:20 +0000
271@@ -155,12 +155,12 @@
272 lens_->connected.changed.connect([&](bool is_connected) { if (is_connected) initial_activation_ = true; });
273 lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged));
274 search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string));
275- filters_expanded.changed.connect([&](bool expanded)
276- {
277- fscroll_view_->SetVisible(expanded);
278- QueueRelayout();
279+ filters_expanded.changed.connect([&](bool expanded)
280+ {
281+ fscroll_view_->SetVisible(expanded);
282+ QueueRelayout();
283 OnColumnsChanged();
284- ubus_manager_.SendMessage(UBUS_REFINE_STATUS,
285+ ubus_manager_.SendMessage(UBUS_REFINE_STATUS,
286 g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE));
287 });
288 view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged));
289@@ -360,7 +360,7 @@
290 {
291 case ResultView::ActivateType::DIRECT:
292 {
293- lens_->Activate(uri);
294+ lens_->Activate(uri);
295 } break;
296 case ResultView::ActivateType::PREVIEW:
297 {
298@@ -370,7 +370,7 @@
299 };
300
301 }, unique_id));
302-
303+
304
305 /* Set up filter model for this category */
306 Results::Ptr results_model = lens_->results;
307
308=== modified file 'dash/PlacesGroup.cpp'
309--- dash/PlacesGroup.cpp 2012-11-08 16:49:26 +0000
310+++ dash/PlacesGroup.cpp 2012-11-19 18:59:20 +0000
311@@ -195,7 +195,7 @@
312 _name->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
313 _expand_label->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
314 _expand_icon->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
315-
316+
317 key_nav_focus_change.connect([&](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
318 {
319 if (!has_focus)
320@@ -220,7 +220,7 @@
321 nux::TexCoordXForm texxform;
322 if (status && _using_nofilters_background)
323 {
324- _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(),
325+ _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(),
326 texxform,
327 nux::color::White,
328 false,
329@@ -229,12 +229,12 @@
330 }
331 else if (!status && !_using_nofilters_background)
332 {
333- _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(),
334- texxform,
335+ _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(),
336+ texxform,
337 nux::color::White,
338 false,
339 rop));
340-
341+
342 _using_nofilters_background = true;
343 }
344 QueueDraw();
345@@ -326,9 +326,9 @@
346 _group_layout->AddLayout(new nux::SpaceLayout(2,2,2,2), 0); // top padding
347 _group_layout->AddLayout(layout, 1);
348
349- view->results_per_row.changed.connect([&] (int results_per_row)
350+ view->results_per_row.changed.connect([&] (int results_per_row)
351 {
352- _n_visible_items_in_unexpand_mode = results_per_row;
353+ _n_visible_items_in_unexpand_mode = results_per_row;
354 RefreshLabel();
355 });
356
357@@ -420,7 +420,6 @@
358 {
359 if (GetChildView())
360 {
361-
362
363 Refresh();
364 QueueDraw();
365@@ -473,7 +472,7 @@
366
367 graphics_engine.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
368 }
369-
370+
371 if (ShouldBeHighlighted())
372 {
373 nux::Geometry geo(_header_layout->GetGeometry());
374@@ -492,10 +491,10 @@
375 bg_width = _background->GetWidth();
376
377 bg_geo.x = std::max(bg_geo.width - bg_width,0);
378-
379+
380 bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 1; // to render into a space left over by the scrollview
381 bg_geo.height = _background->GetHeight();
382-
383+
384 _background_layer->SetGeometry(bg_geo);
385 _background_layer->Renderlayer(graphics_engine);
386
387
388=== modified file 'dash/PlacesGroup.h'
389--- dash/PlacesGroup.h 2012-11-06 18:19:09 +0000
390+++ dash/PlacesGroup.h 2012-11-19 18:59:20 +0000
391@@ -142,7 +142,7 @@
392 unsigned _category_index;
393 std::string _cached_name;
394 nux::Geometry _cached_geometry;
395-
396+
397 std::string _renderer_name;
398 bool _coverflow_enabled;
399
400
401=== modified file 'dash/PreviewStateMachine.cpp'
402--- dash/PreviewStateMachine.cpp 2012-10-29 09:34:54 +0000
403+++ dash/PreviewStateMachine.cpp 2012-11-19 18:59:20 +0000
404@@ -95,7 +95,7 @@
405 if (GetSplitPosition(LENS_BAR) < 0) return;
406 if (GetSplitPosition(SEARCH_BAR) < 0) return;
407 */
408-
409+
410 if (left_results < 0 ||
411 right_results < 0)
412 return;
413
414=== modified file 'dash/PreviewStateMachine.h'
415--- dash/PreviewStateMachine.h 2012-08-09 16:12:30 +0000
416+++ dash/PreviewStateMachine.h 2012-11-19 18:59:20 +0000
417@@ -53,7 +53,7 @@
418 nux::Property<bool> preview_active;
419 nux::Property<int> left_results;
420 nux::Property<int> right_results;
421-
422+
423 sigc::signal<void, Preview::Ptr> PreviewActivated;
424
425 private:
426
427=== modified file 'dash/ResultView.cpp'
428--- dash/ResultView.cpp 2012-11-06 18:19:09 +0000
429+++ dash/ResultView.cpp 2012-11-19 18:59:20 +0000
430@@ -223,7 +223,7 @@
431
432 // clear children (no delete).
433 RemoveAllChildren();
434-
435+
436 std::set<std::string> existing_results;
437 // re-create list of children.
438 int index = 0;
439@@ -279,7 +279,7 @@
440 }
441
442 void ResultView::UpdateResultWrapper(debug::ResultWrapper* wrapper, Result const& result, int index)
443-{
444+{
445 }
446
447 }
448
449=== modified file 'dash/ResultViewGrid.cpp'
450--- dash/ResultViewGrid.cpp 2012-11-13 22:39:49 +0000
451+++ dash/ResultViewGrid.cpp 2012-11-19 18:59:20 +0000
452@@ -106,7 +106,7 @@
453 gchar* uri = NULL;
454 gchar* proposed_unique_id = NULL;
455 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);
456-
457+
458 if (std::string(proposed_unique_id) != unique_id())
459 return;
460
461@@ -128,7 +128,7 @@
462 LOG_ERROR(logger) << "requested to activated a result that does not exist: " << current_index;
463 return;
464 }
465-
466+
467 // closed
468 if (nav_mode == 0)
469 {
470@@ -506,7 +506,7 @@
471 focused_uri_ = (*first_iter).uri;
472 selected_index_ = 0;
473 }
474-
475+
476 int items_per_row = GetItemsPerRow();
477 unsigned num_results = GetNumResults();
478
479@@ -519,7 +519,7 @@
480 int total_rows = std::ceil(num_results / (double)items_per_row);
481 selected_index_ = items_per_row * (total_rows-1);
482 }
483-
484+
485 if (direction != nux::KEY_NAV_NONE)
486 {
487 std::tuple<int, int> focused_coord = GetResultPosition(selected_index_);
488@@ -660,7 +660,7 @@
489 offset_x = 0;
490 offset_y = 0;
491 }
492-
493+
494 nux::Geometry render_geo(x_position, y_position, renderer_->width, renderer_->height);
495 Result result(*GetIteratorAtRow(index));
496 renderer_->Render(GfxContext, result, state, render_geo, offset_x, offset_y);
497@@ -764,7 +764,7 @@
498 int items_per_row = GetItemsPerRow();
499 int column_size = renderer_->width + horizontal_spacing + extra_horizontal_spacing_;
500 int row_size = renderer_->height + vertical_spacing;
501-
502+
503 int y = row_size * (index / items_per_row) + padding;
504 int x = column_size * (index % items_per_row) + padding;
505
506
507=== modified file 'dash/ResultViewGrid.h'
508--- dash/ResultViewGrid.h 2012-11-06 18:19:09 +0000
509+++ dash/ResultViewGrid.h 2012-11-19 18:59:20 +0000
510@@ -52,7 +52,7 @@
511
512 int GetSelectedIndex();
513 virtual unsigned GetIndexAtPosition(int x, int y);
514-
515+
516 virtual void Activate(std::string const& uri, int index, ActivateType type);
517
518 protected: