Merge lp:~macslow/unity/unity.fix-841902-2 into lp:unity

Proposed by Mirco Müller
Status: Merged
Approved by: Michal Hruby
Approved revision: no longer in the source branch.
Merged at revision: 1843
Proposed branch: lp:~macslow/unity/unity.fix-841902-2
Merge into: lp:unity
Diff against target: 92 lines (+20/-6)
4 files modified
UnityCore/Filter.cpp (+2/-0)
plugins/unityshell/src/FilterFactory.cpp (+7/-2)
plugins/unityshell/src/FilterGenreWidget.cpp (+10/-3)
plugins/unityshell/src/FilterGenreWidget.h (+1/-1)
To merge this branch: bzr merge lp:~macslow/unity/unity.fix-841902-2
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+89004@code.launchpad.net

Description of the change

Fourth of fifth time I fix my stuff after the stuff in trunk changed below my feet after it was approved... having a fun wasting time :/

"The actual unity-part of the fix for LP: #841902. It needs lp:~macslow/libunity/libunity.fix-841902 and lp:~macslow/unity-lens-music/unity-lens-music.fix-841902 to be merged first."

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Let's hope it works this time, approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UnityCore/Filter.cpp'
2--- UnityCore/Filter.cpp 2011-08-05 12:41:18 +0000
3+++ UnityCore/Filter.cpp 2012-01-18 10:45:28 +0000
4@@ -89,6 +89,8 @@
5 return Filter::Ptr(new RadioOptionFilter(model, iter));
6 else if (renderer == "filter-checkoption")
7 return Filter::Ptr(new CheckOptionFilter(model, iter));
8+ else if (renderer == "filter-checkoption-compact")
9+ return Filter::Ptr(new CheckOptionFilter(model, iter));
10 else if (renderer == "filter-multirange")
11 return Filter::Ptr(new MultiRangeFilter(model, iter));
12 else
13
14=== modified file 'plugins/unityshell/src/FilterFactory.cpp'
15--- plugins/unityshell/src/FilterFactory.cpp 2012-01-10 13:48:38 +0000
16+++ plugins/unityshell/src/FilterFactory.cpp 2012-01-18 10:45:28 +0000
17@@ -35,6 +35,7 @@
18 const std::string renderer_type_ratings = "filter-ratings";
19 const std::string renderer_type_multirange = "filter-multirange";
20 const std::string renderer_type_check_options = "filter-checkoption";
21+ const std::string renderer_type_check_options_compact = "filter-checkoption-compact";
22 const std::string renderer_type_radio_options = "filter-radiooption";
23 }
24
25@@ -51,7 +52,11 @@
26 FilterWidget* widget = nullptr;
27 if (filter_type == renderer_type_check_options)
28 {
29- widget = new FilterGenre(NUX_TRACKER_LOCATION);
30+ widget = new FilterGenre(2, NUX_TRACKER_LOCATION);
31+ }
32+ else if (filter_type == renderer_type_check_options_compact)
33+ {
34+ widget = new FilterGenre(3, NUX_TRACKER_LOCATION);
35 }
36 else if (filter_type == renderer_type_ratings)
37 {
38@@ -63,7 +68,7 @@
39 }
40 else if (filter_type == renderer_type_radio_options)
41 {
42- widget = new FilterGenre(NUX_TRACKER_LOCATION);
43+ widget = new FilterGenre(2, NUX_TRACKER_LOCATION);
44 }
45 else
46 {
47
48=== modified file 'plugins/unityshell/src/FilterGenreWidget.cpp'
49--- plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-13 15:13:30 +0000
50+++ plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-18 10:45:28 +0000
51@@ -36,7 +36,7 @@
52
53 NUX_IMPLEMENT_OBJECT_TYPE(FilterGenre);
54
55-FilterGenre::FilterGenre(NUX_FILE_LINE_DECL)
56+FilterGenre::FilterGenre(int columns, NUX_FILE_LINE_DECL)
57 : FilterExpanderLabel(_("Categories"), NUX_FILE_LINE_PARAM)
58 {
59 InitTheme();
60@@ -46,10 +46,17 @@
61 genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION);
62 genre_layout_->ForceChildrenSize(true);
63 genre_layout_->MatchContentSize(true);
64- genre_layout_->SetSpaceBetweenChildren (7, 9);
65+ genre_layout_->SetSpaceBetweenChildren (9, 9);
66 genre_layout_->SetTopAndBottomPadding(12);
67 genre_layout_->EnablePartialVisibility(false);
68- genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 33);
69+ if (columns == 3)
70+ {
71+ genre_layout_->SetChildrenSize(92, 33);
72+ }
73+ else
74+ {
75+ genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 33);
76+ }
77
78 SetRightHandView(all_button_);
79 SetContents(genre_layout_);
80
81=== modified file 'plugins/unityshell/src/FilterGenreWidget.h'
82--- plugins/unityshell/src/FilterGenreWidget.h 2012-01-10 14:09:12 +0000
83+++ plugins/unityshell/src/FilterGenreWidget.h 2012-01-18 10:45:28 +0000
84@@ -45,7 +45,7 @@
85 {
86 NUX_DECLARE_OBJECT_TYPE(FilterGenre, FilterExpanderLabel);
87 public:
88- FilterGenre(NUX_FILE_LINE_PROTO);
89+ FilterGenre(int columns, NUX_FILE_LINE_PROTO);
90 virtual ~FilterGenre();
91
92 void SetFilter(Filter::Ptr const& filter);