summaryrefslogtreecommitdiff
path: root/panel
diff options
authortimo.jyrinki@canonical.com <>2012-07-06 08:52:34 +0300
committertimo.jyrinki@canonical.com <>2012-07-06 08:52:34 +0300
commit5c101a615db71d00dfbd2d3782ba240a7239d44f (patch)
treea584ac29fcd0054fa3544e3721e34f8194ec0046 /panel
parent0fb0151f6b77a6a5165636d23c1e0331205a178e (diff)
parentc79e8d0cfe8e61483c3705c6f4eb9d86ddefd998 (diff)
Merge trunk.
(bzr r2434.3.3)
Diffstat (limited to 'panel')
-rw-r--r--panel/PanelController.cpp15
-rw-r--r--panel/PanelController.h1
-rw-r--r--panel/PanelIndicatorEntryView.h2
-rw-r--r--panel/PanelView.cpp4
-rw-r--r--panel/PanelView.h2
-rw-r--r--panel/WindowButtons.cpp7
6 files changed, 25 insertions, 6 deletions
diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp
index f947fe74b..460a61ee8 100644
--- a/panel/PanelController.cpp
+++ b/panel/PanelController.cpp
@@ -49,6 +49,7 @@ public:
void QueueRedraw();
std::vector<Window> GetTrayXids() const;
+ std::vector<nux::View*> GetPanelViews() const;
std::vector<nux::Geometry> GetGeometries() const;
// NOTE: nux::Property maybe?
@@ -106,6 +107,15 @@ std::vector<Window> Controller::Impl::GetTrayXids() const
return xids;
}
+std::vector<nux::View*> Controller::Impl::GetPanelViews() const
+{
+ std::vector<nux::View*> views;
+ views.reserve(windows_.size());
+ for (auto window: windows_)
+ views.push_back(ViewForWindow(window));
+ return views;
+}
+
std::vector<nux::Geometry> Controller::Impl::GetGeometries() const
{
std::vector<nux::Geometry> geometries;
@@ -325,6 +335,11 @@ std::vector<Window> Controller::GetTrayXids() const
return pimpl->GetTrayXids();
}
+std::vector<nux::View*> Controller::GetPanelViews() const
+{
+ return pimpl->GetPanelViews();
+}
+
std::vector<nux::Geometry> Controller::GetGeometries() const
{
return pimpl->GetGeometries();
diff --git a/panel/PanelController.h b/panel/PanelController.h
index 282d232eb..2c8a9c1bc 100644
--- a/panel/PanelController.h
+++ b/panel/PanelController.h
@@ -41,6 +41,7 @@ public:
void QueueRedraw();
std::vector<Window> GetTrayXids() const;
+ std::vector<nux::View*> GetPanelViews() const;
std::vector<nux::Geometry> GetGeometries() const;
// NOTE: nux::Property maybe?
diff --git a/panel/PanelIndicatorEntryView.h b/panel/PanelIndicatorEntryView.h
index 949e8681c..dcf3dd5a0 100644
--- a/panel/PanelIndicatorEntryView.h
+++ b/panel/PanelIndicatorEntryView.h
@@ -23,7 +23,7 @@
#include <Nux/TextureArea.h>
#include <Nux/View.h>
-#include <NuxImage/CairoGraphics.h>
+#include <NuxGraphics/CairoGraphics.h>
#include <NuxGraphics/GraphicsEngine.h>
#include <UnityCore/IndicatorEntry.h>
diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp
index 3ced1322f..14f24752d 100644
--- a/panel/PanelView.cpp
+++ b/panel/PanelView.cpp
@@ -24,8 +24,8 @@
#include <Nux/Layout.h>
#include <Nux/WindowCompositor.h>
-#include <NuxImage/CairoGraphics.h>
-#include <NuxImage/ImageSurface.h>
+#include <NuxGraphics/CairoGraphics.h>
+#include <NuxGraphics/ImageSurface.h>
#include <NuxCore/Logger.h>
#include <UnityCore/GLibWrapper.h>
diff --git a/panel/PanelView.h b/panel/PanelView.h
index 8f45ec884..9dac92ea1 100644
--- a/panel/PanelView.h
+++ b/panel/PanelView.h
@@ -26,7 +26,7 @@
#include <Nux/View.h>
#include <Nux/TextureArea.h>
#include <NuxGraphics/GraphicsEngine.h>
-#include <NuxImage/CairoGraphics.h>
+#include <NuxGraphics/CairoGraphics.h>
#include <gdk/gdkx.h>
#include <UnityCore/DBusIndicators.h>
diff --git a/panel/WindowButtons.cpp b/panel/WindowButtons.cpp
index d7bcd32f3..9788989bf 100644
--- a/panel/WindowButtons.cpp
+++ b/panel/WindowButtons.cpp
@@ -506,7 +506,7 @@ void WindowButtons::OnOverlayShown(GVariant* data)
glib::String overlay_identity;
gboolean can_maximise = FALSE;
gint32 overlay_monitor = 0;
- g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,
+ g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,
&overlay_identity, &can_maximise, &overlay_monitor);
if (overlay_monitor != monitor_)
@@ -539,6 +539,9 @@ void WindowButtons::OnOverlayShown(GVariant* data)
if (button->GetType() == panel::WindowButtonType::MAXIMIZE)
maximize_button = button;
+ if (button->GetType() == panel::WindowButtonType::MINIMIZE)
+ button->SetEnabled(false);
+
button->SetOverlayOpen(true);
}
}
@@ -574,7 +577,7 @@ void WindowButtons::OnOverlayHidden(GVariant* data)
glib::String overlay_identity;
gboolean can_maximise = FALSE;
gint32 overlay_monitor = 0;
- g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,
+ g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,
&overlay_identity, &can_maximise, &overlay_monitor);
if (overlay_monitor != monitor_)