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
=== modified file 'dash/CoverflowResultView.cpp'
--- dash/CoverflowResultView.cpp 2012-10-11 01:44:15 +0000
+++ dash/CoverflowResultView.cpp 2012-11-19 18:59:20 +0000
@@ -84,11 +84,11 @@
84 std::string const& icon_hint = result.icon_hint;84 std::string const& icon_hint = result.icon_hint;
85 std::string icon_name = !icon_hint.empty() ? icon_hint : ". GThemedIcon text-x-preview";85 std::string icon_name = !icon_hint.empty() ? icon_hint : ". GThemedIcon text-x-preview";
86 static const int element_size = style.GetTileHeight();86 static const int element_size = style.GetTileHeight();
87 87
88 icon_texture_ = new IconTexture(icon_name.c_str(), element_size, true);88 icon_texture_ = new IconTexture(icon_name.c_str(), element_size, true);
89 icon_texture_->SinkReference();89 icon_texture_->SinkReference();
90 icon_texture_->LoadIcon();90 icon_texture_->LoadIcon();
91 91
92 icon_texture_->texture_updated.connect([&] (nux::BaseTexture *texture)92 icon_texture_->texture_updated.connect([&] (nux::BaseTexture *texture)
93 {93 {
94 if (parent_)94 if (parent_)
@@ -168,7 +168,7 @@
168 glib::String proposed_unique_id;168 glib::String proposed_unique_id;
169169
170 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);170 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);
171 171
172 if (proposed_unique_id.Str() != parent_->unique_id())172 if (proposed_unique_id.Str() != parent_->unique_id())
173 return;173 return;
174174
@@ -176,7 +176,7 @@
176 int current_index = GetIndexForUri(uri);176 int current_index = GetIndexForUri(uri);
177 if (nav_mode == -1) // left177 if (nav_mode == -1) // left
178 {178 {
179 current_index--; 179 current_index--;
180 }180 }
181 else if (nav_mode == 1) // right181 else if (nav_mode == 1) // right
182 {182 {
@@ -187,7 +187,7 @@
187 {187 {
188 return;188 return;
189 }189 }
190 190
191 if (nav_mode)191 if (nav_mode)
192 {192 {
193 std::string uri = GetUriForIndex(current_index);193 std::string uri = GetUriForIndex(current_index);
@@ -198,7 +198,7 @@
198198
199CoverflowResultView::Impl::~Impl()199CoverflowResultView::Impl::~Impl()
200{200{
201 201
202}202}
203203
204int CoverflowResultView::Impl::GetIndexForUri(std::string uri)204int CoverflowResultView::Impl::GetIndexForUri(std::string uri)
@@ -228,7 +228,7 @@
228228
229CoverflowResultView::~CoverflowResultView()229CoverflowResultView::~CoverflowResultView()
230{230{
231 231
232}232}
233233
234void CoverflowResultView::SetModelRenderer(ResultRenderer* renderer)234void CoverflowResultView::SetModelRenderer(ResultRenderer* renderer)
@@ -254,7 +254,7 @@
254 pimpl->coverflow_->model()->RemoveItem(item);254 pimpl->coverflow_->model()->RemoveItem(item);
255 break;255 break;
256 }256 }
257 } 257 }
258}258}
259259
260void CoverflowResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)260void CoverflowResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
@@ -280,7 +280,7 @@
280280
281 GfxContext.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);281 GfxContext.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
282 }282 }
283 283
284 if (GetCompositionLayout())284 if (GetCompositionLayout())
285 {285 {
286 nux::Geometry geo = GetCompositionLayout()->GetGeometry();286 nux::Geometry geo = GetCompositionLayout()->GetGeometry();
287287
=== modified file 'dash/CoverflowResultView.h'
--- dash/CoverflowResultView.h 2012-10-11 01:44:15 +0000
+++ dash/CoverflowResultView.h 2012-11-19 18:59:20 +0000
@@ -39,7 +39,7 @@
3939
40 virtual void AddResult(Result& result);40 virtual void AddResult(Result& result);
41 virtual void RemoveResult(Result& result);41 virtual void RemoveResult(Result& result);
42 42
43 virtual void Activate(std::string const& uri, int index, ActivateType type);43 virtual void Activate(std::string const& uri, int index, ActivateType type);
4444
45protected:45protected:
@@ -51,9 +51,9 @@
51private:51private:
52 struct Impl;52 struct Impl;
53 Impl* pimpl;53 Impl* pimpl;
54};
55
56}
57}
58
59#endif
60\ No newline at end of file54\ No newline at end of file
55};
56
57}
58}
59
60#endif
6161
=== modified file 'dash/DashController.cpp'
--- dash/DashController.cpp 2012-11-08 09:12:24 +0000
+++ dash/DashController.cpp 2012-11-19 18:59:20 +0000
@@ -83,7 +83,7 @@
83 {83 {
84 // Relayout here so the input window size updates.84 // Relayout here so the input window size updates.
85 Relayout();85 Relayout();
86 86
87 window_->PushToFront();87 window_->PushToFront();
88 window_->SetInputFocus();88 window_->SetInputFocus();
89 nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus());89 nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus());
@@ -443,7 +443,7 @@
443 {443 {
444 LOG_WARNING(logger) << "Object registration failed. Dash DBus interface not available.";444 LOG_WARNING(logger) << "Object registration failed. Dash DBus interface not available.";
445 }445 }
446 446
447 g_dbus_node_info_unref(introspection_data);447 g_dbus_node_info_unref(introspection_data);
448 }448 }
449}449}
450450
=== modified file 'dash/DashView.cpp'
--- dash/DashView.cpp 2012-11-14 08:57:56 +0000
+++ dash/DashView.cpp 2012-11-19 18:59:20 +0000
@@ -266,10 +266,10 @@
266 AddChild(preview_container_.GetPointer());266 AddChild(preview_container_.GetPointer());
267 preview_container_->SetParentObject(this);267 preview_container_->SetParentObject(this);
268 preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right268 preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right
269 269
270 preview_container_->SetGeometry(layout_->GetGeometry());270 preview_container_->SetGeometry(layout_->GetGeometry());
271 preview_displaying_ = true;271 preview_displaying_ = true;
272 272
273 // connect to nav left/right signals to request nav left/right movement.273 // connect to nav left/right signals to request nav left/right movement.
274 preview_container_->navigate_left.connect([&] () {274 preview_container_->navigate_left.connect([&] () {
275 preview_navigation_mode_ = previews::Navigation::LEFT;275 preview_navigation_mode_ = previews::Navigation::LEFT;
@@ -281,7 +281,7 @@
281281
282 preview_container_->navigate_right.connect([&] () {282 preview_container_->navigate_right.connect([&] () {
283 preview_navigation_mode_ = previews::Navigation::RIGHT;283 preview_navigation_mode_ = previews::Navigation::RIGHT;
284 284
285 // sends a message to all result views, sending the the uri of the current preview result285 // sends a message to all result views, sending the the uri of the current preview result
286 // and the unique id of the result view that should be handling the results286 // and the unique id of the result view that should be handling the results
287 ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(iss)", 1, last_activated_uri_.c_str(), stored_activated_unique_id_.c_str()));287 ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(iss)", 1, last_activated_uri_.c_str(), stored_activated_unique_id_.c_str()));
@@ -531,7 +531,7 @@
531 auto& style = dash::Style::Instance();531 auto& style = dash::Style::Instance();
532532
533 renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());533 renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry());
534 534
535 nux::Geometry clip_geo = layout_->GetGeometry();535 nux::Geometry clip_geo = layout_->GetGeometry();
536 clip_geo.x += style.GetVSeparatorSize();536 clip_geo.x += style.GetVSeparatorSize();
537 graphics_engine.PushClippingRectangle(clip_geo);537 graphics_engine.PushClippingRectangle(clip_geo);
@@ -600,7 +600,7 @@
600 {600 {
601 layout_->ProcessDraw(graphics_engine, force_draw);601 layout_->ProcessDraw(graphics_engine, force_draw);
602 }602 }
603 603
604 // Animation effect rendering604 // Animation effect rendering
605 if (display_ghost || IsFullRedraw())605 if (display_ghost || IsFullRedraw())
606 {606 {
@@ -609,7 +609,7 @@
609 unsigned int current_dest_blend_factor;609 unsigned int current_dest_blend_factor;
610 graphics_engine.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);610 graphics_engine.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
611611
612 float ghost_opacity = 0.25f; 612 float ghost_opacity = 0.25f;
613 float tint_factor = 1.2f;613 float tint_factor = 1.2f;
614 float saturation_ref = 0.4f;614 float saturation_ref = 0.4f;
615 nux::Color bg_color = background_color_;615 nux::Color bg_color = background_color_;
@@ -643,7 +643,7 @@
643 nux::Color(fade_out_value_, fade_out_value_, fade_out_value_, fade_out_value_)643 nux::Color(fade_out_value_, fade_out_value_, fade_out_value_, fade_out_value_)
644 );644 );
645 filter_width += active_lens_view_->filter_bar()->GetWidth();645 filter_width += active_lens_view_->filter_bar()->GetWidth();
646 } 646 }
647647
648 float saturation = fade_out_value_ + (1.0f - fade_out_value_) * saturation_ref;648 float saturation = fade_out_value_ + (1.0f - fade_out_value_) * saturation_ref;
649 float opacity = fade_out_value_ < ghost_opacity ? ghost_opacity : fade_out_value_;649 float opacity = fade_out_value_ < ghost_opacity ? ghost_opacity : fade_out_value_;
@@ -1186,7 +1186,7 @@
1186 search_bar_->search_string = "";1186 search_bar_->search_string = "";
1187 else1187 else
1188 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);1188 ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);
1189 1189
1190 return true;1190 return true;
1191 }1191 }
1192 return false;1192 return false;
@@ -1439,7 +1439,7 @@
14391439
1440nux::Geometry const& DashView::GetContentGeometry() const1440nux::Geometry const& DashView::GetContentGeometry() const
1441{1441{
1442 return content_geo_; 1442 return content_geo_;
1443}1443}
14441444
1445}1445}
14461446
=== modified file 'dash/FilterAllButton.cpp'
--- dash/FilterAllButton.cpp 2012-09-18 11:55:33 +0000
+++ dash/FilterAllButton.cpp 2012-11-19 18:59:20 +0000
@@ -38,7 +38,7 @@
38 SetInputEventSensitivity(false);38 SetInputEventSensitivity(false);
3939
40 state_change.connect(sigc::mem_fun(this, &FilterAllButton::OnStateChanged));40 state_change.connect(sigc::mem_fun(this, &FilterAllButton::OnStateChanged));
41 41
42 SetRedirectRenderingToTexture(true);42 SetRedirectRenderingToTexture(true);
43 //SetCopyPreviousFboTexture(false);43 //SetCopyPreviousFboTexture(false);
44 SetClearBeforeDraw(true);44 SetClearBeforeDraw(true);
4545
=== modified file 'dash/FilterRatingsButton.cpp'
--- dash/FilterRatingsButton.cpp 2012-09-06 05:36:00 +0000
+++ dash/FilterRatingsButton.cpp 2012-11-19 18:59:20 +0000
@@ -126,7 +126,7 @@
126126
127 for (int index = 0; index < num_stars; ++index)127 for (int index = 0; index < num_stars; ++index)
128 {128 {
129 Style& style = Style::Instance();129 Style& style = Style::Instance();
130 nux::BaseTexture* texture = style.GetStarSelectedIcon();130 nux::BaseTexture* texture = style.GetStarSelectedIcon();
131 if (index < total_full_stars)131 if (index < total_full_stars)
132 {132 {
133133
=== modified file 'dash/LensBar.cpp'
--- dash/LensBar.cpp 2012-11-08 09:12:24 +0000
+++ dash/LensBar.cpp 2012-11-19 18:59:20 +0000
@@ -234,8 +234,8 @@
234234
235 if (activate_previous && icon->IsVisible())235 if (activate_previous && icon->IsVisible())
236 {236 {
237 SetActive(icon);237 SetActive(icon);
238 return;238 return;
239 }239 }
240 if (icon->active)240 if (icon->active)
241 activate_previous = true;241 activate_previous = true;
242242
=== modified file 'dash/LensBarIcon.cpp'
--- dash/LensBarIcon.cpp 2012-09-06 05:36:00 +0000
+++ dash/LensBarIcon.cpp 2012-11-19 18:59:20 +0000
@@ -49,7 +49,7 @@
49 SetMaximumHeight(FOCUS_OVERLAY_HEIGHT);49 SetMaximumHeight(FOCUS_OVERLAY_HEIGHT);
5050
51 focus_layer_.reset(Style::Instance().FocusOverlay(FOCUS_OVERLAY_WIDTH, FOCUS_OVERLAY_HEIGHT));51 focus_layer_.reset(Style::Instance().FocusOverlay(FOCUS_OVERLAY_WIDTH, FOCUS_OVERLAY_HEIGHT));
52 52
53 SetOpacity(inactive_opacity_);53 SetOpacity(inactive_opacity_);
5454
55 SetAcceptKeyNavFocus(true);55 SetAcceptKeyNavFocus(true);
5656
=== modified file 'dash/LensView.cpp'
--- dash/LensView.cpp 2012-11-14 08:57:56 +0000
+++ dash/LensView.cpp 2012-11-19 18:59:20 +0000
@@ -155,12 +155,12 @@
155 lens_->connected.changed.connect([&](bool is_connected) { if (is_connected) initial_activation_ = true; });155 lens_->connected.changed.connect([&](bool is_connected) { if (is_connected) initial_activation_ = true; });
156 lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged));156 lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged));
157 search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string));157 search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string));
158 filters_expanded.changed.connect([&](bool expanded) 158 filters_expanded.changed.connect([&](bool expanded)
159 { 159 {
160 fscroll_view_->SetVisible(expanded); 160 fscroll_view_->SetVisible(expanded);
161 QueueRelayout(); 161 QueueRelayout();
162 OnColumnsChanged();162 OnColumnsChanged();
163 ubus_manager_.SendMessage(UBUS_REFINE_STATUS, 163 ubus_manager_.SendMessage(UBUS_REFINE_STATUS,
164 g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE));164 g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE));
165 });165 });
166 view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged));166 view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged));
@@ -360,7 +360,7 @@
360 {360 {
361 case ResultView::ActivateType::DIRECT:361 case ResultView::ActivateType::DIRECT:
362 {362 {
363 lens_->Activate(uri); 363 lens_->Activate(uri);
364 } break;364 } break;
365 case ResultView::ActivateType::PREVIEW:365 case ResultView::ActivateType::PREVIEW:
366 {366 {
@@ -370,7 +370,7 @@
370 };370 };
371371
372 }, unique_id));372 }, unique_id));
373 373
374374
375 /* Set up filter model for this category */375 /* Set up filter model for this category */
376 Results::Ptr results_model = lens_->results;376 Results::Ptr results_model = lens_->results;
377377
=== modified file 'dash/PlacesGroup.cpp'
--- dash/PlacesGroup.cpp 2012-11-08 16:49:26 +0000
+++ dash/PlacesGroup.cpp 2012-11-19 18:59:20 +0000
@@ -195,7 +195,7 @@
195 _name->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));195 _name->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
196 _expand_label->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));196 _expand_label->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
197 _expand_icon->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));197 _expand_icon->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
198 198
199 key_nav_focus_change.connect([&](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)199 key_nav_focus_change.connect([&](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
200 {200 {
201 if (!has_focus)201 if (!has_focus)
@@ -220,7 +220,7 @@
220 nux::TexCoordXForm texxform;220 nux::TexCoordXForm texxform;
221 if (status && _using_nofilters_background)221 if (status && _using_nofilters_background)
222 {222 {
223 _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(), 223 _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(),
224 texxform, 224 texxform,
225 nux::color::White,225 nux::color::White,
226 false,226 false,
@@ -229,12 +229,12 @@
229 }229 }
230 else if (!status && !_using_nofilters_background)230 else if (!status && !_using_nofilters_background)
231 {231 {
232 _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(), 232 _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(),
233 texxform, 233 texxform,
234 nux::color::White,234 nux::color::White,
235 false,235 false,
236 rop));236 rop));
237 237
238 _using_nofilters_background = true;238 _using_nofilters_background = true;
239 }239 }
240 QueueDraw();240 QueueDraw();
@@ -326,9 +326,9 @@
326 _group_layout->AddLayout(new nux::SpaceLayout(2,2,2,2), 0); // top padding326 _group_layout->AddLayout(new nux::SpaceLayout(2,2,2,2), 0); // top padding
327 _group_layout->AddLayout(layout, 1);327 _group_layout->AddLayout(layout, 1);
328328
329 view->results_per_row.changed.connect([&] (int results_per_row) 329 view->results_per_row.changed.connect([&] (int results_per_row)
330 {330 {
331 _n_visible_items_in_unexpand_mode = results_per_row; 331 _n_visible_items_in_unexpand_mode = results_per_row;
332 RefreshLabel();332 RefreshLabel();
333 });333 });
334334
@@ -420,7 +420,6 @@
420{420{
421 if (GetChildView())421 if (GetChildView())
422 {422 {
423
424423
425 Refresh();424 Refresh();
426 QueueDraw();425 QueueDraw();
@@ -473,7 +472,7 @@
473472
474 graphics_engine.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);473 graphics_engine.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
475 }474 }
476 475
477 if (ShouldBeHighlighted())476 if (ShouldBeHighlighted())
478 {477 {
479 nux::Geometry geo(_header_layout->GetGeometry());478 nux::Geometry geo(_header_layout->GetGeometry());
@@ -492,10 +491,10 @@
492 bg_width = _background->GetWidth();491 bg_width = _background->GetWidth();
493492
494 bg_geo.x = std::max(bg_geo.width - bg_width,0);493 bg_geo.x = std::max(bg_geo.width - bg_width,0);
495 494
496 bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 1; // to render into a space left over by the scrollview495 bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 1; // to render into a space left over by the scrollview
497 bg_geo.height = _background->GetHeight();496 bg_geo.height = _background->GetHeight();
498 497
499 _background_layer->SetGeometry(bg_geo);498 _background_layer->SetGeometry(bg_geo);
500 _background_layer->Renderlayer(graphics_engine);499 _background_layer->Renderlayer(graphics_engine);
501500
502501
=== modified file 'dash/PlacesGroup.h'
--- dash/PlacesGroup.h 2012-11-06 18:19:09 +0000
+++ dash/PlacesGroup.h 2012-11-19 18:59:20 +0000
@@ -142,7 +142,7 @@
142 unsigned _category_index;142 unsigned _category_index;
143 std::string _cached_name;143 std::string _cached_name;
144 nux::Geometry _cached_geometry;144 nux::Geometry _cached_geometry;
145 145
146 std::string _renderer_name;146 std::string _renderer_name;
147 bool _coverflow_enabled;147 bool _coverflow_enabled;
148148
149149
=== modified file 'dash/PreviewStateMachine.cpp'
--- dash/PreviewStateMachine.cpp 2012-10-29 09:34:54 +0000
+++ dash/PreviewStateMachine.cpp 2012-11-19 18:59:20 +0000
@@ -95,7 +95,7 @@
95 if (GetSplitPosition(LENS_BAR) < 0) return;95 if (GetSplitPosition(LENS_BAR) < 0) return;
96 if (GetSplitPosition(SEARCH_BAR) < 0) return;96 if (GetSplitPosition(SEARCH_BAR) < 0) return;
97 */97 */
98 98
99 if (left_results < 0 ||99 if (left_results < 0 ||
100 right_results < 0)100 right_results < 0)
101 return;101 return;
102102
=== modified file 'dash/PreviewStateMachine.h'
--- dash/PreviewStateMachine.h 2012-08-09 16:12:30 +0000
+++ dash/PreviewStateMachine.h 2012-11-19 18:59:20 +0000
@@ -53,7 +53,7 @@
53 nux::Property<bool> preview_active;53 nux::Property<bool> preview_active;
54 nux::Property<int> left_results;54 nux::Property<int> left_results;
55 nux::Property<int> right_results;55 nux::Property<int> right_results;
56 56
57 sigc::signal<void, Preview::Ptr> PreviewActivated;57 sigc::signal<void, Preview::Ptr> PreviewActivated;
5858
59private:59private:
6060
=== modified file 'dash/ResultView.cpp'
--- dash/ResultView.cpp 2012-11-06 18:19:09 +0000
+++ dash/ResultView.cpp 2012-11-19 18:59:20 +0000
@@ -223,7 +223,7 @@
223223
224 // clear children (no delete).224 // clear children (no delete).
225 RemoveAllChildren();225 RemoveAllChildren();
226 226
227 std::set<std::string> existing_results;227 std::set<std::string> existing_results;
228 // re-create list of children.228 // re-create list of children.
229 int index = 0;229 int index = 0;
@@ -279,7 +279,7 @@
279}279}
280280
281void ResultView::UpdateResultWrapper(debug::ResultWrapper* wrapper, Result const& result, int index)281void ResultView::UpdateResultWrapper(debug::ResultWrapper* wrapper, Result const& result, int index)
282{ 282{
283}283}
284284
285}285}
286286
=== modified file 'dash/ResultViewGrid.cpp'
--- dash/ResultViewGrid.cpp 2012-11-13 22:39:49 +0000
+++ dash/ResultViewGrid.cpp 2012-11-19 18:59:20 +0000
@@ -106,7 +106,7 @@
106 gchar* uri = NULL;106 gchar* uri = NULL;
107 gchar* proposed_unique_id = NULL;107 gchar* proposed_unique_id = NULL;
108 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);108 g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id);
109 109
110 if (std::string(proposed_unique_id) != unique_id())110 if (std::string(proposed_unique_id) != unique_id())
111 return;111 return;
112112
@@ -128,7 +128,7 @@
128 LOG_ERROR(logger) << "requested to activated a result that does not exist: " << current_index;128 LOG_ERROR(logger) << "requested to activated a result that does not exist: " << current_index;
129 return;129 return;
130 }130 }
131 131
132 // closed132 // closed
133 if (nav_mode == 0)133 if (nav_mode == 0)
134 {134 {
@@ -506,7 +506,7 @@
506 focused_uri_ = (*first_iter).uri;506 focused_uri_ = (*first_iter).uri;
507 selected_index_ = 0;507 selected_index_ = 0;
508 }508 }
509 509
510 int items_per_row = GetItemsPerRow();510 int items_per_row = GetItemsPerRow();
511 unsigned num_results = GetNumResults();511 unsigned num_results = GetNumResults();
512512
@@ -519,7 +519,7 @@
519 int total_rows = std::ceil(num_results / (double)items_per_row);519 int total_rows = std::ceil(num_results / (double)items_per_row);
520 selected_index_ = items_per_row * (total_rows-1);520 selected_index_ = items_per_row * (total_rows-1);
521 }521 }
522 522
523 if (direction != nux::KEY_NAV_NONE)523 if (direction != nux::KEY_NAV_NONE)
524 {524 {
525 std::tuple<int, int> focused_coord = GetResultPosition(selected_index_);525 std::tuple<int, int> focused_coord = GetResultPosition(selected_index_);
@@ -660,7 +660,7 @@
660 offset_x = 0;660 offset_x = 0;
661 offset_y = 0;661 offset_y = 0;
662 }662 }
663 663
664 nux::Geometry render_geo(x_position, y_position, renderer_->width, renderer_->height);664 nux::Geometry render_geo(x_position, y_position, renderer_->width, renderer_->height);
665 Result result(*GetIteratorAtRow(index));665 Result result(*GetIteratorAtRow(index));
666 renderer_->Render(GfxContext, result, state, render_geo, offset_x, offset_y);666 renderer_->Render(GfxContext, result, state, render_geo, offset_x, offset_y);
@@ -764,7 +764,7 @@
764 int items_per_row = GetItemsPerRow();764 int items_per_row = GetItemsPerRow();
765 int column_size = renderer_->width + horizontal_spacing + extra_horizontal_spacing_;765 int column_size = renderer_->width + horizontal_spacing + extra_horizontal_spacing_;
766 int row_size = renderer_->height + vertical_spacing;766 int row_size = renderer_->height + vertical_spacing;
767 767
768 int y = row_size * (index / items_per_row) + padding;768 int y = row_size * (index / items_per_row) + padding;
769 int x = column_size * (index % items_per_row) + padding;769 int x = column_size * (index % items_per_row) + padding;
770770
771771
=== modified file 'dash/ResultViewGrid.h'
--- dash/ResultViewGrid.h 2012-11-06 18:19:09 +0000
+++ dash/ResultViewGrid.h 2012-11-19 18:59:20 +0000
@@ -52,7 +52,7 @@
5252
53 int GetSelectedIndex();53 int GetSelectedIndex();
54 virtual unsigned GetIndexAtPosition(int x, int y);54 virtual unsigned GetIndexAtPosition(int x, int y);
55 55
56 virtual void Activate(std::string const& uri, int index, ActivateType type);56 virtual void Activate(std::string const& uri, int index, ActivateType type);
5757
58protected:58protected: