summaryrefslogtreecommitdiff
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2016-02-25 15:26:54 +0100
committerAndrea Azzarone <azzaronea@gmail.com>2016-02-25 15:26:54 +0100
commit868131e06d6f51589a6f6f0cde562d1cb3c3f949 (patch)
tree9b2949974d6548f9fc4061eb8535233a1a51e75e
parent825b78974ef8ad629f5dc0c55b586700ec610d3c (diff)
parent1b2c9b619529a28c5d892b7be0de5b3407752424 (diff)
Merge with trunk.
(bzr r4074.4.1)
-rw-r--r--launcher/ApplicationLauncherIcon.cpp8
-rw-r--r--launcher/WindowedLauncherIcon.cpp5
-rw-r--r--launcher/WindowedLauncherIcon.h1
-rw-r--r--unity-shared/ApplicationManager.h1
-rw-r--r--unity-shared/BamfApplicationManager.cpp14
-rw-r--r--unity-shared/BamfApplicationManager.h1
6 files changed, 30 insertions, 0 deletions
diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp
index 91ea82107..b5ee808e9 100644
--- a/launcher/ApplicationLauncherIcon.cpp
+++ b/launcher/ApplicationLauncherIcon.cpp
@@ -114,6 +114,9 @@ void ApplicationLauncherIcon::SetApplication(ApplicationPtr const& app)
// Make sure we set the LauncherIcon stick bit too...
if (app_->sticky() || was_sticky)
Stick(false); // don't emit the signal
+
+ if (app_->starting())
+ SetQuirk(Quirk::STARTING, true);
}
void ApplicationLauncherIcon::UnsetApplication()
@@ -151,6 +154,11 @@ void ApplicationLauncherIcon::SetupApplicationSignalsConnections()
SetQuirk(Quirk::URGENT, urgent);
}));
+ signals_conn_.Add(app_->starting.changed.connect([this](bool starting) {
+ LOG_DEBUG(logger) << tooltip_text() << " starting now " << (starting ? "true" : "false");
+ SetQuirk(Quirk::STARTING, starting);
+ }));
+
signals_conn_.Add(app_->active.changed.connect([this](bool active) {
LOG_DEBUG(logger) << tooltip_text() << " active now " << (active ? "true" : "false");
SetQuirk(Quirk::ACTIVE, active);
diff --git a/launcher/WindowedLauncherIcon.cpp b/launcher/WindowedLauncherIcon.cpp
index efffb81ac..b27673989 100644
--- a/launcher/WindowedLauncherIcon.cpp
+++ b/launcher/WindowedLauncherIcon.cpp
@@ -60,6 +60,11 @@ bool WindowedLauncherIcon::IsActive() const
return GetQuirk(Quirk::ACTIVE);
}
+bool WindowedLauncherIcon::IsStarting() const
+{
+ return GetQuirk(Quirk::STARTING);
+}
+
bool WindowedLauncherIcon::IsRunning() const
{
return GetQuirk(Quirk::RUNNING);
diff --git a/launcher/WindowedLauncherIcon.h b/launcher/WindowedLauncherIcon.h
index 83ecbdb78..c982e5401 100644
--- a/launcher/WindowedLauncherIcon.h
+++ b/launcher/WindowedLauncherIcon.h
@@ -40,6 +40,7 @@ public:
WindowList WindowsForMonitor(int monitor) override;
virtual bool IsActive() const;
+ virtual bool IsStarting() const;
virtual bool IsRunning() const;
virtual bool IsUrgent() const;
virtual bool IsUserVisible() const;
diff --git a/unity-shared/ApplicationManager.h b/unity-shared/ApplicationManager.h
index 8a5e6270d..8864ca32d 100644
--- a/unity-shared/ApplicationManager.h
+++ b/unity-shared/ApplicationManager.h
@@ -162,6 +162,7 @@ public:
nux::ROProperty<bool> active;
nux::ROProperty<bool> running;
nux::ROProperty<bool> urgent;
+ nux::ROProperty<bool> starting;
sigc::signal<void> closed;
diff --git a/unity-shared/BamfApplicationManager.cpp b/unity-shared/BamfApplicationManager.cpp
index 8225ccc05..e461f2c09 100644
--- a/unity-shared/BamfApplicationManager.cpp
+++ b/unity-shared/BamfApplicationManager.cpp
@@ -114,6 +114,11 @@ bool View::GetUrgent() const
return bamf_view_is_urgent(bamf_view_);
}
+bool View::GetStarting() const
+{
+ return bamf_view_is_starting(bamf_view_);
+}
+
WindowBase::WindowBase(ApplicationManager const& manager,
glib::Object<BamfView> const& window)
@@ -303,6 +308,8 @@ Application::Application(ApplicationManager const& manager, glib::Object<BamfApp
active.SetGetterFunction(std::bind(&View::GetActive, this));
running.SetGetterFunction(std::bind(&View::GetRunning, this));
urgent.SetGetterFunction(std::bind(&View::GetUrgent, this));
+ starting.SetGetterFunction(std::bind(&View::GetStarting, this));
+
signals_.Add<void, BamfApplication*, const char*>(bamf_app_, "desktop-file-updated",
[this] (BamfApplication*, const char* new_desktop_file) {
@@ -326,6 +333,13 @@ Application::Application(ApplicationManager const& manager, glib::Object<BamfApp
LOG_TRACE(logger) << "active-changed " << visible;
this->active.changed.emit(active);
});
+
+ signals_.Add<void, BamfView*, gboolean>(bamf_view_, "starting-changed",
+ [this] (BamfView*, gboolean starting) {
+ LOG_TRACE(logger) << "starting " << visible;
+ this->starting.changed.emit(starting);
+ });
+
signals_.Add<void, BamfView*, gboolean>(bamf_view_, "running-changed",
[this] (BamfView*, gboolean running) {
LOG_TRACE(logger) << "running " << visible;
diff --git a/unity-shared/BamfApplicationManager.h b/unity-shared/BamfApplicationManager.h
index 30859025a..214b383f4 100644
--- a/unity-shared/BamfApplicationManager.h
+++ b/unity-shared/BamfApplicationManager.h
@@ -45,6 +45,7 @@ public:
bool GetActive() const;
bool GetRunning() const;
bool GetUrgent() const;
+ bool GetStarting() const;
protected:
ApplicationManager const& manager_;