Merge lp:~charon030/unity/fix-tabs-spaces into lp:unity
- fix-tabs-spaces
- Merge into trunk
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 |
Related bugs: |
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 | 84 | std::string const& icon_hint = result.icon_hint; | 84 | std::string const& icon_hint = result.icon_hint; |
6 | 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"; |
7 | 86 | static const int element_size = style.GetTileHeight(); | 86 | static const int element_size = style.GetTileHeight(); |
9 | 87 | 87 | ||
10 | 88 | icon_texture_ = new IconTexture(icon_name.c_str(), element_size, true); | 88 | icon_texture_ = new IconTexture(icon_name.c_str(), element_size, true); |
11 | 89 | icon_texture_->SinkReference(); | 89 | icon_texture_->SinkReference(); |
12 | 90 | icon_texture_->LoadIcon(); | 90 | icon_texture_->LoadIcon(); |
14 | 91 | 91 | ||
15 | 92 | icon_texture_->texture_updated.connect([&] (nux::BaseTexture *texture) | 92 | icon_texture_->texture_updated.connect([&] (nux::BaseTexture *texture) |
16 | 93 | { | 93 | { |
17 | 94 | if (parent_) | 94 | if (parent_) |
18 | @@ -168,7 +168,7 @@ | |||
19 | 168 | glib::String proposed_unique_id; | 168 | glib::String proposed_unique_id; |
20 | 169 | 169 | ||
21 | 170 | g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id); | 170 | g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id); |
23 | 171 | 171 | ||
24 | 172 | if (proposed_unique_id.Str() != parent_->unique_id()) | 172 | if (proposed_unique_id.Str() != parent_->unique_id()) |
25 | 173 | return; | 173 | return; |
26 | 174 | 174 | ||
27 | @@ -176,7 +176,7 @@ | |||
28 | 176 | int current_index = GetIndexForUri(uri); | 176 | int current_index = GetIndexForUri(uri); |
29 | 177 | if (nav_mode == -1) // left | 177 | if (nav_mode == -1) // left |
30 | 178 | { | 178 | { |
32 | 179 | current_index--; | 179 | current_index--; |
33 | 180 | } | 180 | } |
34 | 181 | else if (nav_mode == 1) // right | 181 | else if (nav_mode == 1) // right |
35 | 182 | { | 182 | { |
36 | @@ -187,7 +187,7 @@ | |||
37 | 187 | { | 187 | { |
38 | 188 | return; | 188 | return; |
39 | 189 | } | 189 | } |
41 | 190 | 190 | ||
42 | 191 | if (nav_mode) | 191 | if (nav_mode) |
43 | 192 | { | 192 | { |
44 | 193 | std::string uri = GetUriForIndex(current_index); | 193 | std::string uri = GetUriForIndex(current_index); |
45 | @@ -198,7 +198,7 @@ | |||
46 | 198 | 198 | ||
47 | 199 | CoverflowResultView::Impl::~Impl() | 199 | CoverflowResultView::Impl::~Impl() |
48 | 200 | { | 200 | { |
50 | 201 | 201 | ||
51 | 202 | } | 202 | } |
52 | 203 | 203 | ||
53 | 204 | int CoverflowResultView::Impl::GetIndexForUri(std::string uri) | 204 | int CoverflowResultView::Impl::GetIndexForUri(std::string uri) |
54 | @@ -228,7 +228,7 @@ | |||
55 | 228 | 228 | ||
56 | 229 | CoverflowResultView::~CoverflowResultView() | 229 | CoverflowResultView::~CoverflowResultView() |
57 | 230 | { | 230 | { |
59 | 231 | 231 | ||
60 | 232 | } | 232 | } |
61 | 233 | 233 | ||
62 | 234 | void CoverflowResultView::SetModelRenderer(ResultRenderer* renderer) | 234 | void CoverflowResultView::SetModelRenderer(ResultRenderer* renderer) |
63 | @@ -254,7 +254,7 @@ | |||
64 | 254 | pimpl->coverflow_->model()->RemoveItem(item); | 254 | pimpl->coverflow_->model()->RemoveItem(item); |
65 | 255 | break; | 255 | break; |
66 | 256 | } | 256 | } |
68 | 257 | } | 257 | } |
69 | 258 | } | 258 | } |
70 | 259 | 259 | ||
71 | 260 | void CoverflowResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) | 260 | void CoverflowResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) |
72 | @@ -280,7 +280,7 @@ | |||
73 | 280 | 280 | ||
74 | 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); |
75 | 282 | } | 282 | } |
77 | 283 | 283 | ||
78 | 284 | if (GetCompositionLayout()) | 284 | if (GetCompositionLayout()) |
79 | 285 | { | 285 | { |
80 | 286 | nux::Geometry geo = GetCompositionLayout()->GetGeometry(); | 286 | nux::Geometry geo = GetCompositionLayout()->GetGeometry(); |
81 | 287 | 287 | ||
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 | 39 | 39 | ||
87 | 40 | virtual void AddResult(Result& result); | 40 | virtual void AddResult(Result& result); |
88 | 41 | virtual void RemoveResult(Result& result); | 41 | virtual void RemoveResult(Result& result); |
90 | 42 | 42 | ||
91 | 43 | virtual void Activate(std::string const& uri, int index, ActivateType type); | 43 | virtual void Activate(std::string const& uri, int index, ActivateType type); |
92 | 44 | 44 | ||
93 | 45 | protected: | 45 | protected: |
94 | @@ -51,9 +51,9 @@ | |||
95 | 51 | private: | 51 | private: |
96 | 52 | struct Impl; | 52 | struct Impl; |
97 | 53 | Impl* pimpl; | 53 | Impl* pimpl; |
98 | 54 | }; | ||
99 | 55 | |||
100 | 56 | } | ||
101 | 57 | } | ||
102 | 58 | |||
103 | 59 | #endif | ||
104 | 60 | \ No newline at end of file | 54 | \ No newline at end of file |
105 | 55 | }; | ||
106 | 56 | |||
107 | 57 | } | ||
108 | 58 | } | ||
109 | 59 | |||
110 | 60 | #endif | ||
111 | 61 | 61 | ||
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 | 83 | { | 83 | { |
117 | 84 | // Relayout here so the input window size updates. | 84 | // Relayout here so the input window size updates. |
118 | 85 | Relayout(); | 85 | Relayout(); |
120 | 86 | 86 | ||
121 | 87 | window_->PushToFront(); | 87 | window_->PushToFront(); |
122 | 88 | window_->SetInputFocus(); | 88 | window_->SetInputFocus(); |
123 | 89 | nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus()); | 89 | nux::GetWindowCompositor().SetKeyFocusArea(view_->default_focus()); |
124 | @@ -443,7 +443,7 @@ | |||
125 | 443 | { | 443 | { |
126 | 444 | LOG_WARNING(logger) << "Object registration failed. Dash DBus interface not available."; | 444 | LOG_WARNING(logger) << "Object registration failed. Dash DBus interface not available."; |
127 | 445 | } | 445 | } |
129 | 446 | 446 | ||
130 | 447 | g_dbus_node_info_unref(introspection_data); | 447 | g_dbus_node_info_unref(introspection_data); |
131 | 448 | } | 448 | } |
132 | 449 | } | 449 | } |
133 | 450 | 450 | ||
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 | 266 | AddChild(preview_container_.GetPointer()); | 266 | AddChild(preview_container_.GetPointer()); |
139 | 267 | preview_container_->SetParentObject(this); | 267 | preview_container_->SetParentObject(this); |
140 | 268 | preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right | 268 | preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right |
142 | 269 | 269 | ||
143 | 270 | preview_container_->SetGeometry(layout_->GetGeometry()); | 270 | preview_container_->SetGeometry(layout_->GetGeometry()); |
144 | 271 | preview_displaying_ = true; | 271 | preview_displaying_ = true; |
146 | 272 | 272 | ||
147 | 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. |
148 | 274 | preview_container_->navigate_left.connect([&] () { | 274 | preview_container_->navigate_left.connect([&] () { |
149 | 275 | preview_navigation_mode_ = previews::Navigation::LEFT; | 275 | preview_navigation_mode_ = previews::Navigation::LEFT; |
150 | @@ -281,7 +281,7 @@ | |||
151 | 281 | 281 | ||
152 | 282 | preview_container_->navigate_right.connect([&] () { | 282 | preview_container_->navigate_right.connect([&] () { |
153 | 283 | preview_navigation_mode_ = previews::Navigation::RIGHT; | 283 | preview_navigation_mode_ = previews::Navigation::RIGHT; |
155 | 284 | 284 | ||
156 | 285 | // sends a message to all result views, sending the the uri of the current preview result | 285 | // sends a message to all result views, sending the the uri of the current preview result |
157 | 286 | // and the unique id of the result view that should be handling the results | 286 | // and the unique id of the result view that should be handling the results |
158 | 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())); |
159 | @@ -531,7 +531,7 @@ | |||
160 | 531 | auto& style = dash::Style::Instance(); | 531 | auto& style = dash::Style::Instance(); |
161 | 532 | 532 | ||
162 | 533 | renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry()); | 533 | renderer_.DrawInner(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry()); |
164 | 534 | 534 | ||
165 | 535 | nux::Geometry clip_geo = layout_->GetGeometry(); | 535 | nux::Geometry clip_geo = layout_->GetGeometry(); |
166 | 536 | clip_geo.x += style.GetVSeparatorSize(); | 536 | clip_geo.x += style.GetVSeparatorSize(); |
167 | 537 | graphics_engine.PushClippingRectangle(clip_geo); | 537 | graphics_engine.PushClippingRectangle(clip_geo); |
168 | @@ -600,7 +600,7 @@ | |||
169 | 600 | { | 600 | { |
170 | 601 | layout_->ProcessDraw(graphics_engine, force_draw); | 601 | layout_->ProcessDraw(graphics_engine, force_draw); |
171 | 602 | } | 602 | } |
173 | 603 | 603 | ||
174 | 604 | // Animation effect rendering | 604 | // Animation effect rendering |
175 | 605 | if (display_ghost || IsFullRedraw()) | 605 | if (display_ghost || IsFullRedraw()) |
176 | 606 | { | 606 | { |
177 | @@ -609,7 +609,7 @@ | |||
178 | 609 | unsigned int current_dest_blend_factor; | 609 | unsigned int current_dest_blend_factor; |
179 | 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); |
180 | 611 | 611 | ||
182 | 612 | float ghost_opacity = 0.25f; | 612 | float ghost_opacity = 0.25f; |
183 | 613 | float tint_factor = 1.2f; | 613 | float tint_factor = 1.2f; |
184 | 614 | float saturation_ref = 0.4f; | 614 | float saturation_ref = 0.4f; |
185 | 615 | nux::Color bg_color = background_color_; | 615 | nux::Color bg_color = background_color_; |
186 | @@ -643,7 +643,7 @@ | |||
187 | 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_) |
188 | 644 | ); | 644 | ); |
189 | 645 | filter_width += active_lens_view_->filter_bar()->GetWidth(); | 645 | filter_width += active_lens_view_->filter_bar()->GetWidth(); |
191 | 646 | } | 646 | } |
192 | 647 | 647 | ||
193 | 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; |
194 | 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_; |
195 | @@ -1186,7 +1186,7 @@ | |||
196 | 1186 | search_bar_->search_string = ""; | 1186 | search_bar_->search_string = ""; |
197 | 1187 | else | 1187 | else |
198 | 1188 | ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST); | 1188 | ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST); |
200 | 1189 | 1189 | ||
201 | 1190 | return true; | 1190 | return true; |
202 | 1191 | } | 1191 | } |
203 | 1192 | return false; | 1192 | return false; |
204 | @@ -1439,7 +1439,7 @@ | |||
205 | 1439 | 1439 | ||
206 | 1440 | nux::Geometry const& DashView::GetContentGeometry() const | 1440 | nux::Geometry const& DashView::GetContentGeometry() const |
207 | 1441 | { | 1441 | { |
209 | 1442 | return content_geo_; | 1442 | return content_geo_; |
210 | 1443 | } | 1443 | } |
211 | 1444 | 1444 | ||
212 | 1445 | } | 1445 | } |
213 | 1446 | 1446 | ||
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 | 38 | SetInputEventSensitivity(false); | 38 | SetInputEventSensitivity(false); |
219 | 39 | 39 | ||
220 | 40 | state_change.connect(sigc::mem_fun(this, &FilterAllButton::OnStateChanged)); | 40 | state_change.connect(sigc::mem_fun(this, &FilterAllButton::OnStateChanged)); |
222 | 41 | 41 | ||
223 | 42 | SetRedirectRenderingToTexture(true); | 42 | SetRedirectRenderingToTexture(true); |
224 | 43 | //SetCopyPreviousFboTexture(false); | 43 | //SetCopyPreviousFboTexture(false); |
225 | 44 | SetClearBeforeDraw(true); | 44 | SetClearBeforeDraw(true); |
226 | 45 | 45 | ||
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 | 126 | 126 | ||
232 | 127 | for (int index = 0; index < num_stars; ++index) | 127 | for (int index = 0; index < num_stars; ++index) |
233 | 128 | { | 128 | { |
235 | 129 | Style& style = Style::Instance(); | 129 | Style& style = Style::Instance(); |
236 | 130 | nux::BaseTexture* texture = style.GetStarSelectedIcon(); | 130 | nux::BaseTexture* texture = style.GetStarSelectedIcon(); |
237 | 131 | if (index < total_full_stars) | 131 | if (index < total_full_stars) |
238 | 132 | { | 132 | { |
239 | 133 | 133 | ||
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 | 234 | 234 | ||
245 | 235 | if (activate_previous && icon->IsVisible()) | 235 | if (activate_previous && icon->IsVisible()) |
246 | 236 | { | 236 | { |
249 | 237 | SetActive(icon); | 237 | SetActive(icon); |
250 | 238 | return; | 238 | return; |
251 | 239 | } | 239 | } |
252 | 240 | if (icon->active) | 240 | if (icon->active) |
253 | 241 | activate_previous = true; | 241 | activate_previous = true; |
254 | 242 | 242 | ||
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 | 49 | SetMaximumHeight(FOCUS_OVERLAY_HEIGHT); | 49 | SetMaximumHeight(FOCUS_OVERLAY_HEIGHT); |
260 | 50 | 50 | ||
261 | 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)); |
263 | 52 | 52 | ||
264 | 53 | SetOpacity(inactive_opacity_); | 53 | SetOpacity(inactive_opacity_); |
265 | 54 | 54 | ||
266 | 55 | SetAcceptKeyNavFocus(true); | 55 | SetAcceptKeyNavFocus(true); |
267 | 56 | 56 | ||
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 | 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; }); |
273 | 156 | lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged)); | 156 | lens_->categories_reordered.connect(sigc::mem_fun(this, &LensView::OnCategoryOrderChanged)); |
274 | 157 | search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string)); | 157 | search_string.SetGetterFunction(sigc::mem_fun(this, &LensView::get_search_string)); |
279 | 158 | filters_expanded.changed.connect([&](bool expanded) | 158 | filters_expanded.changed.connect([&](bool expanded) |
280 | 159 | { | 159 | { |
281 | 160 | fscroll_view_->SetVisible(expanded); | 160 | fscroll_view_->SetVisible(expanded); |
282 | 161 | QueueRelayout(); | 161 | QueueRelayout(); |
283 | 162 | OnColumnsChanged(); | 162 | OnColumnsChanged(); |
285 | 163 | ubus_manager_.SendMessage(UBUS_REFINE_STATUS, | 163 | ubus_manager_.SendMessage(UBUS_REFINE_STATUS, |
286 | 164 | g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE)); | 164 | g_variant_new(UBUS_REFINE_STATUS_FORMAT_STRING, expanded ? TRUE : FALSE)); |
287 | 165 | }); | 165 | }); |
288 | 166 | view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged)); | 166 | view_type.changed.connect(sigc::mem_fun(this, &LensView::OnViewTypeChanged)); |
289 | @@ -360,7 +360,7 @@ | |||
290 | 360 | { | 360 | { |
291 | 361 | case ResultView::ActivateType::DIRECT: | 361 | case ResultView::ActivateType::DIRECT: |
292 | 362 | { | 362 | { |
294 | 363 | lens_->Activate(uri); | 363 | lens_->Activate(uri); |
295 | 364 | } break; | 364 | } break; |
296 | 365 | case ResultView::ActivateType::PREVIEW: | 365 | case ResultView::ActivateType::PREVIEW: |
297 | 366 | { | 366 | { |
298 | @@ -370,7 +370,7 @@ | |||
299 | 370 | }; | 370 | }; |
300 | 371 | 371 | ||
301 | 372 | }, unique_id)); | 372 | }, unique_id)); |
303 | 373 | 373 | ||
304 | 374 | 374 | ||
305 | 375 | /* Set up filter model for this category */ | 375 | /* Set up filter model for this category */ |
306 | 376 | Results::Ptr results_model = lens_->results; | 376 | Results::Ptr results_model = lens_->results; |
307 | 377 | 377 | ||
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 | 195 | _name->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick)); | 195 | _name->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick)); |
313 | 196 | _expand_label->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick)); | 196 | _expand_label->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick)); |
314 | 197 | _expand_icon->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick)); | 197 | _expand_icon->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick)); |
316 | 198 | 198 | ||
317 | 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) |
318 | 200 | { | 200 | { |
319 | 201 | if (!has_focus) | 201 | if (!has_focus) |
320 | @@ -220,7 +220,7 @@ | |||
321 | 220 | nux::TexCoordXForm texxform; | 220 | nux::TexCoordXForm texxform; |
322 | 221 | if (status && _using_nofilters_background) | 221 | if (status && _using_nofilters_background) |
323 | 222 | { | 222 | { |
325 | 223 | _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(), | 223 | _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(), |
326 | 224 | texxform, | 224 | texxform, |
327 | 225 | nux::color::White, | 225 | nux::color::White, |
328 | 226 | false, | 226 | false, |
329 | @@ -229,12 +229,12 @@ | |||
330 | 229 | } | 229 | } |
331 | 230 | else if (!status && !_using_nofilters_background) | 230 | else if (!status && !_using_nofilters_background) |
332 | 231 | { | 231 | { |
335 | 232 | _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(), | 232 | _background_layer.reset(new nux::TextureLayer(_background_nofilters->GetDeviceTexture(), |
336 | 233 | texxform, | 233 | texxform, |
337 | 234 | nux::color::White, | 234 | nux::color::White, |
338 | 235 | false, | 235 | false, |
339 | 236 | rop)); | 236 | rop)); |
341 | 237 | 237 | ||
342 | 238 | _using_nofilters_background = true; | 238 | _using_nofilters_background = true; |
343 | 239 | } | 239 | } |
344 | 240 | QueueDraw(); | 240 | QueueDraw(); |
345 | @@ -326,9 +326,9 @@ | |||
346 | 326 | _group_layout->AddLayout(new nux::SpaceLayout(2,2,2,2), 0); // top padding | 326 | _group_layout->AddLayout(new nux::SpaceLayout(2,2,2,2), 0); // top padding |
347 | 327 | _group_layout->AddLayout(layout, 1); | 327 | _group_layout->AddLayout(layout, 1); |
348 | 328 | 328 | ||
350 | 329 | view->results_per_row.changed.connect([&] (int results_per_row) | 329 | view->results_per_row.changed.connect([&] (int results_per_row) |
351 | 330 | { | 330 | { |
353 | 331 | _n_visible_items_in_unexpand_mode = results_per_row; | 331 | _n_visible_items_in_unexpand_mode = results_per_row; |
354 | 332 | RefreshLabel(); | 332 | RefreshLabel(); |
355 | 333 | }); | 333 | }); |
356 | 334 | 334 | ||
357 | @@ -420,7 +420,6 @@ | |||
358 | 420 | { | 420 | { |
359 | 421 | if (GetChildView()) | 421 | if (GetChildView()) |
360 | 422 | { | 422 | { |
361 | 423 | |||
362 | 424 | 423 | ||
363 | 425 | Refresh(); | 424 | Refresh(); |
364 | 426 | QueueDraw(); | 425 | QueueDraw(); |
365 | @@ -473,7 +472,7 @@ | |||
366 | 473 | 472 | ||
367 | 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); |
368 | 475 | } | 474 | } |
370 | 476 | 475 | ||
371 | 477 | if (ShouldBeHighlighted()) | 476 | if (ShouldBeHighlighted()) |
372 | 478 | { | 477 | { |
373 | 479 | nux::Geometry geo(_header_layout->GetGeometry()); | 478 | nux::Geometry geo(_header_layout->GetGeometry()); |
374 | @@ -492,10 +491,10 @@ | |||
375 | 492 | bg_width = _background->GetWidth(); | 491 | bg_width = _background->GetWidth(); |
376 | 493 | 492 | ||
377 | 494 | bg_geo.x = std::max(bg_geo.width - bg_width,0); | 493 | bg_geo.x = std::max(bg_geo.width - bg_width,0); |
379 | 495 | 494 | ||
380 | 496 | bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 1; // to render into a space left over by the scrollview | 495 | bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 1; // to render into a space left over by the scrollview |
381 | 497 | bg_geo.height = _background->GetHeight(); | 496 | bg_geo.height = _background->GetHeight(); |
383 | 498 | 497 | ||
384 | 499 | _background_layer->SetGeometry(bg_geo); | 498 | _background_layer->SetGeometry(bg_geo); |
385 | 500 | _background_layer->Renderlayer(graphics_engine); | 499 | _background_layer->Renderlayer(graphics_engine); |
386 | 501 | 500 | ||
387 | 502 | 501 | ||
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 | 142 | unsigned _category_index; | 142 | unsigned _category_index; |
393 | 143 | std::string _cached_name; | 143 | std::string _cached_name; |
394 | 144 | nux::Geometry _cached_geometry; | 144 | nux::Geometry _cached_geometry; |
396 | 145 | 145 | ||
397 | 146 | std::string _renderer_name; | 146 | std::string _renderer_name; |
398 | 147 | bool _coverflow_enabled; | 147 | bool _coverflow_enabled; |
399 | 148 | 148 | ||
400 | 149 | 149 | ||
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 | 95 | if (GetSplitPosition(LENS_BAR) < 0) return; | 95 | if (GetSplitPosition(LENS_BAR) < 0) return; |
406 | 96 | if (GetSplitPosition(SEARCH_BAR) < 0) return; | 96 | if (GetSplitPosition(SEARCH_BAR) < 0) return; |
407 | 97 | */ | 97 | */ |
409 | 98 | 98 | ||
410 | 99 | if (left_results < 0 || | 99 | if (left_results < 0 || |
411 | 100 | right_results < 0) | 100 | right_results < 0) |
412 | 101 | return; | 101 | return; |
413 | 102 | 102 | ||
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 | 53 | nux::Property<bool> preview_active; | 53 | nux::Property<bool> preview_active; |
419 | 54 | nux::Property<int> left_results; | 54 | nux::Property<int> left_results; |
420 | 55 | nux::Property<int> right_results; | 55 | nux::Property<int> right_results; |
422 | 56 | 56 | ||
423 | 57 | sigc::signal<void, Preview::Ptr> PreviewActivated; | 57 | sigc::signal<void, Preview::Ptr> PreviewActivated; |
424 | 58 | 58 | ||
425 | 59 | private: | 59 | private: |
426 | 60 | 60 | ||
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 | 223 | 223 | ||
432 | 224 | // clear children (no delete). | 224 | // clear children (no delete). |
433 | 225 | RemoveAllChildren(); | 225 | RemoveAllChildren(); |
435 | 226 | 226 | ||
436 | 227 | std::set<std::string> existing_results; | 227 | std::set<std::string> existing_results; |
437 | 228 | // re-create list of children. | 228 | // re-create list of children. |
438 | 229 | int index = 0; | 229 | int index = 0; |
439 | @@ -279,7 +279,7 @@ | |||
440 | 279 | } | 279 | } |
441 | 280 | 280 | ||
442 | 281 | void ResultView::UpdateResultWrapper(debug::ResultWrapper* wrapper, Result const& result, int index) | 281 | void ResultView::UpdateResultWrapper(debug::ResultWrapper* wrapper, Result const& result, int index) |
444 | 282 | { | 282 | { |
445 | 283 | } | 283 | } |
446 | 284 | 284 | ||
447 | 285 | } | 285 | } |
448 | 286 | 286 | ||
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 | 106 | gchar* uri = NULL; | 106 | gchar* uri = NULL; |
454 | 107 | gchar* proposed_unique_id = NULL; | 107 | gchar* proposed_unique_id = NULL; |
455 | 108 | g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id); | 108 | g_variant_get(data, "(iss)", &nav_mode, &uri, &proposed_unique_id); |
457 | 109 | 109 | ||
458 | 110 | if (std::string(proposed_unique_id) != unique_id()) | 110 | if (std::string(proposed_unique_id) != unique_id()) |
459 | 111 | return; | 111 | return; |
460 | 112 | 112 | ||
461 | @@ -128,7 +128,7 @@ | |||
462 | 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; |
463 | 129 | return; | 129 | return; |
464 | 130 | } | 130 | } |
466 | 131 | 131 | ||
467 | 132 | // closed | 132 | // closed |
468 | 133 | if (nav_mode == 0) | 133 | if (nav_mode == 0) |
469 | 134 | { | 134 | { |
470 | @@ -506,7 +506,7 @@ | |||
471 | 506 | focused_uri_ = (*first_iter).uri; | 506 | focused_uri_ = (*first_iter).uri; |
472 | 507 | selected_index_ = 0; | 507 | selected_index_ = 0; |
473 | 508 | } | 508 | } |
475 | 509 | 509 | ||
476 | 510 | int items_per_row = GetItemsPerRow(); | 510 | int items_per_row = GetItemsPerRow(); |
477 | 511 | unsigned num_results = GetNumResults(); | 511 | unsigned num_results = GetNumResults(); |
478 | 512 | 512 | ||
479 | @@ -519,7 +519,7 @@ | |||
480 | 519 | int total_rows = std::ceil(num_results / (double)items_per_row); | 519 | int total_rows = std::ceil(num_results / (double)items_per_row); |
481 | 520 | selected_index_ = items_per_row * (total_rows-1); | 520 | selected_index_ = items_per_row * (total_rows-1); |
482 | 521 | } | 521 | } |
484 | 522 | 522 | ||
485 | 523 | if (direction != nux::KEY_NAV_NONE) | 523 | if (direction != nux::KEY_NAV_NONE) |
486 | 524 | { | 524 | { |
487 | 525 | std::tuple<int, int> focused_coord = GetResultPosition(selected_index_); | 525 | std::tuple<int, int> focused_coord = GetResultPosition(selected_index_); |
488 | @@ -660,7 +660,7 @@ | |||
489 | 660 | offset_x = 0; | 660 | offset_x = 0; |
490 | 661 | offset_y = 0; | 661 | offset_y = 0; |
491 | 662 | } | 662 | } |
493 | 663 | 663 | ||
494 | 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); |
495 | 665 | Result result(*GetIteratorAtRow(index)); | 665 | Result result(*GetIteratorAtRow(index)); |
496 | 666 | renderer_->Render(GfxContext, result, state, render_geo, offset_x, offset_y); | 666 | renderer_->Render(GfxContext, result, state, render_geo, offset_x, offset_y); |
497 | @@ -764,7 +764,7 @@ | |||
498 | 764 | int items_per_row = GetItemsPerRow(); | 764 | int items_per_row = GetItemsPerRow(); |
499 | 765 | int column_size = renderer_->width + horizontal_spacing + extra_horizontal_spacing_; | 765 | int column_size = renderer_->width + horizontal_spacing + extra_horizontal_spacing_; |
500 | 766 | int row_size = renderer_->height + vertical_spacing; | 766 | int row_size = renderer_->height + vertical_spacing; |
502 | 767 | 767 | ||
503 | 768 | int y = row_size * (index / items_per_row) + padding; | 768 | int y = row_size * (index / items_per_row) + padding; |
504 | 769 | int x = column_size * (index % items_per_row) + padding; | 769 | int x = column_size * (index % items_per_row) + padding; |
505 | 770 | 770 | ||
506 | 771 | 771 | ||
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 | 52 | 52 | ||
512 | 53 | int GetSelectedIndex(); | 53 | int GetSelectedIndex(); |
513 | 54 | virtual unsigned GetIndexAtPosition(int x, int y); | 54 | virtual unsigned GetIndexAtPosition(int x, int y); |
515 | 55 | 55 | ||
516 | 56 | virtual void Activate(std::string const& uri, int index, ActivateType type); | 56 | virtual void Activate(std::string const& uri, int index, ActivateType type); |
517 | 57 | 57 | ||
518 | 58 | protected: | 58 | protected: |