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
=== modified file 'UnityCore/Filter.cpp'
--- UnityCore/Filter.cpp 2011-08-05 12:41:18 +0000
+++ UnityCore/Filter.cpp 2012-01-18 10:45:28 +0000
@@ -89,6 +89,8 @@
89 return Filter::Ptr(new RadioOptionFilter(model, iter));89 return Filter::Ptr(new RadioOptionFilter(model, iter));
90 else if (renderer == "filter-checkoption")90 else if (renderer == "filter-checkoption")
91 return Filter::Ptr(new CheckOptionFilter(model, iter));91 return Filter::Ptr(new CheckOptionFilter(model, iter));
92 else if (renderer == "filter-checkoption-compact")
93 return Filter::Ptr(new CheckOptionFilter(model, iter));
92 else if (renderer == "filter-multirange")94 else if (renderer == "filter-multirange")
93 return Filter::Ptr(new MultiRangeFilter(model, iter));95 return Filter::Ptr(new MultiRangeFilter(model, iter));
94 else96 else
9597
=== modified file 'plugins/unityshell/src/FilterFactory.cpp'
--- plugins/unityshell/src/FilterFactory.cpp 2012-01-10 13:48:38 +0000
+++ plugins/unityshell/src/FilterFactory.cpp 2012-01-18 10:45:28 +0000
@@ -35,6 +35,7 @@
35 const std::string renderer_type_ratings = "filter-ratings";35 const std::string renderer_type_ratings = "filter-ratings";
36 const std::string renderer_type_multirange = "filter-multirange";36 const std::string renderer_type_multirange = "filter-multirange";
37 const std::string renderer_type_check_options = "filter-checkoption";37 const std::string renderer_type_check_options = "filter-checkoption";
38 const std::string renderer_type_check_options_compact = "filter-checkoption-compact";
38 const std::string renderer_type_radio_options = "filter-radiooption";39 const std::string renderer_type_radio_options = "filter-radiooption";
39}40}
4041
@@ -51,7 +52,11 @@
51 FilterWidget* widget = nullptr;52 FilterWidget* widget = nullptr;
52 if (filter_type == renderer_type_check_options)53 if (filter_type == renderer_type_check_options)
53 {54 {
54 widget = new FilterGenre(NUX_TRACKER_LOCATION);55 widget = new FilterGenre(2, NUX_TRACKER_LOCATION);
56 }
57 else if (filter_type == renderer_type_check_options_compact)
58 {
59 widget = new FilterGenre(3, NUX_TRACKER_LOCATION);
55 }60 }
56 else if (filter_type == renderer_type_ratings)61 else if (filter_type == renderer_type_ratings)
57 {62 {
@@ -63,7 +68,7 @@
63 }68 }
64 else if (filter_type == renderer_type_radio_options)69 else if (filter_type == renderer_type_radio_options)
65 {70 {
66 widget = new FilterGenre(NUX_TRACKER_LOCATION);71 widget = new FilterGenre(2, NUX_TRACKER_LOCATION);
67 }72 }
68 else73 else
69 {74 {
7075
=== modified file 'plugins/unityshell/src/FilterGenreWidget.cpp'
--- plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-13 15:13:30 +0000
+++ plugins/unityshell/src/FilterGenreWidget.cpp 2012-01-18 10:45:28 +0000
@@ -36,7 +36,7 @@
3636
37NUX_IMPLEMENT_OBJECT_TYPE(FilterGenre);37NUX_IMPLEMENT_OBJECT_TYPE(FilterGenre);
3838
39FilterGenre::FilterGenre(NUX_FILE_LINE_DECL)39FilterGenre::FilterGenre(int columns, NUX_FILE_LINE_DECL)
40 : FilterExpanderLabel(_("Categories"), NUX_FILE_LINE_PARAM)40 : FilterExpanderLabel(_("Categories"), NUX_FILE_LINE_PARAM)
41{41{
42 InitTheme();42 InitTheme();
@@ -46,10 +46,17 @@
46 genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION);46 genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION);
47 genre_layout_->ForceChildrenSize(true);47 genre_layout_->ForceChildrenSize(true);
48 genre_layout_->MatchContentSize(true);48 genre_layout_->MatchContentSize(true);
49 genre_layout_->SetSpaceBetweenChildren (7, 9);49 genre_layout_->SetSpaceBetweenChildren (9, 9);
50 genre_layout_->SetTopAndBottomPadding(12);50 genre_layout_->SetTopAndBottomPadding(12);
51 genre_layout_->EnablePartialVisibility(false);51 genre_layout_->EnablePartialVisibility(false);
52 genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 33);52 if (columns == 3)
53 {
54 genre_layout_->SetChildrenSize(92, 33);
55 }
56 else
57 {
58 genre_layout_->SetChildrenSize(Style::Instance().GetTileWidth() - 12, 33);
59 }
5360
54 SetRightHandView(all_button_);61 SetRightHandView(all_button_);
55 SetContents(genre_layout_);62 SetContents(genre_layout_);
5663
=== modified file 'plugins/unityshell/src/FilterGenreWidget.h'
--- plugins/unityshell/src/FilterGenreWidget.h 2012-01-10 14:09:12 +0000
+++ plugins/unityshell/src/FilterGenreWidget.h 2012-01-18 10:45:28 +0000
@@ -45,7 +45,7 @@
45{45{
46 NUX_DECLARE_OBJECT_TYPE(FilterGenre, FilterExpanderLabel);46 NUX_DECLARE_OBJECT_TYPE(FilterGenre, FilterExpanderLabel);
47public:47public:
48 FilterGenre(NUX_FILE_LINE_PROTO);48 FilterGenre(int columns, NUX_FILE_LINE_PROTO);
49 virtual ~FilterGenre();49 virtual ~FilterGenre();
5050
51 void SetFilter(Filter::Ptr const& filter);51 void SetFilter(Filter::Ptr const& filter);