Merge lp:~unity-team/unity/fixes-2011-04-14 into lp:unity

Proposed by Neil J. Patel
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 1138
Proposed branch: lp:~unity-team/unity/fixes-2011-04-14
Merge into: lp:unity
Diff against target: 158 lines (+44/-6) (has conflicts)
6 files modified
src/PanelMenuView.cpp (+18/-3)
src/PanelView.cpp (+2/-3)
src/PlacesEmptyView.cpp (+3/-0)
src/PlacesView.cpp (+15/-0)
src/PlacesView.h (+5/-0)
src/PluginAdapter.cpp (+1/-0)
Text conflict in src/PlacesView.cpp
Text conflict in src/PlacesView.h
To merge this branch: bzr merge lp:~unity-team/unity/fixes-2011-04-14
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+57688@code.launchpad.net

Description of the change

Bugs linked

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Launcher.cpp'
=== modified file 'src/PanelMenuView.cpp'
--- src/PanelMenuView.cpp 2011-04-12 14:34:08 +0000
+++ src/PanelMenuView.cpp 2011-04-14 14:06:55 +0000
@@ -311,7 +311,18 @@
311 }311 }
312 else312 else
313 {313 {
314 if ((_is_inside || _last_active_view || _show_now_activated) && _entries.size ())314 bool have_valid_entries = false;
315 std::vector<PanelIndicatorObjectEntryView *>::iterator it, eit = _entries.end ();
316
317 for (it = _entries.begin (); it != eit; ++it)
318 {
319 IndicatorObjectEntryProxy *proxy = (*it)->_proxy;
320
321 if (proxy->icon_visible || proxy->label_visible)
322 have_valid_entries = true;
323 }
324
325 if ((_is_inside || _last_active_view || _show_now_activated) && have_valid_entries)
315 {326 {
316 if (_gradient_texture == NULL)327 if (_gradient_texture == NULL)
317 {328 {
@@ -683,7 +694,7 @@
683PanelMenuView::OnEntryRemoved(IndicatorObjectEntryProxy *proxy)694PanelMenuView::OnEntryRemoved(IndicatorObjectEntryProxy *proxy)
684{695{
685 std::vector<PanelIndicatorObjectEntryView *>::iterator it;696 std::vector<PanelIndicatorObjectEntryView *>::iterator it;
686 697
687 for (it = _entries.begin(); it != _entries.end(); it++)698 for (it = _entries.begin(); it != _entries.end(); it++)
688 {699 {
689 PanelIndicatorObjectEntryView *view = static_cast<PanelIndicatorObjectEntryView *> (*it);700 PanelIndicatorObjectEntryView *view = static_cast<PanelIndicatorObjectEntryView *> (*it);
@@ -721,6 +732,7 @@
721PanelMenuView::OnActiveWindowChanged (BamfView *old_view,732PanelMenuView::OnActiveWindowChanged (BamfView *old_view,
722 BamfView *new_view)733 BamfView *new_view)
723{734{
735 _show_now_activated = false;
724 _is_maximized = false;736 _is_maximized = false;
725 _active_xid = 0;737 _active_xid = 0;
726 if (_active_moved_id)738 if (_active_moved_id)
@@ -734,7 +746,10 @@
734 _is_maximized = WindowManager::Default ()->IsWindowMaximized (xid);746 _is_maximized = WindowManager::Default ()->IsWindowMaximized (xid);
735 nux::Geometry geo = WindowManager::Default ()->GetWindowGeometry (xid);747 nux::Geometry geo = WindowManager::Default ()->GetWindowGeometry (xid);
736748
737 _we_control_active = UScreen::GetDefault ()->GetMonitorGeometry (_monitor).IsPointInside (geo.x + (geo.width/2), geo.y);749 if (bamf_window_get_window_type (window) == BAMF_WINDOW_DESKTOP)
750 _we_control_active = true;
751 else
752 _we_control_active = UScreen::GetDefault ()->GetMonitorGeometry (_monitor).IsPointInside (geo.x + (geo.width/2), geo.y);
738753
739 if (_decor_map.find (xid) == _decor_map.end ())754 if (_decor_map.find (xid) == _decor_map.end ())
740 {755 {
741756
=== modified file 'src/PanelView.cpp'
--- src/PanelView.cpp 2011-04-06 17:53:41 +0000
+++ src/PanelView.cpp 2011-04-14 14:06:55 +0000
@@ -127,6 +127,8 @@
127void127void
128PanelView::Draw (nux::GraphicsEngine& GfxContext, bool force_draw)128PanelView::Draw (nux::GraphicsEngine& GfxContext, bool force_draw)
129{129{
130 UpdateBackground ();
131
130 GfxContext.PushClippingRectangle (GetGeometry() );132 GfxContext.PushClippingRectangle (GetGeometry() );
131133
132 gPainter.PushDrawLayer (GfxContext, GetGeometry (), _bg_layer);134 gPainter.PushDrawLayer (GfxContext, GetGeometry (), _bg_layer);
@@ -164,9 +166,6 @@
164long166long
165PanelView::PostLayoutManagement (long LayoutResult)167PanelView::PostLayoutManagement (long LayoutResult)
166{168{
167 // I'm imagining this is a good as time as any to update the background
168 UpdateBackground ();
169
170 return nux::View::PostLayoutManagement (LayoutResult);169 return nux::View::PostLayoutManagement (LayoutResult);
171}170}
172171
173172
=== modified file 'src/PlacesEmptyView.cpp'
--- src/PlacesEmptyView.cpp 2011-03-20 18:15:16 +0000
+++ src/PlacesEmptyView.cpp 2011-04-14 14:06:55 +0000
@@ -25,9 +25,12 @@
25PlacesEmptyView::PlacesEmptyView ()25PlacesEmptyView::PlacesEmptyView ()
26: nux::View (NUX_TRACKER_LOCATION)26: nux::View (NUX_TRACKER_LOCATION)
27{27{
28 PlacesStyle *style = PlacesStyle::GetDefault ();
29
28 SetLayout (new nux::HLayout (NUX_TRACKER_LOCATION));30 SetLayout (new nux::HLayout (NUX_TRACKER_LOCATION));
2931
30 _text = new nux::StaticCairoText ("");32 _text = new nux::StaticCairoText ("");
33 _text->SetMaximumWidth (style->GetTileWidth () * style->GetDefaultNColumns ());
31 _text->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_END);34 _text->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_END);
32 _text->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_CENTRE);35 _text->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_CENTRE);
33 _text->SetTextVerticalAlignment (nux::StaticCairoText::NUX_ALIGN_CENTRE);36 _text->SetTextVerticalAlignment (nux::StaticCairoText::NUX_ALIGN_CENTRE);
3437
=== modified file 'src/PlacesHomeView.cpp'
=== modified file 'src/PlacesView.cpp'
--- src/PlacesView.cpp 2011-04-14 09:10:30 +0000
+++ src/PlacesView.cpp 2011-04-14 14:06:55 +0000
@@ -120,6 +120,7 @@
120120
121 // Register for all the events121 // Register for all the events
122 UBusServer *ubus = ubus_server_get_default ();122 UBusServer *ubus = ubus_server_get_default ();
123<<<<<<< TREE
123124
124 // This is a nice time to Connect () the Places as it's hopefully fast enough to be avaiable125 // This is a nice time to Connect () the Places as it's hopefully fast enough to be avaiable
125 // by the time the user starts typing (home screen doesn't require initial connection)126 // by the time the user starts typing (home screen doesn't require initial connection)
@@ -138,6 +139,20 @@
138 _ubus_handles[3] = ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_QUEUE_DRAW,139 _ubus_handles[3] = ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_QUEUE_DRAW,
139 (UBusCallback)&PlacesView::OnPlaceViewQueueDrawNeeded,140 (UBusCallback)&PlacesView::OnPlaceViewQueueDrawNeeded,
140 this);141 this);
142=======
143 _ubus_handles[0] = ubus_server_register_interest (ubus, UBUS_PLACE_ENTRY_ACTIVATE_REQUEST,
144 (UBusCallback)place_entry_activate_request,
145 this);
146 _ubus_handles[1] = ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_CLOSE_REQUEST,
147 (UBusCallback)&PlacesView::CloseRequest,
148 this);
149 _ubus_handles[2] = ubus_server_register_interest (ubus, UBUS_PLACE_TILE_ACTIVATE_REQUEST,
150 (UBusCallback)&PlacesView::OnResultActivated,
151 this);
152 _ubus_handles[3] = ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_QUEUE_DRAW,
153 (UBusCallback)&PlacesView::OnPlaceViewQueueDrawNeeded,
154 this);
155>>>>>>> MERGE-SOURCE
141156
142 _icon_loader = IconLoader::GetDefault ();157 _icon_loader = IconLoader::GetDefault ();
143158
144159
=== modified file 'src/PlacesView.h'
--- src/PlacesView.h 2011-04-13 16:06:03 +0000
+++ src/PlacesView.h 2011-04-14 14:06:55 +0000
@@ -174,9 +174,14 @@
174 bool _pending_activation;174 bool _pending_activation;
175175
176 bool _search_empty;176 bool _search_empty;
177<<<<<<< TREE
177 bool _places_connected;178 bool _places_connected;
178 guint _home_button_hover;179 guint _home_button_hover;
179 guint _ubus_handles[4];180 guint _ubus_handles[4];
181=======
182
183 guint _ubus_handles[4];
184>>>>>>> MERGE-SOURCE
180};185};
181186
182#endif // PANEL_HOME_BUTTON_H187#endif // PANEL_HOME_BUTTON_H
183188
=== modified file 'src/PluginAdapter.cpp'
--- src/PluginAdapter.cpp 2011-04-08 17:53:28 +0000
+++ src/PluginAdapter.cpp 2011-04-14 14:06:55 +0000
@@ -393,6 +393,7 @@
393 for (CompWindow *sibling = window->next; sibling != NULL; sibling = sibling->next)393 for (CompWindow *sibling = window->next; sibling != NULL; sibling = sibling->next)
394 {394 {
395 if (sibling->defaultViewport () == window_vp395 if (sibling->defaultViewport () == window_vp
396 && !sibling->minimized ()
396 && (sibling->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)397 && (sibling->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
397 return true;398 return true;
398 }399 }