Merge lp://qastaging/~unity-2d-team/unity-2d/update-launcher-pips-shell into lp://qastaging/~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Lohith D Shivamurthy
Status: Merged
Approved by: Michał Sawicz
Approved revision: 934
Merged at revision: 934
Proposed branch: lp://qastaging/~unity-2d-team/unity-2d/update-launcher-pips-shell
Merge into: lp://qastaging/~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 571 lines (+408/-4)
9 files modified
libunity-2d-private/src/launcherapplication.cpp (+56/-2)
libunity-2d-private/src/launcherapplication.h (+4/-0)
libunity-2d-private/src/launcheritem.cpp (+6/-0)
libunity-2d-private/src/launcheritem.h (+2/-0)
libunity-2d-private/src/unity2ddeclarativeview.cpp (+1/-0)
libunity-2d-private/src/unity2ddeclarativeview.h (+1/-0)
shell/launcher/LauncherItem.qml (+1/-1)
shell/launcher/LauncherList.qml (+22/-1)
tests/launcher/update_pips_tests.rb (+315/-0)
To merge this branch: bzr merge lp://qastaging/~unity-2d-team/unity-2d/update-launcher-pips-shell
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Gerry Boland (community) Needs Fixing
Review via email: mp+89679@code.qastaging.launchpad.net

Description of the change

[shell][launcher] launcher pips indicate whether application windows belongs to current workspace or not

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

Hey, the pips weren't updating when I changed workspaces, just when I launched / closed apps, can you please verify it behaves as expected when switching workspaces?

review: Needs Fixing (functional)
924. By Lohith D Shivamurthy

[shell][launcher] update pips when the user workspace changed. Also added tests for the same

Revision history for this message
Michał Sawicz (saviq) wrote :

Hey, any reason you're not using the TmpWindow class?

review: Needs Information
Revision history for this message
Gerry Boland (gerboland) wrote :

Yeah, since we run tests with a Terminal open already, he needed to start testing with a non-running application, checking no pips, run the app, check pip, etc.

Revision history for this message
Michał Sawicz (saviq) wrote :

Maybe take a look at autohide_show_tests.rb:549 then for a way to find a non-running app and use that instead?

review: Needs Fixing
Revision history for this message
Lohith D Shivamurthy (dyams) wrote :

Hey, The test application should take some parameter to identiy its xid accurately. In this case, a unique title is set to test application and then later we find the xid for that window.

Revision history for this message
Michał Sawicz (saviq) wrote :

OK then, lets merge that now and once we have a better way to test these lets revisit, can you please add a FIXME in the tests? I'm simply wary of the test being unreliable if you pre-launch xman anywhere.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) :
review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

* what's the use of updateWindowWorkspaceChanged()? Can't you just emit the signal from the callback function?
* there's a tab instead of spaces in unity2ddeclarativeview.cpp:48
* updatePipSource updates both the source and pip count, please rename to updatePips
* pipSource should not be bound to updatePipSource, as it doesn't return anything - make it use the default value initially and the Connections will take care of updating it later
* there are tabs instead of spaces in LauncherList.qml:306
* change the puts() to comments in test startup and shutdown
* drop unneeded comment in test setup
* you have extra lines in test descriptions, please drop the lines only containing an asterisk
* Post-Conditions should not contain stuff that happens in teardown anyway, please drop the "Reset the current..." entries there
* again, tabs instead of spaces in the tests file
* test comments mentions calculator, please fix
* please don't "reuse" windows between tests as this will prevent running just one single test
* typos in "Test steps" - "reused", not "resued"
* typo in "Test steps" for "Update launcher pips to indicate an app with two windows on two different workspaces" - "along", not "alogn"
* typo in "Test steps" for "Update launcher pips to indicate an app completely belonging to different workspace." - missing "e" in "differnt"
* in some test objectives you say "Check for...", in others "Update...", please be consistent

review: Needs Fixing
925. By Lohith D Shivamurthy

[shell][launcher] Review comments fixed

926. By Lohith D Shivamurthy

[shell][launcher] Added a FIXME to choose a better test application

Revision history for this message
Michał Sawicz (saviq) wrote :

Gerry please take a look at the tests if you will.

And Gerry, Lohith some more things I'm not certain about:

1) the workspace-changed signals are connected in setIconGeometry? doesn't seem like the right place to do so?
2) shouldn't we also connect to workspace-changed signal in windowAdded()
3) do we really need to cast user_data to LauncherApplication*?

Please rename the callback to onWindowWorkspaceChanged

review: Needs Fixing
927. By Lohith D Shivamurthy

[shell][launcher] windows signal connection is moved to separate method

928. By Lohith D Shivamurthy

[shell] merge with trunk

Revision history for this message
Michał Sawicz (saviq) wrote :

You forgot:
* Please rename the callback to onWindowWorkspaceChanged

Please also fix the style in LauncherList.qml:292, move setIconGeometry() down one line.
There's also an extra blank line in launcherapplication.cpp:513

I'm not completely sure us going through QML just to proxy onRunningChanged() back into C++ is needed or required :/ Gerry, I'd like your opinion on that.

I'm not GObject-savvy enough to know whether we should disconnect from the workspace-changed signal when the window is removed / application stopped?

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote :

Functional problems:
1. I find when I launch shell, with existing applications open, that the pips are incorrect (they're all filled). Once I start navigating workspaces, the pips are corrected.

2. Set an application window to be "Always on Visible Workspace" (from window menu) - then its pips are always unfilled.

review: Needs Fixing
929. By Lohith D Shivamurthy

[launcher] update pips as soon as loading the launcher is completed

930. By Lohith D Shivamurthy

[launcher] Consider 'always on visible workspace' windows as always in the current workspace

Revision history for this message
Gerry Boland (gerboland) wrote :

Nice, those functional problems have been fixed.

Please update the tests to use $SUT.execute_shell_command

There is also a stray blank line in void LauncherApplication::connectWindowSignals() that you can remove.

And
+ onRunningChanged: { setIconGeometry()
+ item.connectWindowSignals()
+ }
is formatted strangely.

Fix those & I think we're good :)

review: Needs Fixing
931. By Lohith D Shivamurthy

[launcher] use sut global object, remove local object

932. By Lohith D Shivamurthy

[launcher] Replace 'system' with execute_shell_command

933. By Lohith D Shivamurthy

[launcher] remove extra line in cpp and add one line in qml

934. By Lohith D Shivamurthy

[launcher] replace 'CB' suffix with 'on' prefix for the callback

Revision history for this message
Michał Sawicz (saviq) wrote :

Yup, looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: