Merge lp:~azzar1/unity/unity-sn into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4092
Proposed branch: lp:~azzar1/unity/unity-sn
Merge into: lp:unity
Prerequisite: lp:~3v1n0/unity/launcher-filemanager-integration
Diff against target: 155 lines (+33/-3)
9 files modified
CMakeLists.txt (+1/-1)
debian/control (+1/-1)
launcher/ApplicationLauncherIcon.cpp (+8/-0)
launcher/Launcher.cpp (+1/-1)
launcher/WindowedLauncherIcon.cpp (+5/-0)
launcher/WindowedLauncherIcon.h (+1/-0)
unity-shared/ApplicationManager.h (+1/-0)
unity-shared/BamfApplicationManager.cpp (+14/-0)
unity-shared/BamfApplicationManager.h (+1/-0)
To merge this branch: bzr merge lp:~azzar1/unity/unity-sn
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+283322@code.launchpad.net

Commit message

ApplicationLauncherIcon: use the starting property to show an icon when launched

Description of the change

Use new bamf starting property. It's not taking properly lp:~3v1n0/unity/launcher-filemanager-integration as a prerequisite. No sure if it's my fault.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks good, fix a typo in the s/visible/starting variable and add proper dependency on new bamf version (both in debian and cmakefile sides).

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Done.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Everything has been addressed. Thanks.

So, let's go!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-03-16 09:47:02 +0000
+++ CMakeLists.txt 2016-03-21 15:21:52 +0000
@@ -243,7 +243,7 @@
243 gtk+-3.0>=3.1243 gtk+-3.0>=3.1
244 indicator3-0.4>=0.4.90244 indicator3-0.4>=0.4.90
245 json-glib-1.0245 json-glib-1.0
246 libbamf3>=0.5.2246 libbamf3>=0.5.3
247 gnome-desktop-3.0247 gnome-desktop-3.0
248 libnotify248 libnotify
249 libstartup-notification-1.0249 libstartup-notification-1.0
250250
=== modified file 'debian/control'
--- debian/control 2016-03-17 07:36:44 +0000
+++ debian/control 2016-03-21 15:21:52 +0000
@@ -15,7 +15,7 @@
15 intltool (>= 0.35.0),15 intltool (>= 0.35.0),
16 libappstream-glib-dev,16 libappstream-glib-dev,
17 libatk1.0-dev,17 libatk1.0-dev,
18 libbamf3-dev (>= 0.5.2~bzr0),18 libbamf3-dev (>= 0.5.3~bzr0),
19 libboost-dev,19 libboost-dev,
20 libcairo2-dev,20 libcairo2-dev,
21 libdbus-1-dev,21 libdbus-1-dev,
2222
=== modified file 'launcher/ApplicationLauncherIcon.cpp'
--- launcher/ApplicationLauncherIcon.cpp 2015-12-17 22:32:37 +0000
+++ launcher/ApplicationLauncherIcon.cpp 2016-03-21 15:21:52 +0000
@@ -114,6 +114,9 @@
114 // Make sure we set the LauncherIcon stick bit too...114 // Make sure we set the LauncherIcon stick bit too...
115 if (app_->sticky() || was_sticky)115 if (app_->sticky() || was_sticky)
116 Stick(false); // don't emit the signal116 Stick(false); // don't emit the signal
117
118 if (app_->starting())
119 SetQuirk(Quirk::STARTING, true);
117}120}
118121
119void ApplicationLauncherIcon::UnsetApplication()122void ApplicationLauncherIcon::UnsetApplication()
@@ -151,6 +154,11 @@
151 SetQuirk(Quirk::URGENT, urgent);154 SetQuirk(Quirk::URGENT, urgent);
152 }));155 }));
153156
157 signals_conn_.Add(app_->starting.changed.connect([this](bool starting) {
158 LOG_DEBUG(logger) << tooltip_text() << " starting now " << (starting ? "true" : "false");
159 SetQuirk(Quirk::STARTING, starting);
160 }));
161
154 signals_conn_.Add(app_->active.changed.connect([this](bool active) {162 signals_conn_.Add(app_->active.changed.connect([this](bool active) {
155 LOG_DEBUG(logger) << tooltip_text() << " active now " << (active ? "true" : "false");163 LOG_DEBUG(logger) << tooltip_text() << " active now " << (active ? "true" : "false");
156 SetQuirk(Quirk::ACTIVE, active);164 SetQuirk(Quirk::ACTIVE, active);
157165
=== modified file 'launcher/Launcher.cpp'
--- launcher/Launcher.cpp 2016-03-18 01:47:08 +0000
+++ launcher/Launcher.cpp 2016-03-21 15:21:52 +0000
@@ -59,7 +59,7 @@
59const int URGENT_BLINKS = 3;59const int URGENT_BLINKS = 3;
60const int WIGGLE_CYCLES = 6;60const int WIGGLE_CYCLES = 6;
6161
62const int MAX_STARTING_BLINKS = 5;62const int MAX_STARTING_BLINKS = 15;
63const int STARTING_BLINK_LAMBDA = 3;63const int STARTING_BLINK_LAMBDA = 3;
6464
65const int PULSE_BLINK_LAMBDA = 2;65const int PULSE_BLINK_LAMBDA = 2;
6666
=== modified file 'launcher/WindowedLauncherIcon.cpp'
--- launcher/WindowedLauncherIcon.cpp 2015-12-08 18:28:09 +0000
+++ launcher/WindowedLauncherIcon.cpp 2016-03-21 15:21:52 +0000
@@ -60,6 +60,11 @@
60 return GetQuirk(Quirk::ACTIVE);60 return GetQuirk(Quirk::ACTIVE);
61}61}
6262
63bool WindowedLauncherIcon::IsStarting() const
64{
65 return GetQuirk(Quirk::STARTING);
66}
67
63bool WindowedLauncherIcon::IsRunning() const68bool WindowedLauncherIcon::IsRunning() const
64{69{
65 return GetQuirk(Quirk::RUNNING);70 return GetQuirk(Quirk::RUNNING);
6671
=== modified file 'launcher/WindowedLauncherIcon.h'
--- launcher/WindowedLauncherIcon.h 2015-12-07 18:04:33 +0000
+++ launcher/WindowedLauncherIcon.h 2016-03-21 15:21:52 +0000
@@ -40,6 +40,7 @@
40 WindowList WindowsForMonitor(int monitor) override;40 WindowList WindowsForMonitor(int monitor) override;
4141
42 virtual bool IsActive() const;42 virtual bool IsActive() const;
43 virtual bool IsStarting() const;
43 virtual bool IsRunning() const;44 virtual bool IsRunning() const;
44 virtual bool IsUrgent() const;45 virtual bool IsUrgent() const;
45 virtual bool IsUserVisible() const;46 virtual bool IsUserVisible() const;
4647
=== modified file 'unity-shared/ApplicationManager.h'
--- unity-shared/ApplicationManager.h 2016-02-23 15:05:29 +0000
+++ unity-shared/ApplicationManager.h 2016-03-21 15:21:52 +0000
@@ -165,6 +165,7 @@
165 nux::ROProperty<bool> active;165 nux::ROProperty<bool> active;
166 nux::ROProperty<bool> running;166 nux::ROProperty<bool> running;
167 nux::ROProperty<bool> urgent;167 nux::ROProperty<bool> urgent;
168 nux::ROProperty<bool> starting;
168169
169 sigc::signal<void> closed;170 sigc::signal<void> closed;
170171
171172
=== modified file 'unity-shared/BamfApplicationManager.cpp'
--- unity-shared/BamfApplicationManager.cpp 2015-11-26 00:20:23 +0000
+++ unity-shared/BamfApplicationManager.cpp 2016-03-21 15:21:52 +0000
@@ -114,6 +114,11 @@
114 return bamf_view_is_urgent(bamf_view_);114 return bamf_view_is_urgent(bamf_view_);
115}115}
116116
117bool View::GetStarting() const
118{
119 return bamf_view_is_starting(bamf_view_);
120}
121
117122
118WindowBase::WindowBase(ApplicationManager const& manager,123WindowBase::WindowBase(ApplicationManager const& manager,
119 glib::Object<BamfView> const& window)124 glib::Object<BamfView> const& window)
@@ -303,6 +308,8 @@
303 active.SetGetterFunction(std::bind(&View::GetActive, this));308 active.SetGetterFunction(std::bind(&View::GetActive, this));
304 running.SetGetterFunction(std::bind(&View::GetRunning, this));309 running.SetGetterFunction(std::bind(&View::GetRunning, this));
305 urgent.SetGetterFunction(std::bind(&View::GetUrgent, this));310 urgent.SetGetterFunction(std::bind(&View::GetUrgent, this));
311 starting.SetGetterFunction(std::bind(&View::GetStarting, this));
312
306313
307 signals_.Add<void, BamfApplication*, const char*>(bamf_app_, "desktop-file-updated",314 signals_.Add<void, BamfApplication*, const char*>(bamf_app_, "desktop-file-updated",
308 [this] (BamfApplication*, const char* new_desktop_file) {315 [this] (BamfApplication*, const char* new_desktop_file) {
@@ -326,6 +333,13 @@
326 LOG_TRACE(logger) << "active-changed " << visible;333 LOG_TRACE(logger) << "active-changed " << visible;
327 this->active.changed.emit(active);334 this->active.changed.emit(active);
328 });335 });
336
337 signals_.Add<void, BamfView*, gboolean>(bamf_view_, "starting-changed",
338 [this] (BamfView*, gboolean starting) {
339 LOG_TRACE(logger) << "starting " << starting;
340 this->starting.changed.emit(starting);
341 });
342
329 signals_.Add<void, BamfView*, gboolean>(bamf_view_, "running-changed",343 signals_.Add<void, BamfView*, gboolean>(bamf_view_, "running-changed",
330 [this] (BamfView*, gboolean running) {344 [this] (BamfView*, gboolean running) {
331 LOG_TRACE(logger) << "running " << visible;345 LOG_TRACE(logger) << "running " << visible;
332346
=== modified file 'unity-shared/BamfApplicationManager.h'
--- unity-shared/BamfApplicationManager.h 2015-11-25 23:16:11 +0000
+++ unity-shared/BamfApplicationManager.h 2016-03-21 15:21:52 +0000
@@ -45,6 +45,7 @@
45 bool GetActive() const;45 bool GetActive() const;
46 bool GetRunning() const;46 bool GetRunning() const;
47 bool GetUrgent() const;47 bool GetUrgent() const;
48 bool GetStarting() const;
4849
49protected:50protected:
50 ApplicationManager const& manager_;51 ApplicationManager const& manager_;